python3.9+ should be compiled with --with-tzpath option

Bug #1904439 reported by Paul G
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3.9 (Ubuntu)
New
Undecided
Unassigned

Bug Description

PEP 615 added a compile-time option for specifying the location of time zone data, with a primary use case being that it would allow distros to specify where the system-deployed zoneinfo files are.

See https://www.python.org/dev/peps/pep-0615/#compile-time-options and https://docs.python.org/3/library/zoneinfo.html#zoneinfo-data-compile-time-config

Since debian's tzdata is always deployed to /usr/share/zoneinfo, it would be a good idea to compile with --with-tzpath=/usr/share/zoneinfo, so that the default zoneinfo.TZPATH (i.e. the value when the time zone search path is not modified by an environment variable or zoneinfo.reset_tzpath) is ('/usr/share/zoneinfo',) rather than:

('/usr/share/zoneinfo',
'/usr/lib/zoneinfo',
'/usr/share/lib/zoneinfo',
'/etc/zoneinfo')

This will mostly make failed lookups faster, and possibly avoid some bugs that would be hit by users who have some old non-system time zones distributed to one of the other locations.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.