GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-76785: Fixes for test.support.interpreters by ericsnowcurrently · Pull Request #112982 · python/cpython

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Dec 11, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This involves a number of changes for PEP 734.

  • Issue: [subinterpreters] PEP 554 implementation: add interpreters module #76785

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ericsnowcurrently added 17 commits November 28, 2023 14:45
@ericsnowcurrently
Make Interpreter() idempotent.
76a7d7b
@ericsnowcurrently
Interpreters are always isolated.
57a3c19
@ericsnowcurrently
interp.id is always int.
747e542
@ericsnowcurrently
Add InterpreterNotFoundError.
0ed9fb0
@ericsnowcurrently
Stop using InterpreterID in _interpreters.
98f9cf3
@ericsnowcurrently
Fix Interpreter.__repr__().
0277878
@ericsnowcurrently
.run() -> .exec_sync()
59c8227
@ericsnowcurrently
RunFailedError -> ExecFailure
fa132a2
@ericsnowcurrently
Add Interpreter.run().
644efa5
@ericsnowcurrently
Make the interpreters module a package.
abf2aa8
@ericsnowcurrently
Add interpreters.Queue.
8ca303f
@ericsnowcurrently
Add memoryview XID with _xxsubinterpreters import.
8b97373
@ericsnowcurrently
Update CODEOWNERS.
cc20f1f
@ericsnowcurrently
Ignore static builtin exception types.
cb0a605
@ericsnowcurrently
Make CODEOWNERS more specific.
62a9bac
@ericsnowcurrently
Fix submodule names.
6c71018
@ericsnowcurrently
Use interpreters.__getattr__() for submodule aliases.
13a44e3
@ericsnowcurrently ericsnowcurrently added the skip news label Dec 11, 2023
@ericsnowcurrently
ericsnowcurrently requested review from ezio-melotti, gvanrossum, hugovk, markshannon and rhettinger as code owners December 11, 2023 23:13
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 11, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Dec 11, 2023
[subinterpreters] PEP 554 implementation: add interpreters module #76785
Closed
@ericsnowcurrently
ericsnowcurrently removed request for gvanrossum, markshannon and rhettinger December 11, 2023 23:13
ericsnowcurrently added 2 commits December 11, 2023 16:18
@ericsnowcurrently
Fix InterpreterIDTests.
c9d15d2
@ericsnowcurrently
LONG_LONG_MAX -> LLONG_MAX
1c76c4a
@ericsnowcurrently
Fix TestInterpreterRun.
778276f
@ericsnowcurrently
ericsnowcurrently removed request for brettcannon, ncoghlan and warsaw December 12, 2023 15:24
@ericsnowcurrently
ericsnowcurrently merged commit 86a77f4 into python:main Dec 12, 2023
@ericsnowcurrently
ericsnowcurrently deleted the pep-734-updates branch December 12, 2023 15:24
@bedevere-app bedevere-app Bot removed the awaiting core review label Dec 12, 2023
@bedevere-bot

bedevere-bot commented Dec 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Clang Installed 3.x has failed when building commit 86a77f4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/531/builds/4959) and take a look at the build logs.
  4. Check if the failure is related to this commit (86a77f4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/531/builds/4959

Failed tests:

  • test_threading

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 178, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 125, in _load_run_test
    test_mod = importlib.import_module(module_name)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1011, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/test_threading.py", line 30, in <module>
    from test.support import interpreters
ImportError: cannot import name 'interpreters' from 'test.support' (/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.clang-installed/build/target/lib/python3.13/test/support/__init__.py)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ericsnowcurrently ericsnowcurrently mentioned this pull request Dec 12, 2023
gh-76785: Fix test_threading on Non-Subinterpreter Builds #113014
Merged
@ericsnowcurrently

ericsnowcurrently commented Dec 12, 2023

Copy link
Copy Markdown
Member Author

I have a fix for the buildbot failure in gh-113014.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Dec 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable Clang Installed 3.x has failed when building commit 86a77f4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/350/builds/5021) and take a look at the build logs.
  4. Check if the failure is related to this commit (86a77f4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/350/builds/5021

Failed tests:

  • test_threading

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 178, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 125, in _load_run_test
    test_mod = importlib.import_module(module_name)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1011, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.13/test/test_threading.py", line 30, in <module>
    from test.support import interpreters
ImportError: cannot import name 'interpreters' from 'test.support' (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.13/test/support/__init__.py)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Dec 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang Installed 3.x has failed when building commit 86a77f4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/14/builds/5056) and take a look at the build logs.
  4. Check if the failure is related to this commit (86a77f4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/14/builds/5056

Failed tests:

  • test_threading

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 178, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 125, in _load_run_test
    test_mod = importlib.import_module(module_name)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1011, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/test_threading.py", line 30, in <module>
    from test.support import interpreters
ImportError: cannot import name 'interpreters' from 'test.support' (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang-installed/build/target/lib/python3.13/test/support/__init__.py)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ericsnowcurrently added a commit that referenced this pull request Dec 12, 2023
@ericsnowcurrently
gh-76785: Fix test_threading on Non-Subinterpreter Builds (gh-113014)
cde1417
gh-112982 broke test_threading on one of the s390 buildbots (Fedora Clang Installed).  Apparently ImportError is raised (rather than ModuleNotFoundError) for the name part of "from" imports.  This fixes that by catching ImportError in test_threading.py.
@bedevere-bot

bedevere-bot commented Dec 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora Stable Clang Installed 3.x has failed when building commit 86a77f4.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/451/builds/3930) and take a look at the build logs.
  4. Check if the failure is related to this commit (86a77f4) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/451/builds/3930

