SIGN IN SIGN UP

[3.14] gh-145685: Stop the world when updating MRO of existing types (gh-145707) (#145715)

We already have a stop-the-world pause elsewhere in this code path
(type_set_bases) and this makes will make it easier to avoid contention
on the TYPE_LOCK when looking up names in the MRO hierarchy.

Also use deferred reference counting for non-immortal MROs.
(cherry picked from commit 0b65c88c2af6e09530a9aa21800771aa687371db)
S
Sam Gross committed
54024655ae7490b18fe36e6e38839b95edbfa471
Parent: a5ed66d
Committed by GitHub <noreply@github.com> on 3/10/2026, 1:31:52 PM