Not planned
Description
Bug report
Bug description:
given
import gc
import sys
class Foo:
def __del__(self):
raise ValueError("__del__ is broken")
def main():
v = None
def unraisablehook(unraisable_arg):
nonlocal v
v = unraisable_arg
sys.unraisablehook = unraisablehook
Foo()
gc.collect()
print(v.object)
if __name__ == "__main__":
sys.exit(main())
On Python 3.13 you get <function Foo.__del__ at 0x7181347936a0>
on 3.14 you get None
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Activity
graingert commentedon May 26, 2025
sometime between v3.14.0a4 and v3.14.0a5
graingert commentedon May 26, 2025
bisected to a25042e
graingert commentedon May 26, 2025
looks intentional:
graingert commentedon May 26, 2025
closing this as not planed because it's an intentional change