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 6e4c0bc commit 116959aCopy full SHA for 116959a
Objects/typeobject.c
@@ -7037,8 +7037,12 @@ type_ready_set_type(PyTypeObject *type)
7037
static int
7038
type_ready_set_bases(PyTypeObject *type)
7039
{
7040
- if (lookup_tp_bases(type) != NULL) {
7041
- return 0;
+ if (type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) {
+ if (!_Py_IsMainInterpreter(_PyInterpreterState_GET())) {
7042
+ assert(lookup_tp_bases(type) != NULL);
7043
+ return 0;
7044
+ }
7045
+ assert(lookup_tp_bases(type) == NULL);
7046
}
7047
7048
PyObject *bases = lookup_tp_bases(type);
0 commit comments