gh-141510: Raise TypeError in PyDict_SetItem() on frozendict (#145564) · python/cpython@713be70 · GitHub
Skip to content

Commit 713be70

Browse files
gh-141510: Raise TypeError in PyDict_SetItem() on frozendict (#145564)
If the following functions get an unexpected frozendict, raise TypeError instead of SystemError: * PyDict_DelItem() * PyDict_DelItemString() * PyDict_Merge() * PyDict_MergeFromSeq2() * PyDict_Pop() * PyDict_PopString() * PyDict_SetDefault() * PyDict_SetDefaultRef() * PyDict_SetItem() * PyDict_SetItemString() * _PyDict_SetItem_KnownHash() * PyDict_Update() Co-authored-by: mohsinm-dev <mohsin.mdev@gmail.com>
1 parent 706fd4e commit 713be70

2 files changed

Lines changed: 124 additions & 32 deletions

File tree

Lib/test/test_capi/test_dict.py

Lines changed: 51 additions & 11 deletions

Objects/dictobject.c

Lines changed: 73 additions & 21 deletions

0 commit comments

Comments
 (0)