@@ -7693,7 +7693,7 @@ parse_posix_spawn_flags(PyObject *module, const char *func_name, PyObject *setpg
76937693 }
76947694#endif
76957695
7696- if (scheduler) {
7696+ if (scheduler && scheduler != Py_None ) {
76977697#ifdef POSIX_SPAWN_SETSCHEDULER
76987698 PyObject *py_schedpolicy;
76997699 PyObject *schedparam_obj;
@@ -7918,9 +7918,9 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, path_t *path, PyObject *a
79187918 goto exit;
79197919 }
79207920
7921- if (scheduler && !PyTuple_Check( scheduler) ) {
7921+ if (!PyTuple_Check( scheduler) && scheduler != Py_None ) {
79227922 PyErr_Format(PyExc_TypeError,
7923- "%s: scheduler must be a tuple", func_name);
7923+ "%s: scheduler must be a tuple or None ", func_name);
79247924 goto exit;
79257925 }
79267926
@@ -8045,7 +8045,7 @@ os.posix_spawn
80458045 The sigmask to use with the POSIX_SPAWN_SETSIGMASK flag.
80468046 setsigdef: object(c_default='NULL') = ()
80478047 The sigmask to use with the POSIX_SPAWN_SETSIGDEF flag.
8048- scheduler: object = NULL
8048+ scheduler: object(c_default='NULL') = None
80498049 A tuple with the scheduler policy (optional) and parameters.
80508050
80518051Execute the program specified by path in a new process.
@@ -8057,7 +8057,7 @@ os_posix_spawn_impl(PyObject *module, path_t *path, PyObject *argv,
80578057 PyObject *setpgroup, int resetids, int setsid,
80588058 PyObject *setsigmask, PyObject *setsigdef,
80598059 PyObject *scheduler)
8060- /*[clinic end generated code: output=14a1098c566bc675 input=808aed1090d84e33 ]*/
8060+ /*[clinic end generated code: output=14a1098c566bc675 input=242939f993243c45 ]*/
80618061{
80628062 return py_posix_spawn(0, module, path, argv, env, file_actions,
80638063 setpgroup, resetids, setsid, setsigmask, setsigdef,
@@ -8091,7 +8091,7 @@ os.posix_spawnp
80918091 The sigmask to use with the POSIX_SPAWN_SETSIGMASK flag.
80928092 setsigdef: object(c_default='NULL') = ()
80938093 The sigmask to use with the POSIX_SPAWN_SETSIGDEF flag.
8094- scheduler: object = NULL
8094+ scheduler: object(c_default='NULL') = None
80958095 A tuple with the scheduler policy (optional) and parameters.
80968096
80978097Execute the program specified by path in a new process.
@@ -8103,7 +8103,7 @@ os_posix_spawnp_impl(PyObject *module, path_t *path, PyObject *argv,
81038103 PyObject *setpgroup, int resetids, int setsid,
81048104 PyObject *setsigmask, PyObject *setsigdef,
81058105 PyObject *scheduler)
8106- /*[clinic end generated code: output=7b9aaefe3031238d input=9e89e616116752a1 ]*/
8106+ /*[clinic end generated code: output=7b9aaefe3031238d input=e77db185549d088c ]*/
81078107{
81088108 return py_posix_spawn(1, module, path, argv, env, file_actions,
81098109 setpgroup, resetids, setsid, setsigmask, setsigdef,
0 commit comments