From 54df53a3522436e714ac6ea6f896bf790d31bc4e Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 14 Aug 2002 18:38:27 +0000 Subject: More changes of DeprecationWarning to FutureWarning. --- Lib/test/test_b1.py | 2 +- Lib/test/test_b2.py | 2 +- Objects/intobject.c | 8 ++++---- Objects/stringobject.c | 2 +- Objects/unicodeobject.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py index 938e76d..d80767b 100644 --- a/Lib/test/test_b1.py +++ b/Lib/test/test_b1.py @@ -2,7 +2,7 @@ import warnings warnings.filterwarnings("ignore", "hex../oct.. of negative int", - DeprecationWarning, __name__) + FutureWarning, __name__) from test.test_support import TestFailed, fcmp, have_unicode, TESTFN, unlink diff --git a/Lib/test/test_b2.py b/Lib/test/test_b2.py index d3653a5..d59e905 100644 --- a/Lib/test/test_b2.py +++ b/Lib/test/test_b2.py @@ -2,7 +2,7 @@ import warnings warnings.filterwarnings("ignore", "hex../oct.. of negative int", - DeprecationWarning, __name__) + FutureWarning, __name__) from test.test_support import TestFailed, fcmp, TESTFN, unlink, vereq diff --git a/Objects/intobject.c b/Objects/intobject.c index a8ea6ac..2cda031 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -671,7 +671,7 @@ int_lshift(PyIntObject *v, PyIntObject *w) if (a == 0 || b == 0) return int_pos(v); if (b >= LONG_BIT) { - if (PyErr_Warn(PyExc_DeprecationWarning, + if (PyErr_Warn(PyExc_FutureWarning, "x< ob_ival; if (x < 0) { - if (PyErr_Warn(PyExc_DeprecationWarning, + if (PyErr_Warn(PyExc_FutureWarning, "hex()/oct() of negative int will return " "a signed string in Python 2.4 and up") < 0) return NULL; @@ -792,7 +792,7 @@ int_hex(PyIntObject *v) char buf[100]; long x = v -> ob_ival; if (x < 0) { - if (PyErr_Warn(PyExc_DeprecationWarning, + if (PyErr_Warn(PyExc_FutureWarning, "hex()/oct() of negative int will return " "a signed string in Python 2.4 and up") < 0) return NULL; diff --git a/Objects/stringobject.c b/Objects/stringobject.c index a21e021..bf1c58e 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -3469,7 +3469,7 @@ formatint(char *buf, size_t buflen, int flags, return -1; } if (x < 0 && type != 'd' && type != 'i') { - if (PyErr_Warn(PyExc_DeprecationWarning, + if (PyErr_Warn(PyExc_FutureWarning, "%u/%o/%x/%X of negative int will return " "a signed string in Python 2.4 and up") < 0) return -1; diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d0fe24c..4ac12a0 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5338,7 +5338,7 @@ formatint(Py_UNICODE *buf, if (x == -1 && PyErr_Occurred()) return -1; if (x < 0 && type != 'd' && type != 'i') { - if (PyErr_Warn(PyExc_DeprecationWarning, + if (PyErr_Warn(PyExc_FutureWarning, "%u/%o/%x/%X of negative int will return " "a signed string in Python 2.4 and up") < 0) return -1; -- cgit v0.12