gh-141510 Update mapping methods in abstract.c to accept frozendict#150692
Conversation
…dict Specifically `PyMapping_GetOptionalItem`, `PyMapping_Keys`, `PyMapping_Values` and `PyMapping_Items`.
|
I think this is probably OK to attach to the "frozendict" implementation issue, but I can change it if not (Edit: although I originally linked it to a previous proposal...) |
vstinner
left a comment
There was a problem hiding this comment.
Please update test_mapping_keys_valuesitems() of Lib/test/test_capi/test_abstract.py to test frozendict.
Sadly, PyMapping_GetOptionalItem() doesn't seem to be tested by test_capi so far. But that can be done in another PR.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Thanks for added tests, they seem to cover well your C changes.
test_abc hangs in Parallel Tests: that's the known issue #151593. Another issue is that installing dependencies took 33 minutes. I re-run the job. |
|
GH-151704 is a backport of this pull request to the 3.15 branch. |
…151704) gh-141510 Add frozendict fast paths to abstract.c (GH-150692) Add frozendict to the fast paths of PyMapping_GetOptionalItem(), PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items(). (cherry picked from commit a5568d0) Co-authored-by: da-woods <dw-git@d-woods.co.uk> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
... as well as dict.
Specifically
PyMapping_GetOptionalItem,PyMapping_Keys,PyMapping_ValuesandPyMapping_Items.