Skip to content

gh-98878: Use builtins from the bound frame when offering a suggestion #98880

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 1 commit into from
Oct 31, 2022

Conversation

isidentical
Copy link
Member

@isidentical isidentical commented Oct 30, 2022

The __builtins__ value in the globals can be either a dictionary or a module. This PR allows it to be handled in either way (by actually using the frame builtins instead of the __builtins__ object).

@isidentical isidentical requested review from ambv and pablogsal October 30, 2022 19:45
@isidentical isidentical changed the title gh-38878: Use builtins from the bound frame when offering a suggestion gh-98878: Use builtins from the bound frame when offering a suggestion Oct 30, 2022
Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

Fantastic! 👍

@miss-islington
Copy link
Contributor

Thanks @isidentical for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @isidentical and @pablogsal, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker a41de32942b7ac14524587a08d219f3bfe346415 3.11

@pablogsal
Copy link
Member

Ahhh, the backport fairy strikes again :(

@isidentical
Copy link
Member Author

Ahhh, the backport fairy strikes again :(

I thought we had this only on 3.12 (this is the Python implementation of the suggestion logic), no? @pablogsal

@pablogsal
Copy link
Member

Ah, right, for some reason I through we backported this 🤔

This makes me think that the lack of parity may be a bug and we should consider backporting it but oh well 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants