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-159963: Don't hold parent package import locks while a submodule executes by gpshead · Pull Request #159965 · python/cpython

Conversation

@gpshead

@gpshead gpshead commented Oct 20, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Since gh-83065, the first import of pkg.mod kept pkg's module lock until pkg/mod.py had finished executing. This shipped in 3.15.0. Threads needing only the finished pkg were blocked for that long, and concurrent first imports could raise _DeadlockError or a spurious "partially initialized module" ImportError, or hang, with no import cycle involved.

Parent packages are now imported, or waited for, before the submodule's lock is taken, and only that lock is held while it executes. The original gh-83065 deadlock stays fixed.

importlib.import_module() now returns the partially initialized module in a cross-thread circular import, as the import statement already did, instead of raising _DeadlockError. This part is not the 3.15.0 regression: import_module() has raised _DeadlockError there since at least 3.12 (3.12, 3.13, 3.14 and main all do), so it can be judged separately for the backport.

Two threads, step by step

The scenario from test_concurrent_first_imports_of_sibling_packages: nothing is imported yet, a/leaf.py does from b.leaf import X and b/__init__.py does import a. The dependencies are a.leaf → b.leaf → b → a, so there is no import cycle. Thread 2 starts while thread 1 is still inside a/__init__.py.

Before (3.15.0)After (this PR)
sequenceDiagram
    participant T1 as Thread 1<br/>import a.leaf
    participant T2 as Thread 2<br/>import b.leaf
    Note over T1: 1. acquire locks a and a.leaf<br/>run a/__init__.py
    Note over T2: 2. acquire locks b and b.leaf<br/>run b/__init__.py (import a)
    T2-->>T1: 3. wait for lock a
    Note over T1: 4. a/__init__.py returns<br/>lock a is NOT released<br/>run a/leaf.py (from b.leaf import X)
    T1--xT2: 5. needs lock b.leaf, but T2 is waiting on T1
    Note over T1: 6. _DeadlockError
Loading
sequenceDiagram
    participant T1 as Thread 1<br/>import a.leaf
    participant T2 as Thread 2<br/>import b.leaf
    Note over T1: 1. acquire lock a<br/>run a/__init__.py
    Note over T2: 2. acquire lock b<br/>run b/__init__.py (import a)
    T2-->>T1: 3. wait for lock a
    Note over T1: 4. a/__init__.py returns<br/>release lock a
    Note over T1: 5. acquire lock a.leaf<br/>run a/leaf.py (from b.leaf import X)
    Note over T2: 6. a is ready, b/__init__.py returns, release lock b<br/>acquire lock b.leaf, run b/leaf.py
    T1-->>T2: 7. wait for lock b.leaf
    Note over T2: 8. release lock b.leaf<br/>import b.leaf done
    Note over T1: 9. X imported, release lock a.leaf<br/>import a.leaf done
Loading

Before, thread 1 keeps lock a after a/__init__.py has returned, so thread 2, which needs only the finished a, stays blocked while holding the locks thread 1 needs next. After, each thread holds one module lock at a time and both imports complete. Steps 5 to 8 of the right-hand side can interleave differently (thread 1 may load b.leaf itself); either way neither thread waits on a lock while holding one the other needs.


authored using Claude Fable

  • Issue: 3.15 regression: concurrent first imports can fail or hang without any import cycle #159963

Sorry, something went wrong.

Uh oh!

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

All reactions
@gpshead
pythongh-159963: Don't hold parent package import locks while a submo…
fea385a
…dule executes

Since pythongh-83065, the first import of pkg.mod kept pkg's module lock
until pkg/mod.py had finished executing.  Threads needing only the
finished pkg were blocked for that long, and concurrent first imports
could raise _DeadlockError or a spurious "partially initialized module"
ImportError, or hang, with no import cycle involved.

Parent packages are now imported, or waited for, before the submodule's
lock is taken, and only that lock is held while it executes.  The
original pythongh-83065 deadlock stays fixed.

importlib.import_module() now returns the partially initialized module
in a cross-thread circular import, as the import statement already did,
instead of raising _DeadlockError.
@gpshead gpshead self-assigned this Oct 20, 2026
@gpshead gpshead added the needs backport to 3.15 bugs and security fixes label Oct 20, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Oct 20, 2026
3.15 regression: concurrent first imports can fail or hang without any import cycle #159963
Closed
@read-the-docs-community

