@@ -624,8 +624,8 @@ impl PyBaseException {
624624 * self . context . write ( ) = context;
625625 }
626626
627- #[ pygetset( name = "__suppress_context__" ) ]
628- pub ( super ) fn get_suppress_context ( & self ) -> bool {
627+ #[ pygetset]
628+ pub ( super ) fn __suppress_context__ ( & self ) -> bool {
629629 self . suppress_context . load ( )
630630 }
631631
@@ -1112,7 +1112,7 @@ impl serde::Serialize for SerializeException<'_, '_> {
11121112 . __context__ ( )
11131113 . map ( |exc| SerializeExceptionOwned { vm : self . vm , exc } ) ,
11141114 ) ?;
1115- struc. serialize_field ( "suppress_context" , & self . exc . get_suppress_context ( ) ) ?;
1115+ struc. serialize_field ( "suppress_context" , & self . exc . __suppress_context__ ( ) ) ?;
11161116
11171117 let args = {
11181118 struct Args < ' vm > ( & ' vm VirtualMachine , PyTupleRef ) ;
@@ -1550,6 +1550,7 @@ pub(super) mod types {
15501550 pub struct PyUnboundLocalError ( PyNameError ) ;
15511551
15521552 #[ pyexception( name, base = PyException , ctx = "os_error" ) ]
1553+ #[ repr( C ) ]
15531554 pub struct PyOSError {
15541555 base : PyException ,
15551556 errno : PyAtomicRef < Option < PyObject > > ,
@@ -1857,8 +1858,8 @@ pub(super) mod types {
18571858 self . errno . swap_to_temporary_refs ( value, vm) ;
18581859 }
18591860
1860- #[ pygetset( name = "strerror" ) ]
1861- fn get_strerror ( & self ) -> Option < PyObjectRef > {
1861+ #[ pygetset]
1862+ fn strerror ( & self ) -> Option < PyObjectRef > {
18621863 self . strerror . to_owned ( )
18631864 }
18641865
0 commit comments