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
Fix thread-safety for PyType_IsSubtype in free-threaded builds #117306
In #117275 we started performing reads of the MRO in PyType_IsSubtype in a thread-unsafe way. We need to read the MRO in a way that ideally doesn't lock, or at the very least locks without the possibility of suspending.
One potential solution is to use deferred reference counting to avoid locking.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
changed the title [-]Implement a more robust solution for avoiding locking in `PyType_IsSubtype` in free-threaded builds[/-][+]Fix thread-safety for `PyType_IsSubtype` in free-threaded builds[/+]on Mar 28, 2024
Activity
[-]Implement a more robust solution for avoiding locking in `PyType_IsSubtype` in free-threaded builds[/-][+]Fix thread-safety for `PyType_IsSubtype` in free-threaded builds[/+]gh-111926: Avoid locking in PyType_IsSubtype (#117275)
Squashed commit of the following:
Squashed commit of the following:
pythongh-111926: Avoid locking in PyType_IsSubtype (python#117275)
StanFromIreland commentedon Jun 9, 2026
I presume this was fixed by 5d21d88, please re-open if that was incorrect.