@@ -1173,11 +1173,12 @@ impl PyObject {
1173
1173
pub ( in crate :: object) unsafe fn dealloc_only ( ptr : NonNull < PyObject > ) {
1174
1174
// sanity check
1175
1175
#[ cfg( feature = "gc" ) ]
1176
+ #[ allow( unused) ]
1176
1177
{
1177
1178
debug_assert ! ( ptr. as_ref( ) . header( ) . is_drop( ) ) ;
1178
1179
if ptr. as_ref ( ) . header ( ) . is_dealloc ( ) {
1179
1180
macro_rules! show_typeid {
1180
- ( $ID: tt, $( $TY: ty) ,* $( , ) ?) => {
1181
+ ( $ID: tt: $( $TY: ty) ,* $( , ) ?) => {
1181
1182
$(
1182
1183
if TypeId :: of:: <$TY>( ) ==$ID{
1183
1184
String :: from( std:: stringify!( $TY) )
@@ -1199,9 +1200,14 @@ impl PyObject {
1199
1200
tuple:: PyTupleIterator ,
1200
1201
} ;
1201
1202
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 ,
1205
1211
} ;
1206
1212
use crate :: function:: { ArgCallable , ArgIterable , ArgMapping , ArgSequence } ;
1207
1213
use crate :: protocol:: {
@@ -1210,19 +1216,42 @@ impl PyObject {
1210
1216
error ! (
1211
1217
"typeid={:?}" ,
1212
1218
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 ,
1215
1229
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 ,
1216
1243
PyDict ,
1217
1244
PyEnumerate ,
1218
1245
PyFilter ,
1219
1246
PyFunction ,
1220
1247
PyList ,
1221
1248
PyMappingProxy ,
1222
1249
PyProperty ,
1250
+ PyRange ,
1223
1251
PySet ,
1224
1252
PySlice ,
1225
1253
PyStaticMethod ,
1254
+ PyStr ,
1226
1255
PySuper ,
1227
1256
PyTraceback ,
1228
1257
PyTuple ,
0 commit comments