PyErr_Warn is deprecated in 2.5 - goes away for 3.0

This commit is contained in:
Skip Montanaro 2007-08-12 11:44:53 +00:00
parent 447e7c3981
commit 46fc337395
11 changed files with 40 additions and 55 deletions

View file

@ -5344,8 +5344,9 @@ posix_tempnam(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
return NULL;
if (PyErr_Warn(PyExc_RuntimeWarning,
"tempnam is a potential security risk to your program") < 0)
if (PyErr_WarnEx(PyExc_RuntimeWarning,
"tempnam is a potential security risk to your program",
1) < 0)
return NULL;
#ifdef MS_WINDOWS
@ -5391,8 +5392,9 @@ posix_tmpnam(PyObject *self, PyObject *noargs)
char buffer[L_tmpnam];
char *name;
if (PyErr_Warn(PyExc_RuntimeWarning,
"tmpnam is a potential security risk to your program") < 0)
if (PyErr_WarnEx(PyExc_RuntimeWarning,
"tmpnam is a potential security risk to your program",
1) < 0)
return NULL;
#ifdef USE_TMPNAM_R