Uh oh!
There was an error while loading. Please reload this page.
Fix pendulum.tz.timezones() to use system tzdata - #801
Merged
Conversation
mgorny
commented
Mar 13, 2024
ContributorAuthor
Gentle ping. |
Secrus
commented
Dec 17, 2024
Collaborator
@mgorny could you please rebase? |
mgorny
commented
Dec 18, 2024
ContributorAuthor
I can. But since you've already merged |
Secrus
commented
Mar 31, 2025
Collaborator
Hey @mgorny sorry for the delays and merge/rebase mess. I would appreciate a rebase (I won't interfere this time 🙈). |
Secrus
approved these changes
Mar 31, 2025
dvzrv
reviewed
Mar 31, 2025
Uh oh!
There was an error while loading. Please reload this page.
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. Fixespython-pendulum#769
CodSpeed Performance ReportMerging #801 will not alter performanceComparing Summary
|
mgorny
commented
Mar 31, 2025
ContributorAuthor
Rebased, fixed typing and ruff lints, implemented suggestions from @dvzrv. |
Secrus
approved these changes
Mar 31, 2025
Secrus
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me, thank you for your work!
mgorny
commented
Mar 31, 2025
ContributorAuthor
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the
pendulum.tz.available_timezones()to useavailable_timezones()function instead of iterating over the files intzdatapackage. This is more in line with PEP 615, as the system timezone functions will operate on system-provided tzdata when available, and use thetzdatapackage 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
tzdatapackage 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