Uh oh!
There was an error while loading. Please reload this page.
GH-102537: Handle check for PYTHONTZPATH failing in zoneinfo test - #102538
Merged
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.
pganssle
commented
Mar 8, 2023
MemberAuthor
@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. |
miss-islington
commented
Mar 10, 2023
Contributor
Thanks @pganssle for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
bedevere-bot
commented
Mar 10, 2023
GH-102586 is a backport of this pull request to the 3.11 branch. |
bedevere-bot
commented
Mar 10, 2023
GH-102587 is a backport of this pull request to the 3.10 branch. |
miss-islington pushed a commit
to miss-islington/cpython
that referenced
this pull request
Mar 10, 2023
…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 <1377457+pganssle@users.noreply.github.com>
miss-islington pushed a commit
to miss-islington/cpython
that referenced
this pull request
Mar 10, 2023
…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 <1377457+pganssle@users.noreply.github.com>
miss-islington added a commit
that referenced
this pull request
Mar 10, 2023
…-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 <1377457+pganssle@users.noreply.github.com>
miss-islington added a commit
that referenced
this pull request
Mar 13, 2023
…-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 <1377457+pganssle@users.noreply.github.com>
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.
It is possible but unlikely for the
python_tzpath_contextfunction to fail between the start of thetryblock and the point whereos.environ.getsucceeds, in which caseold_envwill 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