=== modified file 'Modules/posixmodule.c' *** Modules/posixmodule.c 2008-11-08 03:46:17 +0000 --- Modules/posixmodule.c 2008-12-14 20:43:47 +0000 *************** *** 4125,4130 **** --- 4125,4135 ---- int err, bufsize = -1; FILE *fp; PyObject *f; + + if (PyErr_WarnPy3k("popen has been removed in 3.0. Use " + "subprocess.Popen instead", 1) < 0) + return NULL; + if (!PyArg_ParseTuple(args, "s|si:popen", &name, &mode, &bufsize)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 4150,4155 **** --- 4155,4165 ---- int bufsize = -1; FILE *fp; PyObject *f; + + if (PyErr_WarnPy3k("popen has been removed in 3.0. Use " + "subprocess.Popen instead", 1) < 0) + return NULL; + if (!PyArg_ParseTuple(args, "s|si:popen", &name, &mode, &bufsize)) return NULL; Py_BEGIN_ALLOW_THREADS *************** *** 4762,4767 **** --- 4772,4782 ---- char *cmdstring; char *mode = "r"; int bufsize = -1; + + if (PyErr_WarnPy3k("popen has been removed in 3.0. Use " + "subprocess.Popen instead", 1) < 0) + return NULL; + if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize)) return NULL; *************** *** 5471,5476 **** --- 5486,5496 ---- int bufsize = -1; FILE *fp; PyObject *f; + + if (PyErr_WarnPy3k("popen has been removed in 3.0. Use " + "subprocess.Popen instead", 1) < 0) + return NULL; + if (!PyArg_ParseTuple(args, "s|si:popen", &name, &mode, &bufsize)) return NULL; /* Strip mode of binary or text modifiers */ *************** *** 6407,6412 **** --- 6427,6436 ---- FILE *fp; PyObject *f; char *mode; + + if (PyErr_WarnPy3k("fdopen has been removed in 3.0", 1) < 0) + return NULL; + if (!PyArg_ParseTuple(args, "i|si", &fd, &orgmode, &bufsize)) return NULL; *************** *** 7038,7043 **** --- 7062,7070 ---- "tempnam is a potential security risk to your program") < 0) return NULL; + if (PyErr_WarnPy3k("tempnam has been removed in 3.0", 1) < 0) + return NULL; + #ifdef MS_WINDOWS name = _tempnam(dir, pfx); #else *************** *** 7062,7067 **** --- 7089,7097 ---- { FILE *fp; + if (PyErr_WarnPy3k("tmpfile has been removed in 3.0", 1) < 0) + return NULL; + fp = tmpfile(); if (fp == NULL) return posix_error(); *************** *** 7085,7090 **** --- 7115,7123 ---- "tmpnam is a potential security risk to your program") < 0) return NULL; + if (PyErr_WarnPy3k("tmpnam has been removed in 3.0", 1) < 0) + return NULL; + #ifdef USE_TMPNAM_R name = tmpnam_r(buffer); #else