@@ -411,7 +411,10 @@ mod _io {
411411 #[ derive( Debug , Default , PyPayload ) ]
412412 pub struct _IOBase ;
413413
414- #[ pyclass( with( IterNext , Iterable , Destructor ) , flags( BASETYPE , HAS_DICT ) ) ]
414+ #[ pyclass(
415+ with( IterNext , Iterable , Destructor ) ,
416+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
417+ ) ]
415418 impl _IOBase {
416419 #[ pymethod]
417420 fn seek (
@@ -632,7 +635,7 @@ mod _io {
632635 #[ repr( transparent) ]
633636 pub ( super ) struct _RawIOBase ( _IOBase ) ;
634637
635- #[ pyclass( flags( BASETYPE , HAS_DICT ) ) ]
638+ #[ pyclass( flags( BASETYPE , HAS_DICT , HAS_WEAKREF ) ) ]
636639 impl _RawIOBase {
637640 #[ pymethod]
638641 fn read ( instance : PyObjectRef , size : OptionalSize , vm : & VirtualMachine ) -> PyResult {
@@ -718,7 +721,7 @@ mod _io {
718721 #[ repr( transparent) ]
719722 struct _BufferedIOBase ( _IOBase ) ;
720723
721- #[ pyclass( flags( BASETYPE ) ) ]
724+ #[ pyclass( flags( BASETYPE , HAS_WEAKREF ) ) ]
722725 impl _BufferedIOBase {
723726 #[ pymethod]
724727 fn read ( zelf : PyObjectRef , _size : OptionalArg , vm : & VirtualMachine ) -> PyResult {
@@ -783,7 +786,7 @@ mod _io {
783786 #[ repr( transparent) ]
784787 struct _TextIOBase ( _IOBase ) ;
785788
786- #[ pyclass( flags( BASETYPE ) ) ]
789+ #[ pyclass( flags( BASETYPE , HAS_WEAKREF ) ) ]
787790 impl _TextIOBase {
788791 #[ pygetset]
789792 fn encoding ( _zelf : PyObjectRef , vm : & VirtualMachine ) -> PyObjectRef {
@@ -1979,7 +1982,7 @@ mod _io {
19791982
19801983 #[ pyclass(
19811984 with( Constructor , BufferedMixin , BufferedReadable , Destructor ) ,
1982- flags( BASETYPE , HAS_DICT )
1985+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
19831986 ) ]
19841987 impl BufferedReader { }
19851988
@@ -2083,7 +2086,7 @@ mod _io {
20832086
20842087 #[ pyclass(
20852088 with( Constructor , BufferedMixin , BufferedWritable , Destructor ) ,
2086- flags( BASETYPE , HAS_DICT )
2089+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
20872090 ) ]
20882091 impl BufferedWriter { }
20892092
@@ -2157,7 +2160,7 @@ mod _io {
21572160 BufferedWritable ,
21582161 Destructor
21592162 ) ,
2160- flags( BASETYPE , HAS_DICT )
2163+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
21612164 ) ]
21622165 impl BufferedRandom { }
21632166
@@ -2227,7 +2230,7 @@ mod _io {
22272230 BufferedWritable ,
22282231 Destructor
22292232 ) ,
2230- flags( BASETYPE , HAS_DICT )
2233+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
22312234 ) ]
22322235 impl BufferedRWPair {
22332236 #[ pymethod]
@@ -3013,7 +3016,7 @@ mod _io {
30133016 IterNext ,
30143017 Representable
30153018 ) ,
3016- flags( BASETYPE )
3019+ flags( BASETYPE , HAS_WEAKREF )
30173020 ) ]
30183021 impl TextIOWrapper {
30193022 #[ pymethod]
@@ -4374,7 +4377,7 @@ mod _io {
43744377 }
43754378 }
43764379
4377- #[ pyclass( flags( BASETYPE , HAS_DICT ) , with( Constructor , Initializer ) ) ]
4380+ #[ pyclass( flags( BASETYPE , HAS_DICT , HAS_WEAKREF ) , with( Constructor , Initializer ) ) ]
43784381 impl StringIO {
43794382 #[ pymethod]
43804383 const fn readable ( & self ) -> bool {
@@ -4591,7 +4594,10 @@ mod _io {
45914594 }
45924595 }
45934596
4594- #[ pyclass( flags( BASETYPE , HAS_DICT ) , with( PyRef , Constructor , Initializer ) ) ]
4597+ #[ pyclass(
4598+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF ) ,
4599+ with( PyRef , Constructor , Initializer )
4600+ ) ]
45954601 impl BytesIO {
45964602 #[ pymethod]
45974603 const fn readable ( & self ) -> bool {
@@ -5577,7 +5583,7 @@ mod fileio {
55775583
55785584 #[ pyclass(
55795585 with( Constructor , Initializer , Representable , Destructor ) ,
5580- flags( BASETYPE , HAS_DICT )
5586+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
55815587 ) ]
55825588 impl FileIO {
55835589 fn io_error (
@@ -6333,7 +6339,7 @@ mod winconsoleio {
63336339
63346340 #[ pyclass(
63356341 with( Constructor , Initializer , Representable , Destructor ) ,
6336- flags( BASETYPE , HAS_DICT )
6342+ flags( BASETYPE , HAS_DICT , HAS_WEAKREF )
63376343 ) ]
63386344 impl WindowsConsoleIO {
63396345 #[ allow( dead_code) ]
0 commit comments