don't expand the operand to Py_XINCREF/XDECREF/CLEAR/DECREF multiple times (closes #17206)
A patch from Illia Polosukhin.
diff --git a/Misc/ACKS b/Misc/ACKS
index 578c59d..3c9e24e 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -983,6 +983,7 @@
Remi Pointel
Ariel Poliak
Guilherme Polo
+Illia Polosukhin
Michael Pomraning
Iustin Pop
Claudiu Popa
diff --git a/Misc/NEWS b/Misc/NEWS
index 7dabb2e..737672a 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,10 @@
Core and Builtins
-----------------
+- Issue #17206: Py_CLEAR(), Py_DECREF(), Py_XINCREF() and Py_XDECREF() now
+ expands their arguments once instead of multiple times.
+ Patch written by Illia Polosukhin.
+
- Issue #17937: Try harder to collect cyclic garbage at shutdown.
- Issue #12370: Prevent class bodies from interfering with the __class__