If a classic class defined a __coerce__() method that just returned its two
arguments in reverse, the interpreter would infinitely recourse trying to get a
coercion that worked. So put in a recursion check after a coercion is made and
the next call to attempt to use the coerced values.
Fixes bug #992017 and closes crashers/coerce.py .
diff --git a/Misc/NEWS b/Misc/NEWS
index 82838f3..d7dfb8f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
Core and builtins
-----------------
+- Bug #992017: A classic class that defined a __coerce__() method that returned
+ its arguments swapped would infinitely recurse and segfault the interpreter.
+
- Fix the socket tests so they can be run concurrently.
- Removed 5 integers from C frame objects (PyFrameObject).