Skip to content

Commit d7befad

Browse files
authored
bpo-35537: Document posix_spawn() change in subprocess (GH-11668)
Document that subprocess.Popen no longer raise an exception on error like missing program on very specific platforms when using os.posix_spawn() is used.
1 parent 0ef8c15 commit d7befad

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Doc/library/subprocess.rst

+7
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,13 @@ functions.
567567
Popen destructor now emits a :exc:`ResourceWarning` warning if the child
568568
process is still running.
569569

570+
.. versionchanged:: 3.8
571+
Popen can use :func:`os.posix_spawn` in some cases for better
572+
performance. On Windows Subsystem for Linux and QEMU User Emulation,
573+
Popen constructor using :func:`os.posix_spawn` no longer raise an
574+
exception on errors like missing program, but the child process fails
575+
with a non-zero :attr:`~Popen.returncode`.
576+
570577

571578
Exceptions
572579
^^^^^^^^^^

Doc/whatsnew/3.8.rst

+6
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,12 @@ Changes in Python behavior
729729
Changes in the Python API
730730
-------------------------
731731

732+
* :class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases
733+
for better performance. On Windows Subsystem for Linux and QEMU User
734+
Emulation, Popen constructor using :func:`os.posix_spawn` no longer raise an
735+
exception on errors like missing program, but the child process fails with a
736+
non-zero :attr:`~Popen.returncode`.
737+
732738
* The :meth:`imap.IMAP4.logout` method no longer ignores silently arbitrary
733739
exceptions.
734740

0 commit comments

Comments
 (0)