FS#68642 - [python] Python 3.9+ should have a dependency on tzdata

Attached to Project: Arch Linux
Opened by Paul Ganssle (pganssle) - Monday, 16 November 2020, 14:52 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 06 August 2023, 11:00 GMT
Task Type Feature Request
Category Packages: Testing
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

PEP 615 recommends that distros should add a dependency on `tzdata` when distributing Python, to ensure that the zoneinfo module works out of the box:

> Python distributors are encouraged to ensure that time zone data is installed
> alongside Python whenever possible (e.g. by declaring tzdata as a dependency
> for the python package).

Quote from: https://www.python.org/dev/peps/pep-0615/#system-time-zone-information

From what I can tell, the current Python 3.9 package does not include this dependency.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 06 August 2023, 11:00 GMT
Reason for closing:  Implemented
Additional comments about closing:  Fixed in git.
Comment by Paul Ganssle (pganssle) - Monday, 16 November 2020, 14:53 GMT
Not sure what the best way to contribute is, I've attached a patch here that should do the right thing.
Comment by Doug Newgard (Scimmia) - Monday, 16 November 2020, 15:08 GMT
It's a dep of glibc, how do you propose that an Arch system could not have it installed?
Comment by Paul Ganssle (pganssle) - Monday, 16 November 2020, 15:29 GMT
I think it's fine if you already have this as a transitive dependency, but I think there is value in explicitly specifying dependencies of this nature so that you are not relying implicitly on a transitive dependency. It should hurt nothing to add the dependency, and if in the future the glibc dependency were dropped or made optional, users relying on Python's tzdata dependency would not be affected.

I also think it's useful to explicitly call out dependencies for the purposes of tracing what packages may be directly affected by a problem with their dependencies. For this reason, I'd probably also recommend a tzdata dependency on anything that uses Python and needs to work with time zone data.

Finally, I think it would be useful just so that people in the future can look at the Python package's direct dependencies and know that `zoneinfo` will always work right out of the box without having to know that tzdata is a dependency of one of Python's dependencies (and thus they won't open bug reports like this).

I agree that this will likely have no concrete impact on Python users for the foreseeable future (which likely includes the lifetime of the Python 3.9 package), it just seems better to have slightly more accurate dependency metadata. If none of these is compelling, or if Arch's packaging policies have already ruled against this, no problem. Just wanted to make sure y'all are aware that our recommended dependency set for Python has changed. ☺
Comment by Eli Schwartz (eschwartz) - Monday, 16 November 2020, 17:07 GMT
I hear your argument about easing the tracing of dependencies by e.g. upstream python people who don't necessarily know the intricacies of archlinux.

That being said, having a base system libc isn't something that will ever go away. :p
Comment by Eli Schwartz (eschwartz) - Monday, 16 November 2020, 17:08 GMT
  • Field changed: Task Type (Bug Report → Feature Request)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Severity (Low → Very Low)
  • Task assigned to Felix Yan (felixonmars)
Let's see what the package maintainer thinks I guess.

Loading...