summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/complexobject.c2
-rw-r--r--Objects/floatobject.c2
2 files changed, 2 insertions, 2 deletions
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 @@ complex_classic_div(PyComplexObject *v, PyComplexObject *w)
{
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 @@ float_classic_div(PyObject *v, PyObject *w)
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) {