gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload.#122493
Merged
Yhg1s merged 2 commits intopython:mainfrom Jul 31, 2024
Merged
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload.#122493Yhg1s merged 2 commits intopython:mainfrom
Yhg1s merged 2 commits intopython:mainfrom
Conversation
Contributor
Author
|
!buildbot iOS |
|
🤖 New build scheduled with the buildbot fleet by @freakboy3742 for commit 02112a0 🤖 The command will test the builders whose names match following regular expression: The builders matched are:
|
gpshead
approved these changes
Jul 31, 2024
|
Thanks @freakboy3742 for the PR, and @Yhg1s for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-122504 is a backport of this pull request to the 3.13 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-122505 is a backport of this pull request to the 3.12 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-122506 is a backport of this pull request to the 3.11 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-122507 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
Jul 31, 2024
…importlib.reload. (pythonGH-122493) (cherry picked from commit f071f01) Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
GH-122508 is a backport of this pull request to the 3.9 branch. |
|
GH-122509 is a backport of this pull request to the 3.8 branch. |
ambv
pushed a commit
that referenced
this pull request
Aug 2, 2024
ambv
pushed a commit
that referenced
this pull request
Aug 2, 2024
ambv
pushed a commit
that referenced
this pull request
Aug 2, 2024
ambv
pushed a commit
that referenced
this pull request
Aug 2, 2024
blhsing
pushed a commit
to blhsing/cpython
that referenced
this pull request
Aug 22, 2024
…importlib.reload. (python#122493) Co-authored-by: Gregory P. Smith <greg@krypto.org>
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 free
to 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.
#122134 introduced a small change to the operation of the pure-Python
socket.socketpair()method, and added a test for that method. However, the test usedimportlib.reload, which is problematic because there are methods that include import-time binding of symbols like_GLOBAL_DEFAULT_TIMEOUTas default arguments.This manifested as test failures and a test lockup on iOS, but it would likely be possible to manifest similar problems on other platforms.
This PR modifies the
socketmodule so that the pure Python fallback method is always defined, and is monkey patched into place for the pure python test, rather than performing a module reload.Tagged for backport to all releases back to 3.8 because #122134 was back ported to all releases.