Issue #17576: Removed deprecation warnings added in changeset 618cca51a27e.

This commit is contained in:
Serhiy Storchaka 2013-12-14 21:07:09 +02:00
parent 84d28b4ee5
commit c836a28cc1
6 changed files with 12 additions and 45 deletions

View file

@ -1162,15 +1162,6 @@ PyNumber_Index(PyObject *item)
Py_DECREF(result);
return NULL;
}
/* Issue #17576: warn if 'result' not of exact type int. */
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
"__index__ returned non-int (type %.200s). "
"The ability to return an instance of a strict subclass of int "
"is deprecated, and may be removed in a future version of Python.",
result->ob_type->tp_name)) {
Py_DECREF(result);
return NULL;
}
return result;
}

View file

@ -153,15 +153,6 @@ _PyLong_FromNbInt(PyObject *integral)
Py_DECREF(result);
return NULL;
}
/* Issue #17576: warn if 'result' not of exact type int. */
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
"__int__ returned non-int (type %.200s). "
"The ability to return an instance of a strict subclass of int "
"is deprecated, and may be removed in a future version of Python.",
result->ob_type->tp_name)) {
Py_DECREF(result);
return NULL;
}
return (PyLongObject *)result;
}