read-the-docs-community Bot commented Oct 20, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35310738 | 📁 Comparing 5d2a312 against main (80040b6)

  🔍 Preview build  

45 files changed · + 1 added · ± 44 modified

+ Added

  • c-api/pyexpat.html

± Modified

  • c-api/code.html
  • c-api/conversion.html
  • c-api/dict.html
  • c-api/exceptions.html
  • c-api/file.html
  • c-api/function.html
  • c-api/hash.html
  • c-api/import.html
  • c-api/intro.html
  • c-api/iterator.html
  • and 34 more...
All reactions

Sorry, something went wrong.

Uh oh!

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

@gpshead
Simplify the NEWS, What's New and comment wording
7449736
Address review: shorten the NEWS entry per the updated devguide guidance,
reword the What's New entry, and trim the _resolve_parents() docstring and
the parent fallback comment in _find_and_load_unlocked().
gpshead
gpshead commented Oct 21, 2026
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

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

Comment thread Lib/importlib/_bootstrap.py Resolved

Uh oh!

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

Comment thread Lib/importlib/_bootstrap.py Resolved

Uh oh!

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

Comment thread Lib/importlib/_bootstrap.py Resolved

Uh oh!

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

Comment thread Misc/NEWS.d/next/Core_and_Builtins/2026-10-20-22-00-00.gh-issue-159963.pLkHld.rst Resolved

Uh oh!

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

@gpshead
Merge branch 'main' into import-parent-locks-regression
5d2a312
gpshead
gpshead commented Oct 21, 2026
View reviewed changes
Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

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

gpshead added 3 commits October 21, 2026 22:01
@gpshead
drop the What's New entry
f4070d1
@gpshead
Remove two tests that duplicate coverage of others
a1269ba
test_concurrent_first_imports_no_partial_module is the depth-one form of
test_concurrent_first_imports_of_nested_packages, and
test_waiters_recover_after_failed_package_init failed only where
test_package_init_imports_submodule_deterministic already does.
@gpshead
Test the import of a parent package removed before its submodule loads
48734db
gpshead
gpshead commented Oct 22, 2026
View reviewed changes
Comment thread Lib/importlib/_bootstrap.py Resolved

Uh oh!

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

Comment thread Lib/test/test_importlib/test_threaded_import.py Resolved

Uh oh!

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

@gpshead
Use comments rather than docstrings for internal helpers
8d87716
@gpshead
gpshead marked this pull request as ready for review October 22, 2026 23:32
@gpshead
gpshead requested review from FFY00, brettcannon, ericsnowcurrently, ncoghlan and warsaw as code owners October 22, 2026 23:32
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 22, 2026
@gpshead
gpshead requested a review from emmatyping October 22, 2026 23:39
@gpshead

gpshead commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

@emmatyping volunteered as review tribute at the sprint 😅

All reactions

Sorry, something went wrong.

Uh oh!

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

@gpshead gpshead assigned emmatyping Oct 23, 2026
@gpshead gpshead added the sprint label Oct 23, 2026
@github-project-automation github-project-automation Bot added this to Sprint Oct 23, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Sprint Oct 23, 2026
emmatyping
emmatyping reviewed Oct 23, 2026
View reviewed changes
Comment thread Lib/importlib/_bootstrap.py Resolved

Uh oh!

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

@gpshead
Don't return a module another thread has begun loading again
e0982d9
After waiting for a module that another thread was executing,
_find_and_load() looked in sys.modules again only after releasing the
module's lock.  If that import had failed and a thread had already begun
retrying it, the waiter returned the new, still executing module.  Look
while still holding the lock.

Reported by Emma Smith in review of pythonGH-159965.
@gpshead
gpshead merged commit 7159b15 into python:main Oct 25, 2026
53 checks passed

Uh oh!

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

@github-project-automation github-project-automation Bot moved this from Todo to Done in Sprint Oct 25, 2026
@miss-islington-app

miss-islington-app Bot commented Oct 25, 2026

Copy link
Copy Markdown

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Oct 25, 2026
@bedevere-app

bedevere-app Bot commented Oct 25, 2026

Copy link
Copy Markdown

