Index: Lib/test/test_datetime.py =================================================================== --- Lib/test/test_datetime.py (revision 3405) +++ Lib/test/test_datetime.py (working copy) @@ -2931,16 +2931,6 @@ ] return unittest.TestSuite(allsuites) -# Jython transition 2.3 -# pickling doesn't work on any of the types in datetime -# http://jython.org/bugs/1758312 -del TestDate.test_pickling -del TestDateTime.test_pickling -del TestDateTime.test_more_pickling -del TestTime.test_pickling -del TestDateTimeTZ.test_pickling -del TestTimeTZ.test_pickling - def test_main(): #import gc import sys Index: Lib/datetime.py =================================================================== --- Lib/datetime.py (revision 3405) +++ Lib/datetime.py (working copy) @@ -232,7 +232,7 @@ # Just raise TypeError if the arg isn't None or a string. def _check_tzname(name): - if name is not None and not isinstance(name, str): + if name is not None and not isinstance(name, basestring): raise TypeError("tzinfo.tzname() must return None or string, " "not '%s'" % type(name)) @@ -725,7 +725,7 @@ year, month, day (required, base 1) """ - if isinstance(year, str): + if isinstance(year, basestring): # Pickle support self = object.__new__(cls) self.__setstate((year,)) @@ -1088,7 +1088,7 @@ tzinfo (default to None) """ self = object.__new__(cls) - if isinstance(hour, str): + if isinstance(hour, basestring): # Pickle support self.__setstate((hour, minute or None)) return self @@ -1357,7 +1357,7 @@ def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0, microsecond=0, tzinfo=None): - if isinstance(year, str): + if isinstance(year, basestring): # Pickle support self = date.__new__(cls, year[:4]) self.__setstate((year, month))