Open tuukkamustonen opened 1 year ago
In fact, it's a violation of PEP 615 and as such, the package can't work on PEP 615-conformant Linux distributions that do not provide vendored tzdata, such as Gentoo.
Also, I think the bug report is about 3.0.0.
To be honest, I can't figure out what this is supposed to do. It seems to grab the list of timezones from tzdata
, except that tzdata
is not used anywhere else and system zoneinfo
package is used instead which is going to prefer using system tzdata, so the list is effectively meaningless (in the best case it will match zoneinfo.available_timezones()
, in the worst it will be mismatched to timezones actually supported). What's even more confusing is that pendulum.utils._zoneinfo
seems to wrap available_timezones
but it isn't used anywhere else.
[x] I am on the latest Pendulum version.
[x] I have searched the issues of this repo and believe that this is not a duplicate.
OS version and name: Ubuntu 22.04
Pendulum version: 2.1.2
Issue
Pendulum uses
tzdata
package and imports the tzdata in https://github.com/sdispater/pendulum/blob/75a87a4e3cab45c5f9c38ca6060a54337dcadd09/src/pendulum/tz/__init__.py#L28However,
tzdata
package's docs state:Should Pendulum rather look into system provided files first, and only resort to
tzdata
if the data is not found?It's of course easier to just import from Python's
tzdata
package. Simiarly, if system provided data was used as a priority, then there would be need for a mechanism to override the system-provided data with Python'stzdata
package (if OS provided tzdata is too old / incomplete).So, might not be actionable.