Skip to content

abc.register changes tp_flags without updating type_version #148450

@cocolato

Description

@cocolato

Bug report

Bug description:

see discussion in #148124 (comment)

abc.register will change the tp_flags but don't update the type version, so JIT won't invalid the old trace:

cpython/Modules/_abc.c

Lines 601 to 603 in 03d2f03

_PyType_SetFlagsRecursive((PyTypeObject *)subclass,
COLLECTION_FLAGS,
collection_flag);

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions