PEP 238 documented -Qwarn as warning only for classic int or long
division, and this makes sense. Add -Qwarnall to warn for all
classic divisions, as required by the fixdiv.py tool.
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 281de13..236f4d5 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -377,7 +377,7 @@
{
Py_complex quot;
- if (Py_DivisionWarningFlag &&
+ if (Py_DivisionWarningFlag >= 2 &&
PyErr_Warn(PyExc_DeprecationWarning,
"classic complex division") < 0)
return NULL;
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 8cd26b4..478e131 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -419,7 +419,7 @@
double a,b;
CONVERT_TO_DOUBLE(v, a);
CONVERT_TO_DOUBLE(w, b);
- if (Py_DivisionWarningFlag &&
+ if (Py_DivisionWarningFlag >= 2 &&
PyErr_Warn(PyExc_DeprecationWarning, "classic float division") < 0)
return NULL;
if (b == 0.0) {