You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit efeeb6c
Browse filesBrowse the repository at this point in the historyBrowse files
* gh-132042: Speed up slot lookup during class creation
Resolve the special method slots of a new class with one pass over each
class dict along the MRO instead of one lookup per slot name and per
class. A small static table maps slot names to slotdef indices; it also
replaces the temporary dict in _PyType_InitSlotDefs() and the linear
scan in has_slotdef().
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* Replace dead defensive checks in collect_slot_descrs() with asserts
* Use the slot name table in update_slot()
* Share the slot name table probe loop
* review comments
* gh-132042: Allow dict subclasses as tp_dict in the slot scan
An extension may initialize tp_dict with a dict subclass before calling
PyType_Ready(), so assert PyDict_Check() like find_name_in_mro() does.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* gh-132042: Test subclassing a type whose tp_dict is a dict subclass
Add _testcapi.MyListDictSubclass, a static type like MyList whose tp_dict
is initialized with a dict subclass before PyType_Ready(), as extensions
may do, and check that subclasses created from Python still inherit its
special methods.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* gh-132042: Ignore the MyListDictSubclass_Type static type in check-c-globals
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments