-
-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pendulum.tz.timezones()
to use system tzdata
#801
Conversation
Gentle ping. |
@mgorny could you please rebase? |
I can. But since you've already merged |
Hey @mgorny sorry for the delays and merge/rebase mess. I would appreciate a rebase (I won't interfere this time 🙈). |
Fix the `pendulum.tz.available_timezones()` to use `available_timezones()` function instead of iterating over the files in `tzdata` package. This is more in line with PEP 615, as the system timezone functions will operate on system-provided tzdata when available, and use the `tzdata` package only if it's not available. Therefore, the previous code would yield a potentially different list of timezones than the system actually provides. Furthermore, Gentoo provides a dummy `tzdata` package that does not provide any data, since Python always uses system tzdata. This change is necessary to make pendulum work again on Gentoo. Fixes python-pendulum#769
CodSpeed Performance ReportMerging #801 will not alter performanceComparing Summary
|
Rebased, fixed typing and ruff lints, implemented suggestions from @dvzrv. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you for your work!
Thanks! |
Fix the
pendulum.tz.available_timezones()
to useavailable_timezones()
function instead of iterating over the files intzdata
package. This is more in line with PEP 615, as the system timezone functions will operate on system-provided tzdata when available, and use thetzdata
package only if it's not available. Therefore, the previous code would yield a potentially different list of timezones than the system actually provides.Furthermore, Gentoo provides a dummy
tzdata
package that does not provide any data, since Python always uses system tzdata. This change is necessary to make pendulum work again on Gentoo.Fixes #769
Pull Request Check List