mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
A static type with no tp_new of its own whose base is object now gets DISALLOW_INSTANTIATION instead of inheriting object's tp_new, following type_ready_set_new. Such types no longer expose an inherited __new__. A static type that inherits a non-NULL tp_new from its base must have the same basicsize as that base; type initialization panics otherwise. Types flagged HEAPTYPE are exempt, like classes created at runtime. _IOBase is flagged HEAPTYPE so that it keeps inheriting object's tp_new. FutureIter, TaskStepMethWrapper, hamt, InstructionSequence and itertools._grouper get constructors of their own. Assisted-by: Claude:claude-opus-5-5 Assisted-by: Grok:grok-4.7