Bug 857266

Summary: pytz is broken in rawhide
Product: [Fedora] Fedora Reporter: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Component: pytzAssignee: Gwyn Ciesla <gwync>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gwync, jspaleta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-14 23:59:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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!