Bug 857266 - pytz is broken in rawhide
Summary: pytz is broken in rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pytz
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-13 23:57 UTC by Paulo Andrade
Modified: 2012-09-14 23:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-14 23:59:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paulo Andrade 2012-09-13 23:57:12 UTC
When looking again at https://bugzilla.redhat.com/show_bug.cgi?id=839071
to ensure nothing did break in my review request, I learned it no longer
pass %check. Example:

---%<---
$ python -c "from pytz import timezone;print timezone('Europe/Vienna')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/pytz/__init__.py", line 185, in timezone
    raise UnknownTimeZoneError(zone)
pytz.exceptions.UnknownTimeZoneError: 'Europe/Vienna'
---%<---

Reading the pytz source, the simplest "fix" I could figure is:

---%<---
$ sudo ln -s /usr/share/zoneinfo /usr/lib/python2.7/site-packages/pytz/zoneinfo
$ python -c "from pytz import timezone;print timezone('Europe/Vienna')"
Europe/Vienna
---%<---

Looking at it for the first time, but it appears #471014 again in
latest pytz package.

Comment 1 Gwyn Ciesla 2012-09-14 12:57:10 UTC
It does seem simpler than the previous patch.

Let me have a look.  Is this rawhide only, or older as well?

Comment 2 Paulo Andrade 2012-09-14 13:05:51 UTC
(In reply to comment #1)
> It does seem simpler than the previous patch.
> 
> Let me have a look.  Is this rawhide only, or older as well?

Rawhide only. I tested mock build of #839071 with f17 and f18 for
another issue of rawide apparently having python-setuptools as a
requires of python-devel, and the problem only happens in rawhide,
what makes sense as only rawhide has pytz 2012d, released distros
and f18 have pytz 2010h.

Instead of making a symlink, I believe it is better to patch
pytz to look directly at /usr/share/zoneinfo

Comment 3 Gwyn Ciesla 2012-09-14 13:12:54 UTC
Ok, I'll look at rediffing the patch.

Comment 4 Gwyn Ciesla 2012-09-14 13:47:55 UTC
Built in rawhide, try it out.

Comment 5 Paulo Andrade 2012-09-14 23:23:18 UTC
Thanks. It works for the test case I had in %check of my package.

Comment 6 Gwyn Ciesla 2012-09-14 23:59:54 UTC
Excellent!


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