@@ -94,7 +94,6 @@ def __init__(
94
94
is_abstract : bool = False ,
95
95
is_ext_class : bool = True ,
96
96
is_final_class : bool = False ,
97
- supports_weakref : bool = False ,
98
97
) -> None :
99
98
self .name = name
100
99
self .module_name = module_name
@@ -103,14 +102,15 @@ def __init__(
103
102
self .is_abstract = is_abstract
104
103
self .is_ext_class = is_ext_class
105
104
self .is_final_class = is_final_class
106
- self .supports_weakref = supports_weakref
107
105
# An augmented class has additional methods separate from what mypyc generates.
108
106
# Right now the only one is dataclasses.
109
107
self .is_augmented = False
110
108
# Does this inherit from a Python class?
111
109
self .inherits_python = False
112
110
# Do instances of this class have __dict__?
113
111
self .has_dict = False
112
+ # Do instances of this class have __weakref__?
113
+ self .supports_weakref = False
114
114
# Do we allow interpreted subclasses? Derived from a mypyc_attr.
115
115
self .allow_interpreted_subclasses = False
116
116
# Does this class need getseters to be generated for its attributes? (getseters are also
@@ -368,9 +368,9 @@ def serialize(self) -> JsonDict:
368
368
"is_generated" : self .is_generated ,
369
369
"is_augmented" : self .is_augmented ,
370
370
"is_final_class" : self .is_final_class ,
371
- "supports_weakref" : self .supports_weakref ,
372
371
"inherits_python" : self .inherits_python ,
373
372
"has_dict" : self .has_dict ,
373
+ "supports_weakref" : self .supports_weakref ,
374
374
"allow_interpreted_subclasses" : self .allow_interpreted_subclasses ,
375
375
"needs_getseters" : self .needs_getseters ,
376
376
"_serializable" : self ._serializable ,
0 commit comments