diff options
| author | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 +0000 | 
|---|---|---|
| committer | Skip Montanaro <skip@pobox.com> | 2007-08-12 11:44:53 +0000 | 
| commit | 46fc337395753e5b927f6dcccc549c54550b197e (patch) | |
| tree | 36c450714b34d4ee7f5ae1d1490d4a1ecac254e8 /Objects/unicodeobject.c | |
| parent | 447e7c398158323af7757def0cf715fabfc707fa (diff) | |
| download | cpython-git-46fc337395753e5b927f6dcccc549c54550b197e.tar.gz | |
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 19 | 
1 files changed, 10 insertions, 9 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 8288f1ebea..6b27adb73c 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -5990,15 +5990,16 @@ PyObject *PyUnicode_RichCompare(PyObject *left,      if (!PyErr_ExceptionMatches(PyExc_UnicodeDecodeError))          return NULL;      PyErr_Clear(); -    if (PyErr_Warn(PyExc_UnicodeWarning,  -                   (op == Py_EQ) ?  -                   "Unicode equal comparison " -                   "failed to convert both arguments to Unicode - " -                   "interpreting them as being unequal" : -                   "Unicode unequal comparison " -                   "failed to convert both arguments to Unicode - " -                   "interpreting them as being unequal" -                   ) < 0) +    if (PyErr_WarnEx(PyExc_UnicodeWarning,  +                     (op == Py_EQ) ?  +                     "Unicode equal comparison " +                     "failed to convert both arguments to Unicode - " +                     "interpreting them as being unequal" +                     : +                     "Unicode unequal comparison " +                     "failed to convert both arguments to Unicode - " +                     "interpreting them as being unequal", +                     1) < 0)          return NULL;      result = (op == Py_NE);      return PyBool_FromLong(result);  | 
