]> granicus.if.org Git - python/commitdiff
bpo-35537: Document posix_spawn() change in subprocess (GH-11668)
authorVictor Stinner <vstinner@redhat.com>
Thu, 25 Apr 2019 12:30:16 +0000 (14:30 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Apr 2019 12:30:16 +0000 (14:30 +0200)
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.

Doc/library/subprocess.rst
Doc/whatsnew/3.8.rst

index ca0813c7830ad078f7e796271708c96ead2663df..3280c95cacbbc36c5f9e021e121e8749ed4add49 100644 (file)
@@ -567,6 +567,13 @@ functions.
       Popen destructor now emits a :exc:`ResourceWarning` warning if the child
       process is still running.
 
+   .. versionchanged:: 3.8
+      Popen can use :func:`os.posix_spawn` in some cases for better
+      performance. On Windows Subsystem for Linux and QEMU User Emulation,
+      Popen constructor using :func:`os.posix_spawn` no longer raise an
+      exception on errors like missing program, but the child process fails
+      with a non-zero :attr:`~Popen.returncode`.
+
 
 Exceptions
 ^^^^^^^^^^
index ae8163a1b156fc9e022097c3bff825032971438e..344656b9288f6526f0d475102eaf997d3e44e8fe 100644 (file)
@@ -729,6 +729,12 @@ Changes in Python behavior
 Changes in the Python API
 -------------------------
 
+* :class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases
+  for better performance. On Windows Subsystem for Linux and QEMU User
+  Emulation, Popen constructor using :func:`os.posix_spawn` no longer raise an
+  exception on errors like missing program, but the child process fails with a
+  non-zero :attr:`~Popen.returncode`.
+
 * The :meth:`imap.IMAP4.logout` method no longer ignores silently arbitrary
   exceptions.