Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vstinner commentedJun 30, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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). |
vstinner commentedJun 30, 2025
StanFromIreland left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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-85702vstinner commentedJun 30, 2025
I added a comment. |
ZeroIntensity left 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 OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
StanFromIreland commentedJun 30, 2025
There already was, see Victor's comment:#136117 (comment) So I assume we have no CI/Buildbots with tzdata installed. |
ZeroIntensity commentedJun 30, 2025
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.rstCo-authored-by: Peter Bierma <zintensitydev@gmail.com>
vstinner commentedJun 30, 2025
There is already test_zoneinfo.test_bad_keys(). |
ZeroIntensity left 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.
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.
StanFromIreland commentedJun 30, 2025
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. |
ee47670 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…onGH-136117)(cherry picked from commitee47670)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 the3.14 branch. |
Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…onGH-136117)(cherry picked from commitee47670)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 the3.13 branch. |
…on#136117)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…on#136117)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…on#136117)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…on#136117)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
…on#136117)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.