We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f14f0ba commit 61fc657Copy full SHA for 61fc657
1 file changed
Lib/test/test_gc.py
@@ -1517,6 +1517,23 @@ def test_ast_fini(self):
1517
""")
1518
assert_python_ok("-c", code)
1519
1520
+ def test_reset_type_cache_after_finalization(self):
1521
+ # https://github.com/python/cpython/issues/135552
1522
+ code = textwrap.dedent("""
1523
+ class BaseNode:
1524
+ def __del__(self):
1525
+ BaseNode.next = BaseNode.next.next
1526
+
1527
1528
+ class Node(BaseNode):
1529
+ pass
1530
1531
1532
+ BaseNode.next = Node()
1533
+ BaseNode.next.next = Node()
1534
+ """)
1535
+ assert_python_ok("-c", code)
1536
1537
1538
def setUpModule():
1539
global enabled, debug
0 commit comments