Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 652226 - dev-python/python-dateutil should install a zoneinfo data file
Summary: dev-python/python-dateutil should install a zoneinfo data file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-02 16:31 UTC by Michael Brakemeier
Modified: 2018-04-20 11:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info.txt,6.73 KB, text/plain)
2018-04-02 16:31 UTC, Michael Brakemeier
Details
0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch (0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch,3.42 KB, patch)
2018-04-03 21:33 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(+)