You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leak test of test_descr fails Base2 != Base #133122
Some progress on debugging this. It seems to be an issue with the specialize. In specialize.c, we have analyze_descriptor() calling _PyType_Lookup() and that's causing the tricky __eq__ to be executed before the real lookup happens. So the __bases__ gets replaced before the unit test expects. At least, that's my theory.
I'm not sure if we consider the bytecode specializer buggy for doing this or the unit test buggy for expecting it to work exactly as is being test. Perhaps you can not expect deterministic results when changing __bases__while doing a type lookup.
Activity
nascheme commentedon Apr 29, 2025
Some progress on debugging this. It seems to be an issue with the specialize. In specialize.c, we have
analyze_descriptor()calling_PyType_Lookup()and that's causing the tricky__eq__to be executed before the real lookup happens. So the__bases__gets replaced before the unit test expects. At least, that's my theory.I'm not sure if we consider the bytecode specializer buggy for doing this or the unit test buggy for expecting it to work exactly as is being test. Perhaps you can not expect deterministic results when changing
__bases__while doing a type lookup.[3.13] gh-133122: Fix for test_type_lookup_mro_reference. (gh-133127)