Hi Gustavo, in http://bugs.debian.org/416204 and https://bugs.launchpad.net/bugs/271680 we requested that the python-dateutil package in Debian and Ubuntu should use the system tzdata files instead of the shipped obsolete copy. This will keep a single reference of the pretty volatile tzdata (which is updated regularly in stable releases) instead of spreading it over multiple packages.
I made a patch which prefers /usr/share/zoneinfo/ over the internal tarball. In the Ubuntu package (just uploaded to intrepid) I don't ship the tarball any more, because we can rely on tzdata being present. The upstream patch merely prefers looking there first. Deleting the tarball breaks the test suite, and applying the patch makes it work again. Also, the change is pretty unintrusive, so I think I didn't screw it up too much. Thank you for considering, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
# Description: Prefer using the system tzdata information instead of # the shipped obsolete copy. # Ubuntu: https://bugs.launchpad.net/bugs/271680 # Debian: http://bugs.debian.org/416204 # Upstream: sent via email Index: python-dateutil-1.4/dateutil/zoneinfo/__init__.py =================================================================== --- python-dateutil-1.4.orig/dateutil/zoneinfo/__init__.py 2008-09-29 11:56:02.000000000 +0200 +++ python-dateutil-1.4/dateutil/zoneinfo/__init__.py 2008-09-29 11:59:46.000000000 +0200 @@ -40,11 +40,13 @@ def gettz(name): tzinfo = None - if ZONEINFOFILE: - for cachedname, tzinfo in CACHE: - if cachedname == name: - break - else: + for cachedname, tzinfo in CACHE: + if cachedname == name: + break + else: + if os.path.exists('/usr/share/zoneinfo/' + name): + tzinfo = tzfile('/usr/share/zoneinfo/' + name) + elif ZONEINFOFILE: tf = TarFile.open(ZONEINFOFILE) try: zonefile = tf.extractfile(name) @@ -53,8 +55,8 @@ else: tzinfo = tzfile(zonefile) tf.close() - CACHE.insert(0, (name, tzinfo)) - del CACHE[CACHESIZE:] + CACHE.insert(0, (name, tzinfo)) + del CACHE[CACHESIZE:] return tzinfo def rebuild(filename, tag=None, format="gz"):
signature.asc
Description: Digital signature

