GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-94808: Cover `LOAD_GLOBAL` for custom dict subtypes by sobolevn · Pull Request #96767 · python/cpython Conversation
|
| if (!_PyErr_ExceptionMatches(tstate, PyExc_KeyError)) { | |
| goto error; | |
| } |
__builtins__ dict subtype raises non KeyError: Line 2458 in 53a54b7
| goto error; |
NameError in a custom __builtins__ dict subtype: Lines 2453 to 2457 in 53a54b7
| if (_PyErr_ExceptionMatches(tstate, PyExc_KeyError)) { | |
| format_exc_check_arg( | |
| tstate, PyExc_NameError, | |
| NAME_ERROR_MSG, name); | |
| } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the contribution.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| def __getitem__(self, key): | ||
| raise setonlyerror | ||
|
|
||
| class customdict(dict): # this one should not do anything fancy |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This should be defined just before the test that uses it (below). Ideally this function would be broken up - it's testing a lot of things.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-96767) (cherry picked from commit 044bcc1) Co-authored-by: Nikita Sobolev <[email protected]>
|
Sorry, @sobolevn and @iritkatriel, I could not cleanly backport this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-99091 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.