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

PEP 558: Make fast locals proxy independent of the legacy dynamic snapshot #1787

Merged

Conversation

ncoghlan
Copy link
Contributor

@ncoghlan ncoghlan commented Jan 30, 2021

This incorporates @markshannon's suggestion that the fast locals proxy only access the underlying frame storage, and not support writing additional keys to the dynamic snapshot stored in the C level f_locals struct field.

It also summarises the proposed CPython implementation changes, and cleans up quite a few old references to the idea of storing an instance of the fast locals proxy in the C level f_locals struct field (that hasn't been part of the proposal for ages, but it turned out there were still a lot of references to things working that way that I had missed).

@ncoghlan ncoghlan changed the title PEP 558: Add open question around frame proxy reads PEP 558: Make fast locals proxy independent of the legacy dynamic snapshot Jan 31, 2021
@ncoghlan ncoghlan merged commit 70442b0 into python:master Jun 27, 2021
@gvanrossum
Copy link
Member

BTW, @ncoghlan, do you think it's time to send this to the SC for review? We talked about it briefly in the "Faster CPython" team meeting today and we feel that this is a proposal we can get behind -- with our recommendation the SC might be slightly more inclined to accept it.

(Although our recommendation is mostly based on thinking that everything this PEP proposes to change requires the user to have a frame object first, which basically means they are already in some kind of debugging/tracing mode, which we don't aim to optimize at all.)

@ncoghlan
Copy link
Contributor Author

Aye, I actually recently wrote to Nathaniel to check his availability as PEP delegate. My own to do list for it at the moment is:

  • make the draft implementation match the updated PEP
  • fill in the missing mutable mapping methods on the proxy

@gvanrossum
Copy link
Member

Okay, just be sure the draft implementation is based on the latest main branch. Things have changed a bit in this code...

@ncoghlan
Copy link
Contributor Author

ncoghlan commented Jul 1, 2021

Yeah, the unwritten first task was "merge master to the PEP branch"

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.

None yet

3 participants