Bug 857266

Summary: pytz is broken in rawhide
Product: [Fedora] Fedora Reporter: Paulo Andrade <paulo.cesar.pereira.de.andrade>
Component: pytzAssignee: Jon Ciesla <limburgher>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jspaleta, limburgher
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 19:59:54 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Paulo Andrade 2012-09-13 19:57:12 EDT
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 Jon Ciesla 2012-09-14 08:57:10 EDT
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 09:05:51 EDT
(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 Jon Ciesla 2012-09-14 09:12:54 EDT
Ok, I'll look at rediffing the patch.
Comment 4 Jon Ciesla 2012-09-14 09:47:55 EDT
Built in rawhide, try it out.
Comment 5 Paulo Andrade 2012-09-14 19:23:18 EDT
Thanks. It works for the test case I had in %check of my package.
Comment 6 Jon Ciesla 2012-09-14 19:59:54 EDT
Excellent!