It is possible for python_tzpath_context to fail in test_zoneinfo #102537
Copy link
Copy link
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Mar 8, 2023 - added 5 commits that reference this issue
on Mar 10, 2023 Should this issue be closed as resolved?
Yes, let's close it :)
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
This code started failing the
pylintcheck onbackports.zoneinforecently:It's kind of a non-issue, but it is true that if an error is raised while acquiring
OS_ENV_LOCKor when callingos.environ.get,old_envwon't be set, which will raise aNameError. This is a kind of rare situation anyway, and it would probably only come up during a non-recoverable error, but we may as well fix it — if only so that people who use CPython as an example of "good code" will have an example of the right way to handle this sort of situation.Probably this is trivial enough that we can skip an issue and news, but I'll just create one anyway 😛
Linked PRs