python_dateutil get_zonefile_instance functionality is broken without upstream tarball
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-dateutil (Ubuntu) |
Incomplete
|
Medium
|
Unassigned | ||
Groovy |
Won't Fix
|
Medium
|
Unassigned | ||
python-sqlalchemy-utils (Ubuntu) |
Incomplete
|
Medium
|
Unassigned | ||
Groovy |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
python-dateutil expects to have 'dateutil-
Package version:
>>> from dateutil.zoneinfo import get_zonefile_
>>> get_zonefile_
/usr/lib/
warnings.
True
Pip version:
>>> from dateutil.zoneinfo import get_zonefile_
>>> get_zonefile_
False
>>> get_zonefile_
tzfile(
This causes sqlalchemy_utils' date functionality to be broken when paired with dateutils as it relies on this functionality. python-dateutil should be updated to include this tarball, or should be updated to fallback on the tzdata package for timezone information for this use case
ProblemType: Bug
DistroRelease: Ubuntu 20.10
Package: python3-dateutil 2.8.1-4
ProcVersionSign
Uname: Linux 5.4.0-37-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu42
Architecture: amd64
CasperMD5CheckR
Date: Wed Jul 15 12:06:24 2020
Ec2AMI: ami-00000b08
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: m1.xlarge
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: python-dateutil
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in python-sqlalchemy-utils (Ubuntu): | |
status: | New → Triaged |
Changed in python-dateutil (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in python-sqlalchemy-utils (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: rls-gg-incoming |
tags: | removed: rls-gg-incoming |
tags: | added: id-5f19ab2b0f81fa20ab8d8346 |
tags: | added: fr-117 |
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Is there any reason why 'dateutil.tz' can't be used instead of dateutil.zoneinfo? The original bug report was made against python- sqlalchemy- utils, which seems to indicate that some functionatility of it might be making use of dateutil.zoneinfo instead of dateutil.tz.
Some context:
python-dateutil’s zoneinfo tarball is not included in the binary package since 1.4.1-1ubuntu2 (from 28 Sep 2008) [1].
The dateutil.zoneinfo is expected to use the shipped tarball instead of the system’s tzdata. Unfortunately shipping copies zoneinfo data goes against Debian and Ubuntu policies - specially for outdated copies. See the original bug report for that in Debian [2].
The usual way to access timezone data is by relying on dateutil.tz: it is designed to use the system's zoneinfo first, with dateutil.zoneinfo as a fallback. Debian and Ubuntu ship tzdata with current zoneinfo, thus the dateutil.zoneinfo code is never used - it seems it is there basically for Windows, since Windows provides no API for timezone data.
On a side note: PEP 615 [3] has been approved for Python 3.9 and so python-dateutil will no longer be required in the future - there’s also some plans to include it as a backport for 3.6+.
Bug will be marked as incomplete while we wait for more information. Feel free to reply back and change its status after updating the report.
Thanks!
References: /launchpad. net/ubuntu/ +source/ python- dateutil/ 1.4-1ubuntu2 /bugs.debian. org/cgi- bin/bugreport. cgi?bug= 416204 /www.python. org/dev/ peps/pep- 0615/
[1] https:/
[2] https:/
[3] https:/