Skip to content
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-76785: Fixes for test.support.interpreters #112982

Merged
merged 26 commits into from
Dec 12, 2023

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Dec 11, 2023

This involves a number of changes for PEP 734.

@ericsnowcurrently ericsnowcurrently merged commit 86a77f4 into python:main Dec 12, 2023
30 checks passed
@ericsnowcurrently ericsnowcurrently deleted the pep-734-updates branch December 12, 2023 15:24
@bedevere-bot
Copy link

⚠️⚠️⚠️ 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)

@ericsnowcurrently
Copy link
Member Author

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

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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)

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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)

ericsnowcurrently added a commit that referenced this pull request Dec 12, 2023
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
Copy link

⚠️⚠️⚠️ 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)

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
Copy link
Member

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.

Copy link
Member Author

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.

ericsnowcurrently added a commit that referenced this pull request Dec 13, 2023
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
…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
…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
Copy link

bedevere-app bot commented Dec 25, 2023

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

serhiy-storchaka pushed a commit that referenced this pull request Dec 25, 2023
…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
…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
…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
This involves a number of changes for PEP 734.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…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
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
This involves a number of changes for PEP 734.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants