We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23aaee0 commit 74eabafCopy full SHA for 74eabaf
1 file changed
Objects/typeobject.c
@@ -11460,7 +11460,10 @@ fixup_slot_dispatchers(PyTypeObject *type)
11460
{
11461
int res = 0;
11462
11463
- ASSERT_WORLD_STOPPED_OR_NEW_TYPE(type);
+ // This lock isn't strictly necessary because the type has not been
11464
+ // exposed to anyone else yet, but update_ont_slot calls find_name_in_mro
11465
+ // where we'd like to assert that the type is locked.
11466
+ BEGIN_TYPE_LOCK();
11467
11468
PyObject *mro = Py_NewRef(lookup_tp_mro(type));
11469
@@ -11502,6 +11505,8 @@ fixup_slot_dispatchers(PyTypeObject *type)
11502
11505
finish:
11503
11506
Py_XDECREF(mro_dict);
11504
11507
Py_DECREF(mro);
11508
+
11509
+ END_TYPE_LOCK();
11510
return res;
11511
}
11512
0 commit comments