<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/subprocess.py, branch alex-patch-1</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-37380: subprocess: don't use _active on win (GH-14360)</title>
<updated>2019-06-28T16:12:16+00:00</updated>
<author>
<name>Ruslan Kuprieiev</name>
<email>kupruser@gmail.com</email>
</author>
<published>2019-06-28T16:12:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=042821ae3cf537e01963c9ec85d1a454d921e826'/>
<id>042821ae3cf537e01963c9ec85d1a454d921e826</id>
<content type='text'>
As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

&gt; Unlike Unix, a process in Windows doesn't have to be waited on by
&gt; its parent to avoid a zombie. Keeping the handle open will actually
&gt; create a zombie until the next _cleanup() call, which may be never
&gt; if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380#msg346333
[2] https://bugs.python.org/issue36067#msg336262

Signed-off-by: Ruslan Kuprieiev &lt;ruslan@iterative.ai&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

&gt; Unlike Unix, a process in Windows doesn't have to be waited on by
&gt; its parent to avoid a zombie. Keeping the handle open will actually
&gt; create a zombie until the next _cleanup() call, which may be never
&gt; if Popen() isn't called again.

This patch simply defines `subprocess._active` as `None`, for which we already
have the proper logic in place in `subprocess.Popen.__del__`, that prevents it
from trying to append the process to the `_active`. This patch also defines
`subprocess._cleanup` as a noop for Windows.

[1] https://bugs.python.org/issue37380#msg346333
[2] https://bugs.python.org/issue36067#msg336262

Signed-off-by: Ruslan Kuprieiev &lt;ruslan@iterative.ai&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37363: Add audit events for a range of modules (GH-14301)</title>
<updated>2019-06-24T15:42:54+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@python.org</email>
</author>
<published>2019-06-24T15:42:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=60419a7e96577cf783b3b45bf3984f9fb0d7ddff'/>
<id>60419a7e96577cf783b3b45bf3984f9fb0d7ddff</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)</title>
<updated>2019-06-08T14:56:24+00:00</updated>
<author>
<name>Rémi Lapeyre</name>
<email>remi.lapeyre@henki.fr</email>
</author>
<published>2019-06-08T14:56:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8cc605acdda5aff250ab4c9b524a7560f90ca9f3'/>
<id>8cc605acdda5aff250ab4c9b524a7560f90ca9f3</id>
<content type='text'>
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args
when they were explicitly provided but with `None` values within a passed in
`**kwargs` dict rather than as passed directly by name.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31961: Fix support of path-like executables in subprocess. (GH-5914)</title>
<updated>2019-05-28T19:49:35+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-05-28T19:49:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9e3c4526394856d6376eed4968d27d53e1d69b7d'/>
<id>9e3c4526394856d6376eed4968d27d53e1d69b7d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36793: Remove unneeded __str__ definitions. (GH-13081)</title>
<updated>2019-05-06T19:29:40+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-05-06T19:29:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=96aeaec64738b730c719562125070a52ed570210'/>
<id>96aeaec64738b730c719562125070a52ed570210</id>
<content type='text'>
Classes that define __str__ the same as __repr__ can
just inherit it from object.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Classes that define __str__ the same as __repr__ can
just inherit it from object.</pre>
</div>
</content>
</entry>
<entry>
<title>subprocess: close pipes/fds by using ExitStack (GH-11686)</title>
<updated>2019-01-29T21:14:24+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2019-01-29T21:14:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=bafa8487f77fa076de3a06755399daf81cb75598'/>
<id>bafa8487f77fa076de3a06755399daf81cb75598</id>
<content type='text'>
Close pipes/fds in subprocess by using ExitStack.

"In case of premature failure on X.Close() or os.close(X) the remaining pipes/fds will remain "open". Perhaps it makes sense to use contextlib.ExitStack."
- Rationale: https://github.com/python/cpython/pull/11575#discussion_r250288394
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Close pipes/fds in subprocess by using ExitStack.

"In case of premature failure on X.Close() or os.close(X) the remaining pipes/fds will remain "open". Perhaps it makes sense to use contextlib.ExitStack."
- Rationale: https://github.com/python/cpython/pull/11575#discussion_r250288394
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix docstr/comment typos in _use_posix_spawn(). (GH-11684)</title>
<updated>2019-01-26T23:19:11+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@krypto.org</email>
</author>
<published>2019-01-26T23:19:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef'/>
<id>81d04bcf2124341aa73e5c13c1f1c4bdd3f5dbef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35537: subprocess can use posix_spawn with pipes (GH-11575)</title>
<updated>2019-01-23T18:00:39+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-01-23T18:00:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f6243ac1e4828299fe5a8e943d7bd41cab1f34cd'/>
<id>f6243ac1e4828299fe5a8e943d7bd41cab1f34cd</id>
<content type='text'>
* subprocess.Popen can now also use os.posix_spawn() with pipes,
  but only if pipe file descriptors are greater than 2.
* Fix Popen._posix_spawn(): set '_child_created' attribute to True.
* Add Popen._close_pipe_fds() helper function to factorize the code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* subprocess.Popen can now also use os.posix_spawn() with pipes,
  but only if pipe file descriptors are greater than 2.
* Fix Popen._posix_spawn(): set '_child_created' attribute to True.
* Add Popen._close_pipe_fds() helper function to factorize the code.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)" (GH-11582)</title>
<updated>2019-01-16T22:38:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-01-16T22:38:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8c349565e8a442e17f1a954d1a9996847749d778'/>
<id>8c349565e8a442e17f1a954d1a9996847749d778</id>
<content type='text'>
This reverts commit 07858894689047c77f9c12ddc061d30681368d19.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 07858894689047c77f9c12ddc061d30681368d19.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35537: subprocess can now use os.posix_spawnp (GH-11579)</title>
<updated>2019-01-16T14:26:20+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-01-16T14:26:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=07858894689047c77f9c12ddc061d30681368d19'/>
<id>07858894689047c77f9c12ddc061d30681368d19</id>
<content type='text'>
The subprocess module can now use the os.posix_spawnp() function,
if it is available, to locate the program in the PATH.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The subprocess module can now use the os.posix_spawnp() function,
if it is available, to locate the program in the PATH.</pre>
</div>
</content>
</entry>
</feed>
