◐ Shell
clean mode source ↗

bpo-46329: Fix refleak in specialized `isinstance` error path by Fidget-Spinner · Pull Request #31005 · python/cpython

@pablogsal This fixes a refleak in GH-30855. Hopefully that means the refleak buildbots will now be green.

Before:

python -m test test_types -R 3:3 -m '*UnionTests.test_or_type_operator_with_genericalias'
0:00:00 Run tests sequentially
0:00:00 [1/1] test_types
beginning 6 repetitions
123456
......
test_types leaked [47, 47, 47] references, sum=141
test_types leaked [22, 22, 22] memory blocks, sum=66
test_types failed (reference leak)

After:

0:00:00 [1/1] test_types
beginning 6 repetitions
123456
......
== Tests result: SUCCESS ==