File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -6644,6 +6644,10 @@ type_ready_pre_checks(PyTypeObject *type)
6644
6644
static int
6645
6645
type_ready_set_bases (PyTypeObject * type )
6646
6646
{
6647
+ if (lookup_tp_bases (type ) != NULL ) {
6648
+ return 0 ;
6649
+ }
6650
+
6647
6651
/* Initialize tp_base (defaults to BaseObject unless that's us) */
6648
6652
PyTypeObject * base = type -> tp_base ;
6649
6653
if (base == NULL && type != & PyBaseObject_Type ) {
@@ -7183,6 +7187,11 @@ _PyStaticType_InitBuiltin(PyTypeObject *self)
7183
7187
if (self -> tp_flags & Py_TPFLAGS_READY ) {
7184
7188
assert (self -> tp_flags & _Py_TPFLAGS_STATIC_BUILTIN );
7185
7189
assert (_PyType_CheckConsistency (self ));
7190
+ /* We must explicitly set these for subinterpreters.
7191
+ tp_subclasses is set lazily. */
7192
+ type_ready_set_dict (self );
7193
+ type_ready_set_bases (self );
7194
+ type_ready_mro (self );
7186
7195
return 0 ;
7187
7196
}
7188
7197
You can’t perform that action at this time.
0 commit comments