-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
[PEP 558 - WIP] bpo-30744: Trace hooks no longer reset closure state #3640
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
Closed
ncoghlan
wants to merge
80
commits into
python:main
from
ncoghlan:bpo-30744-make-locals-closure-safe
Closed
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
7626a0e
bpo-30744: Trace hooks no longer reset closure state
ncoghlan 3cbb73c
Disable the current broken writeback logic
ncoghlan 01f3f34
Failing test case for writeback functionality
ncoghlan 4f6dd93
Initial skeleton for a write-through proxy
ncoghlan cd45da7
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan acbf587
Finish adding the write-through proxy
ncoghlan d1a9014
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 5ea8bcf
Add test case for the PEP 558 locals() behaviour
ncoghlan fe92891
Actually implement most of the PEP and fix the tests
ncoghlan ac9e0bf
Fix segfault on cleared frames
ncoghlan 6774e71
Use correct printf formatting code
ncoghlan 74c51e4
Initial skeleton for other mutable mapping methods
ncoghlan 0e5fbf3
Break ref cycle when frame finishes executing
ncoghlan 9e3ce53
Remove implicit frame locals update
ncoghlan 9479557
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 8e886ef
Avoid double DECREF on error
ncoghlan 5b63e7c
Attempt to make dealloc more robust under gc
ncoghlan f0ecee3
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 1752b54
Fix post-merge compilation errors
ncoghlan 348a56d
Implement flp.pop()
ncoghlan 93f512c
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 39ec4d8
Refactor ref map creation
ncoghlan 7078632
Correctly manage fast local refcounts
ncoghlan ed5f86e
Allow closure updates after frame termination
ncoghlan a216747
Refactor frame post-eval cleanup
ncoghlan a0dc787
Use full word in API name
ncoghlan 7b02bed
Update to match latest PEP draft
ncoghlan e9876b5
Update test_scope for snapshot semantics
ncoghlan 0033c60
Update test_sys_settrace for snapshot semantics
ncoghlan a5a8b19
Fix pop/delete locals proxy bug
ncoghlan 6c98f48
Update argument clinic output
ncoghlan 617f6ab
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 729f121
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 619fb75
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 1fe964e
Migrate to revised public API design
ncoghlan b047ae4
Rename PyFrame_LocalsIsSnapshot to PyFrame_GetLocalsReturnsSnapshot
ncoghlan d1a8420
Mark fast locals proxy as an internal type
ncoghlan 82108ff
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan eccb1ea
Update draft C API to match latest PEP text
ncoghlan c1933e7
Migrate exec() and eval() to PyLocals_Get()
ncoghlan 161ad47
Merge remote-tracking branch 'origin/master' into bpo-30744-make-loca…
ncoghlan 68f10ce
Avoid circular reference between locals proxy and frame
ncoghlan 29ce344
Add back implicit view refresh in Python trace hook
ncoghlan ed6e53b
Attempt to tidy up Mac OS X compile warnings/errors
ncoghlan 96c77cb
Merge remote-tracking branch 'origin/main' into bpo-30744-make-locals…
ncoghlan a348d08
Fix Argument Clinic checksum
ncoghlan 69c8f19
Fix stable ABI minimum version
ncoghlan caeaf66
Bring implementation into line with latest PEP version
ncoghlan 7ec5d26
Register new stable ABI additions
ncoghlan 7ddc3eb
Add FLP str(), fix various value lookup issues
ncoghlan 7400a46
Uninitialised fields will get you every time
ncoghlan 5eae0d5
Fix refcounting, bdb segfault, pdb functionality
ncoghlan 40db4e7
Del
8000
egate more operations to the full dynamic snapshot
ncoghlan 74b97a3
Add TODO item for false positives in containment checks
ncoghlan 9f16513
Only ensure frame snapshot is up to date in O(n) proxy operations
ncoghlan c477e24
Keep locals snapshot up to date when reading/writing individual keys
ncoghlan dd94608
Avoid false positives in FLP contains method
ncoghlan b7eb662
Merge remote-tracking branch 'origin/main' into bpo-30744-make-locals…
ncoghlan 1484c10
Finish public C API, start dict API tests
ncoghlan 3891c13
Merge remote-tracking branch 'origin/main' into bpo-30744-make-locals…
ncoghlan 760ffa9
Remove debugging print statement
ncoghlan ae6b013
Regenerated stable ABI files
ncoghlan b03309b
Rename _PyLocals_Kind APIs to avoid potential confusion
ncoghlan cde5035
Merge remote-tracking branch 'origin/main' into bpo-30744-make-locals…
ncoghlan 66d058c
PyLocals_GetReturnsCopy -> PyLocals_GetKind()
ncoghlan 67c3958
Share fast_refs mapping between proxy objects
ncoghlan 034345f
Remove debugging print
ncoghlan 3c49ff8
Defer value cache refresh until needed, start fleshing out dict API t…
ncoghlan ea5f943
Add dict union operations to proxy
ncoghlan fcf99ca
Implement and test locals proxy clear() method
ncoghlan 16e0581
Remove pointless print() call
ncoghlan c356949
Implement proxy pop() tests
ncoghlan 8a4e788
Implement and test proxy popitem()
ncoghlan 706eec4
Test popitem with cells and extra variables
ncoghlan 35a017c
Implement and test setdefault()
ncoghlan 06c406c
Implement and test proxy __sizeof__()
ncoghlan 31493b9
Add C API test for the LocalsToFast exception
ncoghlan b587a41
Force enum size
ncoghlan e1b505d
Clarify code comment
ncoghlan 2b27389
Keep track of defined names even on cleared frames
ncoghlan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
<
8000
/div>
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Finish adding the write-through proxy
- Loading branch information
commit acbf5876e8a7c9b3b9b7b82f17b9e9dee726df6c
There are no files selected for viewing
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.