[Zope-Checkins]
CVS: Zope/lib/python/Products/PluginIndexes/DateIndex
- DateIndex.py:1.7.6.4
Tres Seaver
tseaver at zope.com
Fri Dec 19 12:26:31 EST 2003
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex
In directory cvs.zope.org:/tmp/cvs-serv2789/lib/python/Products/PluginIndexes/DateIndex
Modified Files:
Tag: Zope-2_6-branch
DateIndex.py
Log Message:
Backport assorted fixes for running Zope 2.6.x tests under Python 2.3.
- lib/python/Products/PluginIndexes/DateIndex:
o Deal with the fact that in Python 2.3, int can return a long
instead of throwing OverflowError.
- lib/python/Products/PageTemplates/tests:
o Fix spurious error in PageTemplates; no longer rely on the str() of
exception objects since the value of their str() is not part of their
API, and can vary between Python releases.
The following now shows 1781 tests passing, albeit with a number of
PendingDeprecationWarnings::
$ python2.3 utilities/testrunner.py -a -v
=== Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py 1.7.6.3 => 1.7.6.4 ===
--- Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py:1.7.6.3 Wed Nov 19 07:23:24 2003
+++ Zope/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py Fri Dec 19 12:25:59 2003
@@ -189,13 +189,13 @@
t_val = ( ( ( ( yr * 12 + mo ) * 31 + dy ) * 24 + hr ) * 60 + mn )
- try:
+ if isinstance(t_val, long):
# t_val must be IntType, not LongType
- return int(t_val)
- except OverflowError:
raise OverflowError, (
"%s is not within the range of indexable dates (index: %s)"
% (value, self.id))
+
+ return t_val
manage_addDateIndexForm = DTMLFile( 'dtml/addDateIndex', globals() )
More information about the Zope-Checkins
mailing list