Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-137969: Fix evaluation of ref.evaluate(format=Format.FORWARDREF) objects#138075
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
dr-carlos commented Aug 22, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
python-cla-botbot commented Aug 22, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sharktide left a comment
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.
Do we have tests that reflect this behavior? If not, please add some to verify this behavior is working as expected :)
17bd38f to 1f23c41Comparedr-carlos commented Aug 23, 2025
Just added tests that re-evaluation works for new locals and globals, and that it still correctly raises a NameError. |
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.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <[email protected]>
63e01d6 into python:mainUh oh!
There was an error while loading. Please reload this page.
Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…DREF)` objects (pythonGH-138075) (cherry picked from commit 63e01d6) Co-authored-by: dr-carlos <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
GH-140929 is a backport of this pull request to the 3.14 branch. |
…RDREF)` objects (GH-138075) (#140929) gh-137969: Fix evaluation of `ref.evaluate(format=Format.FORWARDREF)` objects (GH-138075) (cherry picked from commit 63e01d6) Co-authored-by: dr-carlos <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]>
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
JelleZijlstra commented Nov 3, 2025
Odd, not sure why this would fail only on buildbots. Maybe an issue where they run tests in a different order? We can revert for now. |
…t.FORWARDREF)` objects (python#138075)" This reverts commit 63e01d6.
…t=Format.FORWARDREF)` objects (pythonGH-138075) (python#140929)" This reverts commit cdb6fe8.
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
bedevere-bot commented Nov 3, 2025
|
…DREF)` objects (python#138075) Co-authored-by: Jelle Zijlstra <[email protected]>
…t.FORWARDREF)` objects (python#138075)" (python#140930) This reverts commit 63e01d6.
This fix seemingly preserves type parameter semantics for simple tests - unsure if there is more complex behaviour that it may break.
ref.evaluate(format=Format.FORWARDREF)returns a ForwardRef with a copied__globals__that no longer updates #137969