Failed tests:

  • test_threading

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 178, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/test/libregrtest/single.py", line 125, in _load_run_test
    test_mod = importlib.import_module(module_name)
               ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1011, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/test/test_threading.py", line 30, in <module>
    from test.support import interpreters
ImportError: cannot import name 'interpreters' from 'test.support' (/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le.clang-installed/build/target/lib/python3.13/test/support/__init__.py)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ezio-melotti
ezio-melotti reviewed Dec 12, 2023
View reviewed changes
Comment thread .github/CODEOWNERS
Comment on lines +156 to +164
Doc/**/*queue* @rhettinger
PCbuild/**/*queue* @rhettinger
Modules/_queuemodule.c @rhettinger
Lib/*queue*.py @rhettinger
Lib/asyncio/*queue*.py @rhettinger
Lib/multiprocessing/*queue*.py @rhettinger
Lib/test/*queue*.py @rhettinger
Lib/test_asyncio/*queue*.py @rhettinger
Lib/test_multiprocessing/*queue*.py @rhettinger

@ezio-melotti ezio-melotti Dec 12, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last matching pattern in CODEOWNERS takes the precedence, so you can do:

**/*queue*                    @rhettinger
support/interpreters/queues.py  @ericsnowcurrently

to set @rhettinger as owner of all the *queue* files except support/interpreters/queues.py, which will be owned by @ericsnowcurrently instead.

Moving the subinterpreter section after the **/*queue* line should also override the owner for support/interpreters/queues.py without further changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@ericsnowcurrently ericsnowcurrently Dec 12, 2023

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought there was something like that but I couldn't find it via web search. Thanks for explaining. I'll fix it in a follow-up PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ezio-melotti reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ericsnowcurrently ericsnowcurrently mentioned this pull request Dec 13, 2023
gh-76785: Fix CODEOWNERS #113038
Merged
ericsnowcurrently added a commit that referenced this pull request Dec 13, 2023
@ericsnowcurrently
gh-76785: Fix CODEOWNERS (gh-113038)
480b4b3
In gh-112982 I made some changes to .github/CODEOWNERS.  Later, @ezio-melotti pointed out that some of those changes were unnecessary.
jeff5 added a commit to jeff5/cpython that referenced this pull request Dec 25, 2023
@jeff5
[3.12] pythongh-76785: Make test.test_interpreters executable (python…
761c71d
…GH-112982)

This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4,
where it is implemnented by a package __main__.py.
jeff5 added a commit to jeff5/cpython that referenced this pull request Dec 25, 2023
@jeff5
[3.12] pythongh-76785: Make test.test_interpreters executable (python…
9813e02
…GH-112982)

This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4,
where it is implemented by a package __main__.py.
@bedevere-app

bedevere-app Bot commented Dec 25, 2023

Copy link
Copy Markdown

GH-113470 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jeff5 jeff5 mentioned this pull request Dec 25, 2023
[3.12] gh-76785: Make test.test_interpreters executable (GH-112982) #113470
Merged
serhiy-storchaka pushed a commit that referenced this pull request Dec 25, 2023
@jeff5
[3.12] gh-76785: Make test.test_interpreters executable (GH-112982) (G…
bdad5c3
…H-113470)

This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4,
where it is implemented by a package __main__.py.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 25, 2023
@jeff5 @miss-islington
[3.12] pythongh-76785: Make test.test_interpreters executable (python…
94365bc
…GH-112982) (pythonGH-113470)

This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4,
where it is implemented by a package __main__.py.
(cherry picked from commit bdad5c3)

Co-authored-by: Jeff Allen <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request Dec 25, 2023
@miss-islington @jeff5
[3.11] gh-76785: Make test.test_interpreters executable (GH-112982) (G…
1162d29
…H-113470) (GH-113473)

This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4,
where it is implemented by a package __main__.py.
(cherry picked from commit bdad5c3)

Co-authored-by: Jeff Allen <[email protected]>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-76785: Fixes for test.support.interpreters (pythongh-112982)
c00f567
This involves a number of changes for PEP 734.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-76785: Fix test_threading on Non-Subinterpreter Builds (pyth…
c2caa6f
…ongh-113014)

pythongh-112982 broke test_threading on one of the s390 buildbots (Fedora Clang Installed).  Apparently ImportError is raised (rather than ModuleNotFoundError) for the name part of "from" imports.  This fixes that by catching ImportError in test_threading.py.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@ericsnowcurrently @aisk
pythongh-76785: Fix CODEOWNERS (pythongh-113038)
e40a54d
In pythongh-112982 I made some changes to .github/CODEOWNERS.  Later, @ezio-melotti pointed out that some of those changes were unnecessary.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ericsnowcurrently @Glyphack
pythongh-76785: Fixes for test.support.interpreters (pythongh-112982)
56d2ce0
This involves a number of changes for PEP 734.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ericsnowcurrently @Glyphack
pythongh-76785: Fix test_threading on Non-Subinterpreter Builds (pyth…
6e38b20
…ongh-113014)

pythongh-112982 broke test_threading on one of the s390 buildbots (Fedora Clang Installed).  Apparently ImportError is raised (rather than ModuleNotFoundError) for the name part of "from" imports.  This fixes that by catching ImportError in test_threading.py.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@ericsnowcurrently @Glyphack
pythongh-76785: Fix CODEOWNERS (pythongh-113038)
8a0ff75
In pythongh-112982 I made some changes to .github/CODEOWNERS.  Later, @ezio-melotti pointed out that some of those changes were unnecessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ezio-melotti ezio-melotti ezio-melotti left review comments
@hugovk hugovk Awaiting requested review from hugovk hugovk is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ericsnowcurrently @bedevere-bot @ezio-melotti
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.