Skip to content
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

Fix find_replacements with Python 3.13 #39185

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

antonio-rojas
Copy link
Contributor

@antonio-rojas antonio-rojas commented Dec 22, 2024

After PEP 667 implementation [1] globals() changes within an exec call are not propagated outside the call

[1] python/cpython@b034f14

Copy link

github-actions bot commented Dec 22, 2024

Documentation preview for this PR (built with commit cee808a; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729
Copy link
Contributor

Instead of using globals() you can probably just use a temporary dict. Otherwise there's a risk of memory leak (the refcount isn't decreased when the function returns)

After PEP 667 implementation [1] locals() changes within an exec call are not propagated outside the call

[1] python/cpython@b034f14
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.

2 participants