cpython/Lib
Miss Islington (bot) 1e2707d7e8 bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15706)
As noted by @eryksun in [1] and [2], using _cleanup and _active(in
__del__) is not necessary on Windows, since:

> Unlike Unix, a process in Windows doesn't have to be waited on by
> its parent to avoid a zombie. Keeping the handle open will actually
> create a zombie until the next _cleanup() call, which may be never
> 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/issue37380GH-msg346333
[2] https://bugs.python.org/issue36067GH-msg336262

Signed-off-by: Ruslan Kuprieiev <ruslan@iterative.ai>
(cherry picked from commit 042821ae3c)

Co-authored-by: Ruslan Kuprieiev <kupruser@gmail.com>
2019-09-06 11:14:24 +02:00
..
asyncio [3.7] bpo-37279: Fix asyncio sendfile support when extra data are sent in fallback mode. (GH-14075). (GH-14103) 2019-06-15 14:56:27 +03:00
collections [3.7] Fix typos in docs, comments and test assert messages (GH-14872). (#14901) 2019-07-22 14:14:07 -04:00
concurrent Fix typo in Lib/concurrent/futures/thread.py (GH-13953) 2019-06-15 05:11:15 -07:00
ctypes bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) 2019-06-14 09:30:27 -07:00
curses [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
dbm
distutils closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. (GH-15560) 2019-08-28 10:37:38 -07:00
email [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654) 2019-09-03 09:42:53 -07:00
encodings
ensurepip [3.7] bpo-37664: Update ensurepip bundled wheels, again (GH-15483) (GH-15529) 2019-08-26 12:19:53 -07:00
html
http Correct description of HTTP status code 308. (GH-15097) 2019-08-03 11:40:09 -07:00
idlelib bpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368) 2019-09-04 18:58:22 -07:00
importlib [3.7] Fix typos in docs, comments and test assert messages (GH-14872). (#14901) 2019-07-22 14:14:07 -04:00
json
lib2to3 closes bpo-37675: Use pkgutil.iter_modules to find fixers in a package rather than listdir. (14942) 2019-07-24 16:57:39 -07:00
logging bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113) 2019-06-01 02:36:29 -07:00
msilib bpo-12639: msilib.Directory.start_component() fails if *keyfile* is not None (GH-13688) 2019-05-31 10:22:14 -07:00
multiprocessing bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572) 2019-07-04 03:45:58 -07:00
pydoc_data 3.7.4rc1 2019-06-18 17:02:54 -04:00
site-packages
sqlite3
test bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15706) 2019-09-06 11:14:24 +02:00
tkinter
turtledemo
unittest bpo-36871: Ensure method signature is used when asserting mock calls to a method (GH15577) 2019-08-29 07:57:37 +01:00
urllib bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay or request rate (GH-11791) 2019-06-16 00:10:06 -07:00
venv bpo-37369: Fix venv and test symlinking (GH-14456) 2019-06-28 11:41:55 -07:00
wsgiref bpo-29183: Fix double exceptions in wsgiref.handlers.BaseHandler (GH-12914) 2019-05-19 19:28:38 +03:00
xml
xmlrpc
__future__.py
__phello__.foo.py
_bootlocale.py
_collections_abc.py
_compat_pickle.py
_compression.py
_dummy_thread.py bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943) 2019-06-17 01:28:43 -07:00
_markupbase.py
_osx_support.py
_py_abc.py
_pydecimal.py
_pyio.py bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601) 2019-05-27 17:05:49 -07:00
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
aifc.py
antigravity.py
argparse.py bpo-29553: Fix ArgumentParser.format_usage() for mutually exclusive groups (GH-14976) 2019-08-26 00:30:49 +03:00
ast.py bpo-37950: Fix ast.dump() when call with incompletely initialized node. (GH-15510) 2019-08-29 00:04:44 -07:00
asynchat.py
asyncore.py
base64.py
bdb.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
binhex.py
bisect.py
bz2.py
cProfile.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
calendar.py
cgi.py
cgitb.py
chunk.py
cmd.py
code.py
codecs.py bpo-33361: Fix bug with seeking in StreamRecoders (GH-8278) 2019-05-31 23:03:22 +03:00
codeop.py
colorsys.py
compileall.py
configparser.py
contextlib.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
contextvars.py
copy.py
copyreg.py
crypt.py bpo-31702: Allow to specify rounds for SHA-2 hashing in crypt.mksalt(). (#4110) 2017-11-16 13:22:51 +02:00
csv.py
dataclasses.py bpo-37868: Improve is_dataclass for instances. (GH-15325) 2019-08-19 23:01:55 -07:00
datetime.py bpo-37642: Update acceptable offsets in timezone (GH-14878) (#15226) 2019-08-15 15:09:37 -04:00
decimal.py
difflib.py
dis.py
doctest.py
dummy_threading.py
enum.py
filecmp.py
fileinput.py bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545) (GH-13753) 2019-06-02 23:36:34 +02:00
fnmatch.py
formatter.py
fractions.py
ftplib.py
functools.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
genericpath.py bpo-30974: Change os.path.samefile docstring to match docs (GH-7337) 2019-08-02 16:11:33 -07:00
getopt.py
getpass.py
gettext.py
glob.py
gzip.py
hashlib.py
heapq.py
hmac.py
imaplib.py
imghdr.py
imp.py
inspect.py bpo-37173: Show passed class in inspect.getfile error (GH-13861) 2019-06-08 08:27:06 -07:00
io.py
ipaddress.py bpo-27860: ipaddress: fix Interface constructor (GH-14200) 2019-06-19 20:47:39 +09:00
keyword.py
linecache.py
locale.py bpo-18378: Recognize "UTF-8" as a valid name in locale._parse_localename (GH-14736) 2019-08-28 21:52:43 -07:00
lzma.py
macpath.py
mailbox.py
mailcap.py
mimetypes.py [3.7] bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522) (GH-15687) 2019-09-04 18:16:39 -07:00
modulefinder.py
netrc.py
nntplib.py
ntpath.py
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py
pathlib.py [3.7] bpo-36035: fix Path.rglob for broken links (GH-11988) (GH-13469) 2019-05-21 12:05:08 -07:00
pdb.py bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847) 2019-08-02 15:40:14 -07:00
pickle.py bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. (GH-11859) 2019-06-12 04:50:11 -07:00
pickletools.py
pipes.py
pkgutil.py
platform.py [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136) 2019-05-06 13:55:19 -07:00
plistlib.py Clarify that plistlib's load and dump functions take a binary file object (GH-9825) 2019-07-14 02:23:38 -07:00
poplib.py
posixpath.py [3.7] bpo-35755: shutil.which() uses os.confstr("CS_PATH") (GH-12862) 2019-04-17 18:38:06 +02:00
pprint.py
profile.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
pstats.py [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136) 2019-05-06 13:55:19 -07:00
pty.py
py_compile.py
pyclbr.py
pydoc.py
queue.py
quopri.py
random.py
re.py
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py bpo-24564: shutil.copystat(): ignore EINVAL on os.setxattr() (GH-13369) 2019-05-30 13:58:30 +08:00
signal.py
site.py bpo-37369: Fixes path for sys.executable when running from the Microsoft Store (GH-14450) 2019-06-28 10:02:13 -07:00
smtpd.py
smtplib.py
sndhdr.py
socket.py
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py bpo-37723: Fix performance regression on regular expression parsing. (GH-15030) 2019-07-31 13:22:19 -07:00
ssl.py bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499) 2019-07-02 14:22:53 -07:00
stat.py
statistics.py
string.py
stringprep.py
struct.py
subprocess.py bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15706) 2019-09-06 11:14:24 +02:00
sunau.py
symbol.py
symtable.py
sysconfig.py
tabnanny.py
tarfile.py
telnetlib.py
tempfile.py
textwrap.py bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469) 2019-06-29 21:38:11 -07:00
this.py
threading.py Improve threading.daemon docstring (GH-14278) 2019-06-23 12:05:10 -07:00
timeit.py
token.py
tokenize.py [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136) 2019-05-06 13:55:19 -07:00
trace.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
traceback.py
tracemalloc.py
tty.py
turtle.py [3.7] bpo-36766: Typos in docs and code comments (GH-13116). (GH-13136) 2019-05-06 13:55:19 -07:00
types.py
typing.py [3.7] bpo-36983: Fix typing.__all__ and add test for exported names (GH-13456) (GH-13662) 2019-05-29 21:05:33 -07:00
uu.py
uuid.py [3.7] bpo-34621: backwards-compatible pickle UUID with is_safe=unknown (GH-14834) 2019-08-04 22:26:32 +03:00
warnings.py
wave.py
weakref.py [3.7] bpo-36492: Fix passing special keyword arguments to some functions. (GH-12637) (GH-12645) 2019-04-01 10:59:24 +03:00
webbrowser.py
xdrlib.py
zipapp.py
zipfile.py bpo-22102: Fixes zip files with disks set to 0 (GH-5985) 2019-05-28 16:33:21 -07:00