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-100239: specialize dict subclasses with no getitem override#132383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
iritkatriel wants to merge6 commits intopython:main
base:main
Choose a base branch
Loading
fromiritkatriel:dicts

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commentedApr 11, 2025
edited by bedevere-appbot
Loading

@iritkatrieliritkatriel changed the titlegh-100239: spcialize dict subclasses with no getitem overridegh-100239: specialize dict subclasses with no getitem overrideApr 11, 2025
@iritkatriel
Copy link
MemberAuthor

The tests will be great again once we merge the fix for#132284.

PyObject*dict=PyStackRef_AsPyObjectBorrow(dict_st);

assert(PyDict_CheckExact(dict));
assert(PyDict_Check(dict));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you also need to change_GUARD_NOS_DICT toPyDict_Check instead ofPyDict_CheckExact for this to work but I am not sure.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

It does look like it from the code, but I don't see more misses.

image

@iritkatriel
Copy link
MemberAuthor

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

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

Is it worth makingdict_subscript non-static to avoid the indirectionPyDict_Type.tp_as_mapping->mp_subscript?

Copy link
Member

@markshannonmarkshannon left a comment

Choose a reason for hiding this comment

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

It looks like thetest_opcode test needs updating.

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

Reviewers

@markshannonmarkshannonmarkshannon left review comments

@kumaraditya303kumaraditya303kumaraditya303 left review comments

@methanemethanemethane approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@iritkatriel@methane@markshannon@kumaraditya303

[8]ページ先頭

©2009-2025 Movatter.jp