-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() #136117
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
Conversation
On Windows, test_zoneinfo.test_bad_keys() fails without this fix if tzdata is installed.
test_zoneinfo.test_bad_keys() pass with this fix (if tzdata is installed).
|
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.
LGTM
Test fail is unrelated, and there is no need to add another test since this is covered by existing ones as you noted. Though I would not mind if there was a comment explaining why this is done. e.g.
# Workaround for Windows, see gh-85702
I added a comment. |
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.
I think there should be a test for this on Windows.
Misc/NEWS.d/next/Library/2025-06-30-11-12-24.gh-issue-85702.0Lrbwu.rst
Outdated
Show resolved
Hide resolved
There already was, see Victor's comment: #136117 (comment) So I assume we have no CI/Buildbots with tzdata installed. |
Yeah, I know, intuition is telling me that we don't want tests that incidentally catch a bug. But I didn't realize that there aren't buildbots with tzdata installed, so I guess it's a moot point. |
…rbwu.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
There is already test_zoneinfo.test_bad_keys(). |
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.
LGTM as well. Looking at the test, it does seem to be exercising exactly what I'd wanted. We should probably try to get tzdata installed on one of the Windows buildbots.
I hope I get a definitive reply to my question on the Discord... I can install it on mine but I will probably have to drop it to unstable. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…onGH-136117) (cherry picked from commit ee47670) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sorry, @vstinner, I could not cleanly backport this to
|
GH-136128 is a backport of this pull request to the 3.14 branch. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…onGH-136117) (cherry picked from commit ee47670) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
GH-136136 is a backport of this pull request to the 3.13 branch. |
Uh oh!
There was an error while loading. Please reload this page.