You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is generally recommended that any time zone libraries should attempt to use the system data before using the tzdata package
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's tzdata package (if OS provided tzdata is too old / incomplete).
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.
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.
Activity
mgorny commentedon Dec 17, 2023
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.
mgorny commentedon Dec 17, 2023
Also, I think the bug report is about 3.0.0.
mgorny commentedon Dec 17, 2023
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 thattzdatais not used anywhere else and systemzoneinfopackage is used instead which is going to prefer using system tzdata, so the list is effectively meaningless (in the best case it will matchzoneinfo.available_timezones(), in the worst it will be mismatched to timezones actually supported). What's even more confusing is thatpendulum.utils._zoneinfoseems to wrapavailable_timezonesbut it isn't used anywhere else.Fix `pendulum.tz.timezones()` to use system tzdata
Fix `pendulum.tz.timezones()` to use system tzdata
Fix `pendulum.tz.timezones()` to use system tzdata (python-pendulum#801)