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
import warnings
warnings.filterwarnings("ignore", "hex../oct.. of negative int",
- DeprecationWarning, __name__)
+ FutureWarning, __name__)
from test.test_support import TestFailed, fcmp, TESTFN, unlink, vereq
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;
}
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;
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;
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;
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;
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;