Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 652226

Summary: dev-python/python-dateutil should install a zoneinfo data file
Product: Gentoo Linux Reporter: Michael Brakemeier <michael>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: mgorny, sping
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=652174
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch

Description Michael Brakemeier 2018-04-02 16:31:14 UTC
Created attachment 526346 [details]
emerge --info

Current versions of python-dateutil provide a public API to a zoneinfo datafile normally provided with the package (at least if the package is installed via PyPI), see https://dateutil.readthedocs.io/en/stable/zoneinfo.html

This API breaks on gentoo since the zoneinfo datafile is not installed (on purpose?) by the current ebuilds.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-03 21:33:55 UTC
Created attachment 526494 [details, diff]
0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch

This is my minimal patch to make this package use system tzdata. It passes all tests for me but it is not really upstreamable. If someone has a good idea how to make it possible to upstream support for system zoneinfo, I'd appreciate that.

Also, I'd appreciate testing it against real software as I only run the test suite and gettz() via CLI.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-03 21:34:57 UTC
@sping, this (for python-dateutil) + the upstream nikola patch should fix the issue you were having. I'd appreciate if you could test it.
Comment 3 Sebastian Pipping gentoo-dev 2018-04-04 15:25:00 UTC
If the patch is not upstreamable we make future upgrades harder on ourselves.  Is that patch the alternative to installing the tarball?  Why avoid the trabll so hard, at what cost?  Is it about size in bytes?
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-04 19:04:03 UTC
It is about using the up-to-date system terminfo database rather than relying on people to update the package (or even patch it) in order to be able to obtain the data they need.
Comment 5 Larry the Git Cow gentoo-dev 2018-04-20 11:53:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19d591fa2356aab3456db0381747f7785ef8b7be

commit 19d591fa2356aab3456db0381747f7785ef8b7be
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-04-20 11:47:58 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-04-20 11:51:32 +0000

    dev-python/python-dateutil: Use system tzdata correctly
    
    Closes: https://bugs.gentoo.org/652226

 ...info-Get-timezone-data-from-system-tzdata.patch | 104 +++++++++++++++++++++
 .../python-dateutil-2.7.2-r1.ebuild                |  49 ++++++++++
 2 files changed, 153 insertions(+)