mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
PyErr_Warn is deprecated in 2.5 - goes away for 3.0
This commit is contained in:
parent
447e7c3981
commit
46fc337395
11 changed files with 40 additions and 55 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue