Skip to content

gh-132775: Always Set __builtins__ In _PyFunction_FromXIData() #134758

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

Merged
merged 3 commits into from
May 27, 2025

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented May 26, 2025

This is a small follow-up to gh-133481. There's a corner case in the behavior of PyImport_ImportModuleAttrString() where it expects __builtins__ to be set if __globals__ is set.

@ericsnowcurrently ericsnowcurrently enabled auto-merge (squash) May 27, 2025 15:17
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well throw a checkmark on here :)

@ericsnowcurrently ericsnowcurrently merged commit 9b5e800 into python:main May 27, 2025
38 checks passed
@miss-islington-app
Copy link

Thanks @ericsnowcurrently for the PR 🌮🎉.. 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 May 27, 2025
…ythongh-134758)

This is a small follow-up to pythongh-133481.  There's a corner case
in the behavior of PyImport_ImportModuleAttrString(), where
it expects __builtins__ to be set if __globals__ is set.
(cherry picked from commit 9b5e800)

Co-authored-by: Eric Snow <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2025

GH-134794 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 May 27, 2025
@ericsnowcurrently ericsnowcurrently deleted the fix-missing-builtins branch May 27, 2025 15:47
ericsnowcurrently added a commit that referenced this pull request May 27, 2025
…gh-134794)

This is a small follow-up to gh-133481.  There's a corner case
in the behavior of PyImport_ImportModuleAttrString(), where
it expects __builtins__ to be set if __globals__ is set.

(cherry picked from commit 9b5e800, AKA gh-134758)

Co-authored-by: Eric Snow <[email protected]>
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