Skip to content

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dr-carlos
Copy link

@dr-carlos dr-carlos commented Aug 22, 2025

This fix seemingly preserves type parameter semantics for simple tests - unsure if there is more complex behaviour that it may break.

@python-cla-bot
Copy link

python-cla-bot bot commented Aug 22, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

This comment was marked as resolved.

sharktide

This comment was marked as duplicate.

Copy link
Contributor

@sharktide sharktide left a 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 :)

@dr-carlos dr-carlos force-pushed the forwardref-double-anno branch from 17bd38f to 1f23c41 Compare August 23, 2025 00:41
@dr-carlos
Copy link
Author

Do we have tests that reflect this behavior? If not, please add some to verify this behavior is working as expected :)

Just added tests that re-evaluation works for new locals and globals, and that it still correctly raises a NameError.

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