summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-09-08 11:48:18 (GMT)
committerGitHub <noreply@github.com>2018-09-08 11:48:18 (GMT)
commitd700f97b627989d41cd4629dc02969f9a6b56d2f (patch)
tree19a6aaabc32c32e409d6827bf69116f8b245d72b /Modules/clinic
parentfa221d804f1bc07d992f820069bad24f176ed66d (diff)
downloadcpython-d700f97b627989d41cd4629dc02969f9a6b56d2f.zip
cpython-d700f97b627989d41cd4629dc02969f9a6b56d2f.tar.gz
cpython-d700f97b627989d41cd4629dc02969f9a6b56d2f.tar.bz2
bpo-20104: Change the file_actions parameter of os.posix_spawn(). (GH-6725)
* Make its default value an empty tuple instead of None. * Make it a keyword-only parameter.
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/posixmodule.c.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
index f7767c4..c3849a9 100644
--- a/Modules/clinic/posixmodule.c.h
+++ b/Modules/clinic/posixmodule.c.h
@@ -1730,7 +1730,7 @@ exit:
#if defined(HAVE_POSIX_SPAWN)
PyDoc_STRVAR(os_posix_spawn__doc__,
-"posix_spawn($module, path, argv, env, file_actions=None, /, *,\n"
+"posix_spawn($module, path, argv, env, /, *, file_actions=(),\n"
" setpgroup=None, resetids=False, setsigmask=(),\n"
" setsigdef=(), scheduler=None)\n"
"--\n"
@@ -1769,12 +1769,12 @@ static PyObject *
os_posix_spawn(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
- static const char * const _keywords[] = {"", "", "", "", "setpgroup", "resetids", "setsigmask", "setsigdef", "scheduler", NULL};
- static _PyArg_Parser _parser = {"O&OO|O$OiOOO:posix_spawn", _keywords, 0};
+ static const char * const _keywords[] = {"", "", "", "file_actions", "setpgroup", "resetids", "setsigmask", "setsigdef", "scheduler", NULL};
+ static _PyArg_Parser _parser = {"O&OO|$OOiOOO:posix_spawn", _keywords, 0};
path_t path = PATH_T_INITIALIZE("posix_spawn", "path", 0, 0);
PyObject *argv;
PyObject *env;
- PyObject *file_actions = Py_None;
+ PyObject *file_actions = NULL;
PyObject *setpgroup = NULL;
int resetids = 0;
PyObject *setsigmask = NULL;
@@ -6648,4 +6648,4 @@ exit:
#ifndef OS_GETRANDOM_METHODDEF
#define OS_GETRANDOM_METHODDEF
#endif /* !defined(OS_GETRANDOM_METHODDEF) */
-/*[clinic end generated code: output=ef78384ae88712e1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=758ee0434fb03d90 input=a9049054013a1b77]*/