Skip to content

[3.14] gh-148450: abc.register needs to update type_version when tp_flags is changed (GH-148623)#150308

Open
cocolato wants to merge 2 commits into
python:3.14from
cocolato:local-3.14
Open

[3.14] gh-148450: abc.register needs to update type_version when tp_flags is changed (GH-148623)#150308
cocolato wants to merge 2 commits into
python:3.14from
cocolato:local-3.14

Conversation

@cocolato
Copy link
Copy Markdown
Member

@cocolato cocolato commented May 23, 2026

Comment thread Objects/typeobject.c
/* Keep TYPE_LOCK held while waiting for stop-the-world so no thread
can reassign a version tag before the flag update. */
type_lock_prevent_release();
types_stop_world();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In 3.14, type flags aren't protected with stop the world pause, you only need type lock here

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants