GH-120097: Make FrameLocalsProxy a mapping#120101
Conversation
| copy.deepcopy(d) | ||
|
|
||
| def test_is_mapping(self): | ||
| x = 1 |
There was a problem hiding this comment.
Why do you need x? To fill f_locals? In this case I propose to use a inner function. Or maybe two: with and without locals.
There was a problem hiding this comment.
The contents are irrelevant, but we want something just to make sure we are testing the right thing.
Without x = 1, the locals would just be {} and it would be too easy to mistakenly test the wrong mapping.
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
Is the test failure related? |
|
Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
* Register FrameLocalsProxy as a subclass of collections.abc.Mapping * Allow FrameLocalsProxy to matching mapping patterns (cherry picked from commit d1c673b) Co-authored-by: Mark Shannon <mark@hotpy.org>
|
GH-120749 is a backport of this pull request to the 3.13 branch. |
* Register FrameLocalsProxy as a subclass of collections.abc.Mapping * Allow FrameLocalsProxy to matching mapping patterns
* Register FrameLocalsProxy as a subclass of collections.abc.Mapping * Allow FrameLocalsProxy to matching mapping patterns
* Register FrameLocalsProxy as a subclass of collections.abc.Mapping * Allow FrameLocalsProxy to matching mapping patterns
|
Uh oh!
There was an error while loading. Please reload this page.