Skip to content

Conversation

@dr-carlos
Copy link
Contributor

@dr-carlos dr-carlos commented Nov 13, 2025

@dr-carlos
Copy link
Contributor Author

I don't think this needs a news entry since it's an internal semantics change. Technically the function can now raise an error, but as previously explained, I can't find any way to actually cause that to occur.

@dr-carlos dr-carlos force-pushed the annolib-build-closure branch from 62c90df to 93083ce Compare November 13, 2025 21:57
@dr-carlos
Copy link
Contributor Author

Unsure as to why test_import is failing - it succeeds locally with python -m test -v test_import test_import

@JelleZijlstra
Copy link
Member

0:07:02 load avg: 3.91 [256/497/1] test_import failed (1 failure)
test test_import failed -- Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Lib/test/support/__init__.py", line 1327, in wrapper
    func(self)
    ~~~~^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/test/test_import/__init__.py", line 3319, in test_basic_multiple_interpreters_deleted_no_reset
    self.check_copied(loaded_interp1, base)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython/Lib/test/test_import/__init__.py", line 2981, in check_copied
    self.assertNotEqual(snap.id, base.snapshot.id)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 139871758231760 == 139871758231760

Wonder if it's a latent failure unrelated to this change.

@johnslavik
Copy link
Contributor

Wonder if it's a latent failure unrelated to this change.

See also #141545

@JelleZijlstra JelleZijlstra merged commit a35c683 into python:main Nov 20, 2025
44 checks passed
@miss-islington-app
Copy link

Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 20, 2025
…._build_closure()` (pythonGH-141490)

(cherry picked from commit a35c683da55e77c96828fd0421640787337cfc64)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Nov 20, 2025

GH-141776 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 20, 2025
JelleZijlstra pushed a commit that referenced this pull request Nov 20, 2025
…b._build_closure()` (GH-141490) (#141776)

gh-141489: Simplify closure/freevar iteration in `annotationlib._build_closure()` (GH-141490)
(cherry picked from commit a35c683)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
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