8000 [3.8] bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786) by miss-islington · Pull Request #18787 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.8] bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. (GH-18786) #18787

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

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

miss-islington
Copy link
Contributor
@miss-islington miss-islington commented Mar 5, 2020

list(sys.modules.items()) was apparently not immune to "dictionary
changed size during iteration" errors.

Tested internally using an integration test that has run into this a couple of times in the past two years. With this patch applied, the test is no longer flaky.
(cherry picked from commit 85cf1d5)

Co-authored-by: Gregory P. Smith gps@google.com

https://bugs.python.org/issue13487

Automerge-Triggered-By: @gpshead

…afety. (pythonGH-18786)

`list(sys.modules.items())` was apparently not immune to "dictionary
changed size during iteration" errors.

Tested internally using an integration test that has run into this a couple of times in the past two years.  With this patch applied, the test is no longer flaky.
(cherry picked from commit 85cf1d5)

Co-authored-by: Gregory P. Smith <gps@google.com>
@miss-islington
Copy link
Contributor Author

@gpshead: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 6b452ff into python:3.8 Mar 5, 2020
@miss-islington miss-islington deleted the backport-85cf1d5-3.8 branch March 5, 2020 01:04
@miss-islington
Copy link
Contributor Author

@gpshead: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@gpshead: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0