[Bug 207604] Please test proposed package
Robie Basak
207604 at bugs.launchpad.net
Fri Mar 31 16:58:52 UTC 2023
Hello James, or anyone else affected,
Accepted python-tz into jammy-proposed. The package will build now and
be available at https://launchpad.net/ubuntu/+source/python-
tz/2022.1-1ubuntu0.22.04.1 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/207604
Title:
pytz includes a hard coded list of time zone names
Status in pytz:
New
Status in python-tz package in Ubuntu:
Fix Released
Status in python-tz source package in Jammy:
Fix Committed
Status in python-tz source package in Kinetic:
Fix Committed
Bug description:
[ Impact ]
The Debian/Ubuntu packages of pytz include a patch to not install
pytz's zoneinfo database and instead load data from the system
zoneinfo database. This keeps pytz up to date when system timezone
updates are installed which is generally a good idea.
The pytz/__init__.py includes common_timezones and all_timezones
lists, which enumerate the time zones in the database pytz was
released with. If pytz is instead using the system database, these
lists may not be correct (e.g. missing newly added time zones).
all_timezones and common_timezones should be calculated at run time.
all_timezones will need to use os.walk to discover what timezones
exist. common_timezones should be loaded from zone.tab, plus a hard
coded list of extras such as UTC and US/Eastern.
Everytime a new timezone is added to tzdata in an update, this
timezone cannot be used in pytz with the hardcoded list of timezones.
For jammy and kinetic this applies to America/Ciudad_Juarez (when
comparing pytz to tzdata 2023c). For bionic the list of missing
timezones is even bigger:
* America/Ciudad_Juarez
* America/Nuuk
* Asia/Qostanay
* Europe/Kyiv
* Pacific/Kanton
[ Test Plan ]
Two autopkgtest test cases were added:
1. Run the upstream unittests
2. Regression tests with all tests that I could come up with.
There are no manual test, because all those test should also be run
when there is a tzdata update to prevent regressions.
To manually test, a newly added timezone to tzdata should be able to
be specified:
```
#!/usr/bin/python3
import pytz
pytz.timezone("America/Ciudad_Juarez")
```
This should not raise UnknownTimeZoneError.
[ Where problems could occur ]
Dynamically determine the timezones relies on a correct environment
and can fail more easily if the environment is broken. python-tz is
used in several places (maybe in the installer). The patch might have
a performance impact, because the list of timezones is determined
completely (but only once) instead of constructing it lazy.
[ Other Info ]
Upstream recommend our approach:
https://github.com/stub42/pytz/issues/91#issuecomment-1356628324
To manage notifications about this bug go to:
https://bugs.launchpad.net/pytz/+bug/207604/+subscriptions
More information about the foundations-bugs
mailing list