zopefoundation / DateTime

This package provides a DateTime data type, as known from Zope. Unless you need to communicate with Zope APIs, you're probably better off using Python's built-in datetime module.
Other
19 stars 25 forks source link

DateTime 2.12 gives test failure with pytz 2017.3 #9

Closed mauritsvanrees closed 6 years ago

mauritsvanrees commented 6 years ago

Seen on Travis and locally when running tests for https://github.com/zopefoundation/Zope/pull/226:

Failure in test testLegacyTimezones (DateTime.tests.testDateTime.DateTimeTests)
Traceback (most recent call last):
  File "/opt/python/2.7.13/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/home/travis/build/zopefoundation/Zope/eggs/DateTime-2.12.8-py2.7.egg/DateTime/tests/testDateTime.py", line 667, in testLegacyTimezones
    self.failUnless(name.lower() in cache._zidx, 'legacy timezone  %s cannot be looked up' % name)
  File "/opt/python/2.7.13/lib/python2.7/unittest/case.py", line 612, in deprecated_func
    return original_func(*args, **kwargs)
  File "/opt/python/2.7.13/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: legacy timezone  Canada/East-Saskatchewan cannot be looked up

With pytz 2017.2 the test passes, with 2017.3 it fails. The tests currently get DateTime version 2.12.8, which is the latest in the 2.12.x branch.

tomgross commented 6 years ago

It was removed from tzdb http://mm.icann.org/pipermail/tz/2017-July/025194.html I guess it is save to remove it from the test here: https://github.com/zopefoundation/DateTime/blob/2.12/src/DateTime/tests/legacy.py#L59