]> granicus.if.org Git - python/commitdiff
More changes of DeprecationWarning to FutureWarning.
authorGuido van Rossum <guido@python.org>
Wed, 14 Aug 2002 18:38:27 +0000 (18:38 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 14 Aug 2002 18:38:27 +0000 (18:38 +0000)
Lib/test/test_b1.py
Lib/test/test_b2.py
Objects/intobject.c
Objects/stringobject.c
Objects/unicodeobject.c

index 938e76d5ae70be081d9f9607eb5568b5f52cb66b..d80767b0ccd625814b1ef1d4e37396b9302d6ef7 100644 (file)
@@ -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
 
index d3653a55a80a9256d3270c22cba18c9932d18385..d59e9052bf96474d5eeea3cd5254b07043b6b071 100644 (file)
@@ -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
 
index a8ea6ac1f51a8ca48f16b81c4ecbaa78df6bbc64..2cda031d2e153cb83b2d07a025a93f8c108e7af8 100644 (file)
@@ -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<<y losing bits or changing sign "
                               "will return a long in Python 2.4 and up") < 0)
                        return NULL;
@@ -679,7 +679,7 @@ int_lshift(PyIntObject *v, PyIntObject *w)
        }
        c = a << b;
        if (a != Py_ARITHMETIC_RIGHT_SHIFT(long, c, b)) {
-               if (PyErr_Warn(PyExc_DeprecationWarning,
+               if (PyErr_Warn(PyExc_FutureWarning,
                               "x<<y losing bits or changing sign "
                               "will return a long in Python 2.4 and up") < 0)
                        return NULL;
@@ -774,7 +774,7 @@ int_oct(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;
@@ -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;
index a21e021d925e0dce77fe4ebb3a3adbee59a05d03..bf1c58eab2599667221dc1a801205f7bbffe329a 100644 (file)
@@ -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;
index d0fe24c9dc192bd2d41e66f10815b1766ebd00c7..4ac12a05518309f04be6be5dd6ec75bd8ccc7aa0 100644 (file)
@@ -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;