@@ -1173,11 +1173,12 @@ impl PyObject {
11731173 pub ( in crate :: object) unsafe fn dealloc_only ( ptr : NonNull < PyObject > ) {
11741174 // sanity check
11751175 #[ cfg( feature = "gc" ) ]
1176+ #[ allow( unused) ]
11761177 {
11771178 debug_assert ! ( ptr. as_ref( ) . header( ) . is_drop( ) ) ;
11781179 if ptr. as_ref ( ) . header ( ) . is_dealloc ( ) {
11791180 macro_rules! show_typeid {
1180- ( $ID: tt, $( $TY: ty) ,* $( , ) ?) => {
1181+ ( $ID: tt: $( $TY: ty) ,* $( , ) ?) => {
11811182 $(
11821183 if TypeId :: of:: <$TY>( ) ==$ID{
11831184 String :: from( std:: stringify!( $TY) )
@@ -1199,9 +1200,14 @@ impl PyObject {
11991200 tuple:: PyTupleIterator ,
12001201 } ;
12011202 use crate :: builtins:: {
1202- PyBoundMethod , PyDict , PyEnumerate , PyFilter , PyFunction , PyList ,
1203- PyMappingProxy , PyProperty , PySet , PySlice , PyStaticMethod , PySuper ,
1204- PyTraceback , PyTuple , PyType , PyWeakProxy , PyZip ,
1203+ PyArithmeticError , PyAssertionError , PyAsyncGen , PyAttributeError ,
1204+ PyBaseException , PyBaseExceptionRef , PyBaseObject , PyBlockingIOError , PyBool ,
1205+ PyBoundMethod , PyBrokenPipeError , PyBufferError , PyByteArray , PyBytes ,
1206+ PyBytesRef , PyBytesWarning , PyChildProcessError , PyClassMethod , PyCode ,
1207+ PyComplex , PyConnectionAbortedError , PyConnectionError ,
1208+ PyConnectionRefusedError , PyDict , PyEnumerate , PyFilter , PyFunction , PyList ,
1209+ PyMappingProxy , PyProperty , PyRange , PySet , PySlice , PyStaticMethod , PyStr ,
1210+ PySuper , PyTraceback , PyTuple , PyType , PyWeakProxy , PyZip ,
12051211 } ;
12061212 use crate :: function:: { ArgCallable , ArgIterable , ArgMapping , ArgSequence } ;
12071213 use crate :: protocol:: {
@@ -1210,19 +1216,42 @@ impl PyObject {
12101216 error ! (
12111217 "typeid={:?}" ,
12121218 show_typeid!(
1213- tid, // builtin types
1214- // PyRange, PyStr is acyclic, therefore no trace needed for them
1219+ tid: // builtin types
1220+ PyArithmeticError ,
1221+ PyAssertionError ,
1222+ PyAsyncGen ,
1223+ PyAttributeError ,
1224+ PyBaseException ,
1225+ PyBaseExceptionRef ,
1226+ PyBaseObject ,
1227+ PyBlockingIOError ,
1228+ PyBool ,
12151229 PyBoundMethod ,
1230+ PyBrokenPipeError ,
1231+ PyBufferError ,
1232+ PyByteArray ,
1233+ PyBytes ,
1234+ PyBytesRef ,
1235+ PyBytesWarning ,
1236+ PyChildProcessError ,
1237+ PyClassMethod ,
1238+ PyCode ,
1239+ PyComplex ,
1240+ PyConnectionAbortedError ,
1241+ PyConnectionError ,
1242+ PyConnectionRefusedError ,
12161243 PyDict ,
12171244 PyEnumerate ,
12181245 PyFilter ,
12191246 PyFunction ,
12201247 PyList ,
12211248 PyMappingProxy ,
12221249 PyProperty ,
1250+ PyRange ,
12231251 PySet ,
12241252 PySlice ,
12251253 PyStaticMethod ,
1254+ PyStr ,
12261255 PySuper ,
12271256 PyTraceback ,
12281257 PyTuple ,
0 commit comments