Bug 471010 - pytz should use system-wide zoneinfo data
Summary: pytz should use system-wide zoneinfo data
Keywords:
Status: CLOSED DUPLICATE of bug 471014
Alias: None
Product: Fedora
Classification: Fedora
Component: pytz
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jef Spaleta
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 471011 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-11 11:59 UTC by Petr Machata
Modified: 2015-05-05 01:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-18 11:50:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Ubuntu's python-tz patch from Jaunty (against 2008i) (1.86 KB, patch)
2009-04-18 11:48 UTC, Felix Schwarz
no flags Details | Diff

Description Petr Machata 2008-11-11 11:59:26 UTC
Description of problem:
It's necessary to update pytz to more recent version, current 2006p is ancient by tzdata standards.  To avoid having to rebase every time Olson database changes, pytz should use tzdata files instead of its own.  It might be possible to even not ship pytz own data, and simply use tzdata always.

Version-Release number of selected component (if applicable):
pytz-2006p-3.fc9.noarch

How reproducible:
Always.

Steps to Reproduce:
$ rpm -ql tzdata | grep Salta
/usr/share/zoneinfo/America/Argentina/Salta
/usr/share/zoneinfo/posix/America/Argentina/Salta
/usr/share/zoneinfo/right/America/Argentina/Salta
$ python -c 'import pytz; pytz.timezone("America/Argentina/Salta")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/pytz/__init__.py", line 71, in timezone
    raise KeyError, zone
KeyError: 'America/Argentina/Salta'
  
Actual results:
New zones are not available, the existing ones are presumably not current.

Expected results:
pytz is kept in sync with tzdata.

Additional info:
I've had a chat with pytz maintainer, and he told me that new versions of pytz already have a support in place that makes it possible to not use pytz own zoneinfo data, and supply system-wide instead.  Debian are reportedly doing just that.  It would be a very desirable feature to have in Fedora, too.

Comment 1 Felix Schwarz 2009-04-13 07:46:12 UTC
*** Bug 471011 has been marked as a duplicate of this bug. ***

Comment 2 Felix Schwarz 2009-04-18 11:46:23 UTC
Just a quick note that Debian's patch is a good start but has some issues as described here: https://bugs.launchpad.net/pytz/+bug/207604/

I also see the issue that the Olson version is hard-coded in the file. Probably this should be read dynamically.

Comment 3 Felix Schwarz 2009-04-18 11:48:07 UTC
Created attachment 340146 [details]
Ubuntu's python-tz patch from Jaunty (against 2008i)

I extracted the patch from http://packages.ubuntu.com/jaunty/python-tz. License needs to be checked.

Comment 4 Felix Schwarz 2009-04-18 11:50:59 UTC
Ah, I just found out that this was fixed in bug 471014 already due to duplicated reports :-)

*** This bug has been marked as a duplicate of bug 471014 ***


Note You need to log in before you can comment on or make changes to this bug.