-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
GH-102537: Handle check for PYTHONTZPATH failing in zoneinfo test #102538
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
It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway.
@hugovk Do you mind taking a look at the strategy here? There's an equivalent PR for I figure it's likely to get more attention over here, so we can do the review here and incorporate any changes made here over there if necessary. |
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.
👍
Thanks @pganssle for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
GH-102586 is a backport of this pull request to the 3.11 branch. |
GH-102587 is a backport of this pull request to the 3.10 branch. |
…st (pythonGH-102538) It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway. (cherry picked from commit 64bde50) Co-authored-by: Paul Ganssle <[email protected]>
…st (pythonGH-102538) It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway. (cherry picked from commit 64bde50) Co-authored-by: Paul Ganssle <[email protected]>
…-102538) It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway. (cherry picked from commit 64bde50) Co-authored-by: Paul Ganssle <[email protected]>
…-102538) It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action. Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway. (cherry picked from commit 64bde50) Co-authored-by: Paul Ganssle <[email protected]>
It is possible but unlikely for the
python_tzpath_context
function to fail between the start of thetry
block and the point whereos.environ.get
succeeds, in which caseold_env
will be undefined. In this case, we want to take no action.Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway.
Automerge-Triggered-By: GH:pganssle