[PEP 558 - WIP] bpo-30744: Trace hooks no longer reset closure state by ncoghlan · Pull Request #3640 · python/cpython
ncoghlan
changed the title
[DO NOT MERGE - PEP 558] bpo-30744: Trace hooks no longer reset closure state
[PEP 558 - DO NOT MERGE] bpo-30744: Trace hooks no longer reset closure state
Previously, trace hooks running on a nested function could incorrectly reset the state of a closure cell. This avoids that by slightly changing the semantics of the locals namespace in functions, generators, and coroutines, such that closure references are represented in the locals namespace by their actual cell objects while a trace hook implemented in Python is running. Depends on PEP 558 and bpo-17960 to cover the underlying change to frame.f_locals semantics.
erlend-aasland
added
pending
and removed pending
The issue will be closed if no feedback is providedlabels
Jul 24, 2022
github-actions
bot
added
stale
and removed stale
Stale PR or inactive for long period of time.labels
Aug 24, 2022This 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