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 fe12a90 commit 86f8ec6Copy full SHA for 86f8ec6
Objects/typeobject.c
@@ -7045,8 +7045,12 @@ type_ready_set_type(PyTypeObject *type)
7045
static int
7046
type_ready_set_bases(PyTypeObject *type)
7047
{
7048
- if (lookup_tp_bases(type) != NULL) {
7049
- return 0;
+ if (type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) {
+ if (!_Py_IsMainInterpreter(_PyInterpreterState_GET())) {
7050
+ assert(lookup_tp_bases(type) != NULL);
7051
+ return 0;
7052
+ }
7053
+ assert(lookup_tp_bases(type) == NULL);
7054
}
7055
7056
PyObject *bases = lookup_tp_bases(type);
0 commit comments