GeezerVison is showing github.com — gh-137969: Fix double evaluation of `ForwardRef`s which rely on globals by dr-carlos · Pull Request #140974 · python/cpython
Conversation
dr-carlos
commented
Nov 4, 2025
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks! Could you also add a unit test asserting that if a locals dictionary is passed in, it's not modified?
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dr-carlos reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thanks! Could you also add a unit test asserting that if a locals dictionary is passed in, it's not modified?
Added one to test globals and locals, since they're both dicts which are mutable.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Debian root 3.x (tier-1) has failed when building commit 209eaff.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/345/builds/12676) and take a look at the build logs.
- Check if the failure is related to this commit (209eaff) or if it is a false positive.
- 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/345/builds/12676
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=13 mode='wb' closefd=True>
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=13 mode='wb' closefd=True>
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
Seems like a completely unrelated error, annotationlib doesn't explicitly deal with files.
|
JelleZijlstra reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot ARM64 macOS 3.14 (tier-2) has failed when building commit dd28db6.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1772/builds/707) and take a look at the build logs.
- Check if the failure is related to this commit (dd28db6) or if it is a false positive.
- 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/1772/builds/707
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 60536), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60542), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60542), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60548), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60548), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60556), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60556), raddr=('68.183.26.59', 21)>
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 60584), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60590), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60590), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60597), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60597), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60603), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60603), raddr=('68.183.26.59', 21)>
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=7, family=2, type=1, proto=6, laddr=('192.168.0.101', 60580), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60582), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60582), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60592), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60595), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60595), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60599), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=11, family=2, type=1, proto=6, laddr=('192.168.0.101', 60601), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=11, family=2, type=1, proto=6, laddr=('192.168.0.101', 60601), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=6, family=2, type=1, proto=6, laddr=('192.168.0.101', 60532), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60534), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60534), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60550), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=11, family=2, type=1, proto=6, laddr=('192.168.0.101', 60554), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=11, family=2, type=1, proto=6, laddr=('192.168.0.101', 60554), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60538), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60540), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60540), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=8, family=2, type=1, proto=6, laddr=('192.168.0.101', 60586), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60588), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60588), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=9, family=2, type=1, proto=6, laddr=('192.168.0.101', 60544), raddr=('68.183.26.59', 21)>
Warning -- Unraisable exception
Exception ignored while finalizing socket <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60546), raddr=('68.183.26.59', 21)>:
Traceback (most recent call last):
File "/Users/buildbot/buildarea/3.14.pablogsal-macos-m1.macos-with-brew/build/Lib/test/test_urllib2net.py", line 22, in _retry_thrice
last_exc = e
ResourceWarning: unclosed <socket.socket fd=10, family=2, type=1, proto=6, laddr=('192.168.0.101', 60546), raddr=('68.183.26.59', 21)>
skipped "Resource 'ftp://www.pythontest.net/' is not available"
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
urllib2net stuff, Petr is working I believe on disabling those.
|
dr-carlos reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 FreeBSD Refleaks 3.14 (tier-3) has failed when building commit dd28db6.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1800/builds/690) and take a look at the build logs.
- Check if the failure is related to this commit (dd28db6) or if it is a false positive.
- 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/1800/builds/690
Failed tests:
- test.test_concurrent_futures.test_interpreter_pool
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
.test_cancel_make_subprocess_transport_exec (test.test_asyncio.test_subprocess.SubprocessPidfdWatcherTests.test_cancel_make_subprocess_transport_exec) ... skipped 'operating system does not support pidfds'
Traceback (most recent call last):
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/futures/thread.py", line 99, in _worker
ctx.initialize()
~~~~~~~~~~~~~~^^
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/futures/interpreter.py", line 61, in initialize
self.interp = interpreters.create()
~~~~~~~~~~~~~~~~~~~^^
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/interpreters/__init__.py", line 65, in create
id = _interpreters.create(reqrefs=True)
concurrent.interpreters.InterpreterError: interpreter creation failed
Timeout (0:45:00)!
Thread 0x0000000843371900 [InterpreterPoolExec] (most recent call first):
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/interpreters/__init__.py", line 220 in _call
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/interpreters/__init__.py", line 238 in call
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/futures/interpreter.py", line 84 in run
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/futures/thread.py", line 86 in run
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/concurrent/futures/thread.py", line 119 in _worker
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/threading.py", line 1024 in run
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/threading.py", line 1082 in _bootstrap_inner
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/threading.py", line 1044 in _bootstrap
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
File "<frozen importlib._bootstrap>", line 1333, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1267, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1296, in find_spec
File "<frozen importlib._bootstrap_external>", line 1270, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1388, in find_spec
File "<frozen importlib._bootstrap_external>", line 166, in _path_isfile
File "<frozen importlib._bootstrap_external>", line 158, in _path_is_mode_type
File "<frozen importlib._bootstrap_external>", line 152, in _path_stat
ValueError: embedded null byte
Exception in initializer:
RuntimeError: Failed to import encodings module
Traceback (most recent call last):
File "/buildbot/buildarea/3.14.ware-freebsd.refleak/build/Lib/test/support/__init__.py", line 847, in gc_collect
gc.collect()
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
.test_cancel_make_subprocess_transport_exec (test.test_asyncio.test_subprocess.SubprocessPidfdWatcherTests.test_cancel_make_subprocess_transport_exec) ... skipped 'operating system does not support pidfds'
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
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.
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.
|