-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. #122493
Conversation
!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:
|
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. |
…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>
…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. |
…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. |
…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. |
…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. |
…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. |
…importlib.reload. (python#122493) Co-authored-by: Gregory P. Smith <greg@krypto.org>
#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_TIMEOUT
as 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
socket
module 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.