GH-160630 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 25, 2026
@gpshead
gpshead deleted the import-parent-locks-regression branch October 25, 2026 00:07
gpshead added a commit that referenced this pull request Oct 25, 2026
@miss-islington @gpshead
[3.15] gh-159963: Don't hold parent package import locks while a subm…
3255d5d
…odule executes (GH-159965) (#160630)

gh-159963: Don't hold parent package import locks while a submodule executes (GH-159965)

Since gh-83065 (3.15.0), the first import of pkg.mod kept pkg's module
lock until pkg/mod.py had finished executing.  Threads that needed only
the finished pkg stayed blocked for that long, and concurrent first
imports could raise _DeadlockError or a spurious "partially initialized
module" ImportError, or hang, with no import cycle involved.

Parent packages are now imported, or waited for if another thread is
initializing them, before the submodule's module lock is taken, so only
that lock is held while the submodule executes.  The lock ordering
deadlock fixed by gh-83065 stays fixed.

importlib.import_module() now returns the partially initialized module
in a circular import split across threads, as the import statement
already did, instead of raising _DeadlockError.  That was long-standing
behavior rather than part of the 3.15.0 regression.
(cherry picked from commit 7159b15)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot

bedevere-bot commented Oct 25, 2026

Copy link
Copy Markdown

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

Hi! The buildbot ARM64 macOS 3.15 (tier-1) has failed when building commit 3255d5d.

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/#/builders/2118/builds/782) and take a look at the build logs.
  4. Check if the failure is related to this commit (3255d5d) 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/#/builders/2118/builds/782

Failed tests:

  • test_zipimport

Failed subtests:

  • testGetCompiledSource - test.test_zipimport.DeflateCompressedZipImportTestCase.testGetCompiledSource
  • testBoth - test.test_zipimport.UncompressedZipImportTestCase.testBoth
  • testGetCompiledSource - test.test_zipimport.UncompressedZipImportTestCase.testGetCompiledSource
  • testGetCompiledSource - test.test_zipimport.ZStdCompressedZipImportTestCase.testGetCompiledSource
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.UncompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.ZStdCompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc
  • testBoth - test.test_zipimport.DeflateCompressedZipImportTestCase.testBoth
  • testBoth - test.test_zipimport.ZStdCompressedZipImportTestCase.testBoth
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.DeflateCompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[70 chars]ild/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/Use[70 chars]ild/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                                        +


Traceback (test.test_zipimport.UncompressedZipImportTestCase.testTraceback) ... ok


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[62 chars]build/build/test_python_52759æ/junk95142.zip/ziptestmodule.py' != '/Use[62 chars]build/build/test_python_52759æ/junk95142.zip/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                                                +


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[62 chars]build/build/test_python_49430æ/junk95142.zip/ziptestmodule.py' != '/Use[62 chars]build/build/test_python_49430æ/junk95142.zip/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                                                +


Traceback (test.test_zipimport.ZStdCompressedZipImportTestCase.testTraceback) ... ok


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[70 chars]ild/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/Use[70 chars]ild/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_49430æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                                        +


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[70 chars]ild/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/Use[70 chars]ild/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                                        +


Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/Use[70 chars]ild/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/Use[70 chars]ild/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /Users/buildbot/buildarea/3.15.pablogsal-macos-m1.macos-with-brew/build/build/test_python_52759æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                                        +


Traceback (test.test_zipimport.DeflateCompressedZipImportTestCase.testTraceback) ... ok
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Oct 25, 2026

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 FreeBSD15 3.15 (tier-3) has failed when building commit 3255d5d.

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/#/builders/2097/builds/768) and take a look at the build logs.
  4. Check if the failure is related to this commit (3255d5d) 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/#/builders/2097/builds/768

Failed tests:

  • test_zipimport

Failed subtests:

  • testGetCompiledSource - test.test_zipimport.DeflateCompressedZipImportTestCase.testGetCompiledSource
  • testBoth - test.test_zipimport.UncompressedZipImportTestCase.testBoth
  • testGetCompiledSource - test.test_zipimport.UncompressedZipImportTestCase.testGetCompiledSource
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.UncompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc
  • testBoth - test.test_zipimport.DeflateCompressedZipImportTestCase.testBoth
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.DeflateCompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc

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

==

Click to see traceback logs
Traceback (test.test_zipimport.UncompressedZipImportTestCase.testTraceback) ... ok


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[38 chars]/build/build/test_python_8559æ/junk95142.zip/ziptestmodule.py' != '/hom[38 chars]/build/build/test_python_8559æ/junk95142.zip/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                        +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[46 chars]uild/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[46 chars]uild/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                +


Traceback (test.test_zipimport.ZStdCompressedZipImportTestCase.testTraceback) ... skipped 'requires zstd'


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[38 chars]/build/build/test_python_5072æ/junk95142.zip/ziptestmodule.py' != '/hom[38 chars]/build/build/test_python_5072æ/junk95142.zip/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                        +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[46 chars]uild/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[46 chars]uild/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_5072æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[46 chars]uild/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[46 chars]uild/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd15/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[46 chars]uild/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[46 chars]uild/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd15/build/build/test_python_8559æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                +


Traceback (test.test_zipimport.DeflateCompressedZipImportTestCase.testTraceback) ... ok
All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot

bedevere-bot commented Oct 25, 2026

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 FreeBSD16 3.15 (tier-3) has failed when building commit 3255d5d.

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/#/builders/2103/builds/246) and take a look at the build logs.
  4. Check if the failure is related to this commit (3255d5d) 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/#/builders/2103/builds/246

Failed tests:

  • test_zipimport

Failed subtests:

  • testGetCompiledSource - test.test_zipimport.DeflateCompressedZipImportTestCase.testGetCompiledSource
  • testBoth - test.test_zipimport.UncompressedZipImportTestCase.testBoth
  • testGetCompiledSource - test.test_zipimport.UncompressedZipImportTestCase.testGetCompiledSource
  • testGetCompiledSource - test.test_zipimport.ZStdCompressedZipImportTestCase.testGetCompiledSource
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.UncompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.ZStdCompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc
  • testBoth - test.test_zipimport.DeflateCompressedZipImportTestCase.testBoth
  • testBoth - test.test_zipimport.ZStdCompressedZipImportTestCase.testBoth
  • test_syntax_error_in_source_with_valid_pyc - test.test_zipimport.DeflateCompressedZipImportTestCase.test_syntax_error_in_source_with_valid_pyc

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

==

Click to see traceback logs
Traceback (test.test_zipimport.UncompressedZipImportTestCase.testTraceback) ... ok


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[39 chars]build/build/test_python_82079æ/junk95142.zip/ziptestmodule.py' != '/hom[39 chars]build/build/test_python_82079æ/junk95142.zip/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                         +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 286, in test_syntax_error_in_source_with_valid_pyc
    self.assertEqual(spec.origin, expected_path)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[39 chars]build/build/test_python_72052æ/junk95142.zip/ziptestmodule.py' != '/hom[39 chars]build/build/test_python_72052æ/junk95142.zip/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/ziptestmodule.pyc
?                                                                                                         +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[47 chars]ild/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[47 chars]ild/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                 +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[47 chars]ild/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[47 chars]ild/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                 +


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 315, in testBoth
    self.doTest(pyc_ext, files, TESTMOD)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[47 chars]ild/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[47 chars]ild/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_72052æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                 +


Traceback (test.test_zipimport.ZStdCompressedZipImportTestCase.testTraceback) ... ok


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 877, in testGetCompiledSource
    self.doTest(pyc_ext, files, TESTMOD, call=self.assertModuleSource)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 160, in doTest
    self.doTestWithPreBuiltZip(expected_ext, *modules, **kw)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.15.opsec-fbsd16/build/Lib/test/test_zipimport.py", line 174, in doTestWithPreBuiltZip
    self.assertEqual(file, os.path.join(zip_path,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                         *modules) + expected_ext)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '/hom[47 chars]ild/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.py' != '/hom[47 chars]ild/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.pyc'
- /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.py
+ /home/buildbot/buildarea/3.15.opsec-fbsd16/build/build/test_python_82079æ/junk95142.zip/pre/fix/ziptestmodule.pyc
?                                                                                                                 +


Traceback (test.test_zipimport.DeflateCompressedZipImportTestCase.testTraceback) ... ok
All reactions

Sorry, something went wrong.

Uh oh!

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

@RoryGlenn RoryGlenn mentioned this pull request Oct 29, 2026
Add isolated large-project benchmark cases with fair grading and reproducible qualification RoryGlenn/agent-toolkit#5
Open
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@emmatyping emmatyping emmatyping left review comments
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
@FFY00 FFY00 Awaiting requested review from FFY00 FFY00 is a code owner

Uh oh!

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

Assignees

@gpshead gpshead

@emmatyping emmatyping

Labels

sprint

Projects

Sprint
Archived in project

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

@gpshead @bedevere-bot @emmatyping
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.