← 返回首页
PEP 558: Make fast locals proxy independent of the legacy dynamic snapshot by ncoghlan · Pull Request #1787 · python/peps · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

Merged
ncoghlan merged 8 commits into
python:masterfrom
ncoghlan:pep-558-clarify-locals-view-rationale
Jun 27, 2021
Merged

PEP 558: Make fast locals proxy independent of the legacy dynamic snapshot#1787
ncoghlan merged 8 commits into
python:masterfrom
ncoghlan:pep-558-clarify-locals-view-rationale

Conversation

ncoghlan commented Jan 30, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

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 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 merged commit 70442b0 into python:master Jun 27, 2021

Copy link
Copy Markdown
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.)

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Member

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

ncoghlan commented Jul 1, 2021

Copy link
Copy Markdown
Contributor Author

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

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.