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: adjustments after updating implementation #2030

Merged

Conversation

ncoghlan
Copy link
Contributor

@ncoghlan ncoghlan commented Jul 10, 2021

  • pdb stores __return__ and `exception`` entries on
    arbitrary frames, so that feature needs to be preserved
  • Some fast locals proxy operations will implicitly update the
    underlying shared mapping on the frame
  • Anyone explicitly calling LocalsToFast is going to want the
    read/write proxy, not any of the read-only options (plus it's
    hard to fit an essay in an error message)
  • Remove lingering reference to the removed PyLocals_RefreshViews()

* Some fast locals proxy operations will implicitly update the
  underlying shared mapping on the frame
* Anyone explicitly calling `LocalsToFast` is going to want the
  read/write proxy, not any of the read-only options (plus it's
  hard to fit an essay in an error message)
* Remove lingering reference to the removed PyLocals_RefreshViews()
@ncoghlan ncoghlan changed the title PEP 558: adjustments after updating implementation WIP PEP 558: adjustments after updating implementation Jul 10, 2021
@ncoghlan ncoghlan changed the title WIP PEP 558: adjustments after updating implementation PEP 558: adjustments after updating implementation Jul 10, 2021
@ncoghlan
Copy link
Contributor Author

ncoghlan commented Jul 10, 2021

@njsmith @markshannon The reference implementation is largely back to only needing "turn the crank" type work to flesh out the Python and C APIs - the core technical issues (including harmonisation with the 3.11 frame implementation changes) have all been resolved. There are some performance problems with the proxy due to the need to support extra keys to keep pdb happy, but consumers can mitigate those with a call to f_locals.copy() to get a true snapshot that won't redundantly refresh itself when it doesn't need to.

My current plan is to post this version to python-dev next weekend, requesting pronouncement from Nathaniel.

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