This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients corona10, iritkatriel, vstinner
Date 2021-08-12.14:52:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The problem disappears if I add a gc.collect() loop at the beginning of the new test:

diff --git a/Lib/test/ b/Lib/test/
index 79798ecf05..e0aeac9d10 100644
--- a/Lib/test/
+++ b/Lib/test/
@@ -1014,6 +1014,7 @@ def cycle():
     def test_no_hang_on_context_chain_cycle2(self):
         # See issue 25782. Cycle at head of context chain.
+        while gc.collect(): pass
         class A(Exception):
Date User Action Args
2021-08-12 14:52:18iritkatrielsetrecipients: + iritkatriel, vstinner, corona10
2021-08-12 14:52:17iritkatrielsetmessageid: <>
2021-08-12 14:52:17iritkatriellinkissue44895 messages
2021-08-12 14:52:17iritkatrielcreate