Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-141510: Raise TypeError in PyDict_SetItem() on frozendict#145564

Open
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:pydict_setitem
Open

gh-141510: Raise TypeError in PyDict_SetItem() on frozendict#145564
vstinner wants to merge 1 commit intopython:mainfrom
vstinner:pydict_setitem

Conversation

@vstinner
Copy link
Member

@vstinnervstinner commentedMar 5, 2026
edited by bedevere-appbot
Loading

If the following functions get an unexpected frozendict, raise a TypeError with an useful error message:

  • 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()

If the following functions get an unexpected frozendict, raise aTypeError with an useful error message:* 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>
@vstinner
Copy link
MemberAuthor

This change raises a niceTypeError exception with an useful error message when afrozendict is passed to aPyDict function which tries to modify it (ex:PyDict_SetItem).

The initial version of the code is based on PRgh-145123.

Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Generally looks good to me, but let me take a look til this weekend.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@corona10corona10corona10 left review comments

@methanemethaneAwaiting requested review from methanemethane is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@corona10

[8]ページ先頭

©2009-2026 Movatter.jp