cpython/Lib
Victor Stinner 47cd10d7a9 asyncio: sync with Tulip
Issue #23347: send_signal(), kill() and terminate() methods of
BaseSubprocessTransport now check if the transport was closed and if the
process exited.

Issue #23347: Refactor creation of subprocess transports. Changes on
BaseSubprocessTransport:

* Add a wait() method to wait until the child process exit
* The constructor now accepts an optional waiter parameter. The _post_init()
  coroutine must not be called explicitly anymore. It makes subprocess
  transports closer to other transports, and it gives more freedom if we want
  later to change completly how subprocess transports are created.
* close() now kills the process instead of kindly terminate it: the child
  process may ignore SIGTERM and continue to run. Call explicitly terminate()
  and wait() if you want to kindly terminate the child process.
* close() now logs a warning in debug mode if the process is still running and
  needs to be killed
* _make_subprocess_transport() is now fully asynchronous again: if the creation
  of the transport failed, wait asynchronously for the process eixt. Before the
  wait was synchronous. This change requires close() to *kill*, and not
  terminate, the child process.
* Remove the _kill_wait() method, replaced with a more agressive close()
  method. It fixes _make_subprocess_transport() on error.
  BaseSubprocessTransport.close() calls the close() method of pipe transports,
  whereas _kill_wait() closed directly pipes of the subprocess.Popen object
  without unregistering file descriptors from the selector (which caused severe
  bugs).

These changes simplifies the code of subprocess.py.
2015-01-30 00:05:19 +01:00
..
asyncio asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
collections Issue #22609: Revert changes in UserDict. They conflicted with existing tests. 2014-11-27 17:45:44 +02:00
concurrent Issue #20319: concurrent.futures.wait() can block forever even if Futures have completed 2014-02-01 11:49:04 +11:00
ctypes Closes #23256: Avoid a crash in test_ctypes 2015-01-17 08:50:42 -06:00
curses Fix docstring in curses (#16782) 2012-12-29 23:09:32 +02:00
dbm Issue #21729: Used the "with" statement in the dbm.dumb module to ensure 2014-06-25 20:35:31 +03:00
distutils fix parsing reST with code or code-block directives (closes #23063) 2015-01-14 23:56:35 -05:00
email handle headers with no key (closes #19996) 2015-01-25 23:30:30 -05:00
encodings Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x. 2014-11-07 14:04:37 +02:00
ensurepip Update setuptools to 12.0.5 and pip to 6.0.7 2015-01-28 17:56:15 -05:00
html Issue #23181: More "codepoint" -> "code point". 2015-01-18 11:28:37 +02:00
http capitialize "HttpOnly" and "Secure" as they appear in the standard and other impls (closes #23250) 2015-01-16 20:43:55 -05:00
idlelib Issue #23180: Rename IDLE "Windows" menu item to "Window". 2015-01-17 21:06:27 -08:00
importlib - Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is 2014-12-01 17:10:10 -05:00
json Remove mentions of Python 2.x and being externally maintained from 2013-12-08 00:39:36 -08:00
lib2to3 Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
logging Issue #23207: logging.basicConfig() now does additional validation of its arguments. 2015-01-23 19:52:21 +00:00
msilib Issue #17047: remove doubled words found in 2.7 to 3.4 Lib/*, 2013-03-11 17:57:08 -04:00
multiprocessing Issue #22581: Use more "bytes-like object" throughout the docs and comments. 2014-12-05 22:25:22 +02:00
plat-aix4
plat-darwin
plat-freebsd4
plat-freebsd5
plat-freebsd6
plat-freebsd7
plat-freebsd8
plat-generic - Issue #17086: Backport the patches from the 3.3 branch to cross-build 2013-01-31 23:52:03 +01:00
plat-linux
plat-netbsd1
plat-next3
plat-sunos5
plat-unixware7
pydoc_data Update pydoc topics and fix supsicious markup for 3.4.2 final. 2014-10-05 19:03:48 -07:00
site-packages
sqlite3 Issue #21147: sqlite3 now raises an exception if the request contains a null 2014-09-11 13:29:05 +03:00
test asyncio: sync with Tulip 2015-01-30 00:05:19 +01:00
tkinter Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments. 2014-11-07 12:02:31 +02:00
turtledemo De-'colour'ize stdlib except for idlelib.configDialog. 2014-10-09 18:44:32 -04:00
unittest Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
urllib #23040: Clarify treatment of encoding and errors when component is bytes. 2014-12-24 21:23:18 -05:00
venv Issue #21663: Fixed error caused by trying to create an existing directory. 2014-06-05 09:31:20 +01:00
wsgiref Merge from 3.3 2014-09-17 16:31:47 +08:00
xml Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +02:00
xmlrpc merge 3.3 (#16043) 2014-12-05 20:34:56 -05:00
__future__.py #14494: Document that absolute imports became default in 3.0 instead of 2.7. 2012-05-19 18:36:33 +03:00
__phello__.foo.py
_bootlocale.py Fix wrong exception in _bootlocale (apparently this error condition is never triggered) 2013-10-12 15:00:44 +02:00
_collections_abc.py Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
_compat_pickle.py Fix issue #19834: Support unpickling of exceptions pickled by Python 2. 2013-12-02 11:41:01 +01:00
_dummy_thread.py Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning. 2013-09-07 23:38:37 +02:00
_markupbase.py #13576: add tests about the handling of (possibly broken) condcoms. 2011-12-19 07:29:03 +02:00
_osx_support.py Issue #21811: Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite. 2014-06-25 13:36:14 -07:00
_pyio.py allow more operations to work on detached streams (closes #23093) 2014-12-21 20:51:50 -06:00
_sitebuiltins.py #9364: Improve the text printed by help(pydoc) and help(help). 2014-04-19 12:59:30 -04:00
_strptime.py Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
_threading_local.py
_weakrefset.py Issue #20006: Fix sporadic failures in test_weakset. 2013-12-18 00:28:36 +01:00
abc.py #16832: s/integer/object/ in docs/docstring, and add whatsnew entry. 2013-12-24 16:13:32 -05:00
aifc.py Issue #19623: Fixed writing to unseekable files in the aifc module. 2013-12-14 20:42:22 +02:00
antigravity.py
argparse.py Closes #22675: fix typo. 2014-10-20 08:36:02 +02:00
ast.py create NameConstant AST class for None, True, and False literals (closes #16619) 2012-12-06 17:41:04 -05:00
asynchat.py Issue #16133: The asynchat.async_chat.handle_read() method now ignores 2014-07-24 18:49:36 +02:00
asyncore.py Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper 2014-06-27 23:52:03 +02:00
base64.py Issue #20879: Delay the initialization of encoding and decoding tables for 2014-03-17 22:38:41 +01:00
bdb.py Better behavior when stepping over yield[from]. Fixes issue 16596. By Xavier de Gaye. 2013-11-21 11:30:06 -08:00
binhex.py
bisect.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
bz2.py Closes #19839: Fix regression in bz2 module's handling of non-bzip2 data at EOF. 2013-12-04 23:29:51 +01:00
calendar.py #18705: fix a number of typos. Patch by Févry Thibault. 2013-08-17 15:50:46 +03:00
cgi.py remove unused argument (closes #21135) 2014-04-03 10:22:10 -04:00
cgitb.py merge #12890: don't emit <p> tags in text mode when logdir specified. 2012-10-27 14:55:25 -04:00
chunk.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
cmd.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
code.py Closes #17730: in code.interact(), when banner="", do not print anything. 2013-10-13 21:49:06 +02:00
codecs.py Issue #23181: More "codepoint" -> "code point". 2015-01-18 11:28:37 +02:00
codeop.py
colorsys.py Issue #14323: Expanded the number of digits in the coefficients for the 2013-08-06 11:51:23 +03:00
compileall.py Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
configparser.py Issue #20363. Fixed BytesWarning triggerred by test suite. 2014-02-06 22:52:23 +02:00
contextlib.py Merge removal of issue 20317 debugging code from 3.3 2014-01-24 23:07:16 +10:00
copy.py Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes object. Initial patch by Peter Otten. 2014-02-27 22:14:31 +01:00
copyreg.py Issue #17810: Implement PEP 3154, pickle protocol 4. 2013-11-23 18:59:12 +01:00
cProfile.py Fix #17197: profile/cProfile modules refactored so that code of run() and runctx() utility functions is not duplicated in both modules. 2013-02-25 11:36:40 +01:00
crypt.py Issue #18405: Improve the entropy of crypt.mksalt(). 2013-08-14 01:39:14 +02:00
csv.py #19449: Handle non-string keys when generating 'fieldnames' error. 2013-11-19 13:16:20 -05:00
datetime.py improve comment 2013-08-29 17:29:30 -04:00
decimal.py Issue #22284: Update decimal.__all__ 2014-09-09 19:56:56 +02:00
difflib.py Issue 21635: Fix caching in difflib.SequenceMatcher.get_matching_blocks(). 2014-06-21 11:57:36 -07:00
dis.py Close #17916: dis.Bytecode based replacement for distb 2013-11-23 00:57:00 +10:00
doctest.py Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
dummy_threading.py
enum.py Issue22506: added methods on base Enum class now show up in dir of Enum subclass (3.4) 2014-10-14 08:58:32 -07:00
filecmp.py shallow defaults to 'True' not '1' (closes #21355) 2014-04-26 13:36:21 -04:00
fileinput.py Issue #21075: fileinput.FileInput now reads bytes from standard stream if 2014-05-14 21:08:33 +03:00
fnmatch.py Set cache sizes to a power-of-two 2013-02-17 01:33:37 -08:00
formatter.py Issue #18644: Fix a ResourceWarning in formatter.test(). 2015-01-05 09:19:40 +02:00
fractions.py Issue #16469: Fraction(float('nan')) and Fraction(float('inf')) now raise ValueError and OverflowError (resp.), not TypeError. 2012-11-15 20:58:40 +00:00
ftplib.py make PROTOCOL_SSLv23 the default protocol version for ftplib (closes #23111) 2014-12-30 15:15:43 -06:00
functools.py Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering. 2015-01-05 21:52:10 -08:00
genericpath.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
getopt.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
getpass.py #21169: add comment and doc update for getpass change. 2014-04-14 10:28:58 -04:00
gettext.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
glob.py Issue #17923: glob() patterns ending with a slash no longer match non-dirs on 2014-08-12 12:55:12 +03:00
gzip.py Issue #20875: Merge from 3.3 2014-03-09 14:47:58 -07:00
hashlib.py Removed duplicated words in in comments and docs. 2014-12-01 18:28:43 +02:00
heapq.py Issue #19018: The heapq.merge() function no longer suppresses IndexError 2013-09-14 20:51:57 -07:00
hmac.py Issue #18775: Add name and block_size attribute to HMAC object. They now 2013-11-20 17:35:06 +01:00
imaplib.py don't require OpenSSL SNI to pass hostname to ssl functions (#22921) 2014-11-23 17:04:34 -06:00
imghdr.py Issue #20331: Fixed possible FD leaks in various modules: 2014-01-25 19:43:56 +02:00
imp.py Issue #15204: Deprecated the 'U' mode in file-like objects. 2013-11-23 22:12:06 +02:00
inspect.py inspect: Fix getsource() to load updated source of reloaded module 2014-12-08 18:00:25 -05:00
io.py #21225: copy docstrings from base classes 2014-04-25 09:29:30 -04:00
ipaddress.py Issue #23268: Fixed bugs in the comparison of ipaddress classes. 2015-01-26 10:11:16 +02:00
keyword.py 17830: preserve line endings of original file when updating keywords. 2013-04-25 12:01:36 -04:00
linecache.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
locale.py Issue #20079: Updated alias mapping to glibc 2.19 SUPPORTED file. 2014-10-02 10:49:26 +03:00
lzma.py Closes #19839: Fix regression in bz2 module's handling of non-bzip2 data at EOF. 2013-12-04 23:29:51 +01:00
macpath.py Issue #9850: Fixed macpath.join() for empty first component. Patch by 2014-09-27 18:53:23 +03:00
macurl2path.py Increase the coverage of macurl2path. Patch by Colin Williams. 2013-10-23 21:50:56 -07:00
mailbox.py Issue #22369: Change "context manager protocol" to "context management protocol". 2014-09-10 23:43:41 +03:00
mailcap.py Issue #20331: Fixed possible FD leaks in various modules: 2014-01-25 19:43:56 +02:00
mimetypes.py Issue #20331: Fixed possible FD leaks in various modules: 2014-01-25 19:43:56 +02:00
modulefinder.py Issue #21707: Add missing kwonlyargcount argument to ModuleFinder.replace_paths_in_code(). 2014-07-07 14:58:12 +03:00
netrc.py Merge #14984: only import pwd on POSIX. 2013-09-18 08:59:47 -04:00
nntplib.py don't require OpenSSL SNI to pass hostname to ssl functions (#22921) 2014-11-23 17:04:34 -06:00
ntpath.py Issue #6815: os.path.expandvars() now supports non-ASCII environment 2014-02-13 10:14:48 +02:00
nturl2path.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
numbers.py Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
opcode.py Issue #19722: Added opcode.stack_effect(), which accurately 2013-11-23 14:49:22 -08:00
operator.py Issue #19936: Added executable bits or shebang lines to Python scripts which 2014-01-16 17:33:23 +02:00
optparse.py Issue #20315: Removed support for backward compatibility with early 2.x versions. 2014-01-20 21:29:31 +02:00
os.py Issue #21875: Remove vestigial references to Classic Mac OS in os module docs. 2014-06-26 23:40:06 -07:00
pathlib.py Issue #21408: The default __ne__() now returns NotImplemented if __eq__() 2015-01-26 09:57:07 +02:00
pdb.py Issue #22186: Fix typos in Lib/. 2014-10-19 18:04:38 +03:00
pickle.py Issue #23094: Fixed readline with frames in Python implementation of pickle. 2015-01-26 10:37:01 +02:00
pickletools.py Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can 2014-12-16 18:00:56 +02:00
pipes.py Merge doc changes from 3.2 (#10454, #12298) 2011-09-02 00:03:20 +02:00
pkgutil.py Issue #14710: Fix both pkgutil.find_loader() and get_loader() to not 2014-05-23 12:30:37 -04:00
platform.py Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
plistlib.py Issue #21888: plistlib's load() and loads() now work if the fmt parameter is 2014-07-23 18:49:31 +03:00
poplib.py don't require OpenSSL SNI to pass hostname to ssl functions (#22921) 2014-11-23 17:04:34 -06:00
posixpath.py Issue #22034: Got rid of misleading error message for bytearray arguments in 2014-08-24 12:18:09 +03:00
pprint.py Issue #19104: pprint now produces evaluable output for wrapped strings. 2014-12-20 20:57:15 +02:00
profile.py Fix #17197: profile/cProfile modules refactored so that code of run() and runctx() utility functions is not duplicated in both modules. 2013-02-25 11:36:40 +01:00
pstats.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
pty.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
py_compile.py Issue #17222: fix a mix-up in some exception messages. 2013-06-17 17:48:30 -04:00
pyclbr.py Issue 19944: Fix importlib.find_spec() so it imports parents as needed. 2014-01-25 15:32:46 -07:00
pydoc.py Issue #22314: pydoc now works when the LINES environment variable is set. 2014-11-28 00:09:29 +02:00
queue.py Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get 2013-08-10 18:17:13 -04:00
quopri.py Correct the quopri module documentation. Mention the correct types of the 2014-06-25 01:12:03 -07:00
random.py Issue 13355: Make random.triangular degrade gracefully when low == high. 2014-05-25 17:25:27 -07:00
re.py backout 9fcf4008b626 (#9179) for further consideration 2014-11-30 11:49:00 -05:00
reprlib.py Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
rlcompleter.py #18705: merge with 3.3. 2013-08-17 15:53:55 +03:00
runpy.py Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
sched.py merge 2013-07-13 22:48:49 -07:00
selectors.py Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal 2015-01-13 09:58:33 +01:00
shelve.py Add spaces to follow PEP8. 2012-10-06 18:38:30 +03:00
shlex.py #18853: Fix resource warning in shlex's __main__ section. 2014-10-17 20:28:47 -04:00
shutil.py Issue #21775: shutil.copytree(): fix crash when copying to VFAT 2014-12-10 02:50:32 +02:00
site.py Issue #21572: Change license command to fallback to generic license URL. 2014-05-30 23:46:19 -07:00
smtpd.py Issue #18922: Now The Lib/smtpd.py and Tools/i18n/msgfmt.py scripts write 2013-09-05 17:44:53 +03:00
smtplib.py don't require OpenSSL SNI to pass hostname to ssl functions (#22921) 2014-11-23 17:04:34 -06:00
sndhdr.py #5024: whichhdr now returns the frame count for WAV files. 2013-03-18 17:42:42 -04:00
socket.py fix instances of consecutive articles (closes #23221) 2015-01-13 09:17:24 -05:00
socketserver.py Issue #22435: Fix a file descriptor leak when SocketServer bind fails. 2014-10-13 19:19:26 +01:00
sre_compile.py Got rid of the array module dependency in the re module. 2014-11-10 13:24:47 +02:00
sre_constants.py Issue #13592: Improved the repr for regular expression pattern objects. 2013-11-23 22:42:43 +02:00
sre_parse.py backout 9fcf4008b626 (#9179) for further consideration 2014-11-30 11:49:00 -05:00
ssl.py Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The 2015-01-06 13:54:58 +01:00
stat.py Issue #15767: Excise the remaining instances of ModuleNotFoundError 2013-07-04 18:16:15 -04:00
statistics.py Close #20536: correctly handle Decimal exponents in statistics 2014-02-08 23:55:14 +10:00
string.py Issue #13598: Add auto-numbering of replacement fields to string.Formatter. 2014-04-14 16:43:50 -04:00
stringprep.py
struct.py Issue #17804: New function `struct.iter_unpack` allows for streaming struct unpacking. 2013-04-27 00:20:04 +02:00
subprocess.py Issue #21332: Ensure that `bufsize=1` in subprocess.Popen() selects line buffering, rather than block buffering. 2014-09-21 21:10:56 +02:00
sunau.py Issue #16685: Added support for writing any bytes-like objects in the aifc, 2013-11-16 14:01:31 +02:00
symbol.py remain symbol.main to symbol._main mirroring token.py 2013-02-05 10:13:22 -05:00
symtable.py merge 3.3 (#19393) 2013-10-26 13:22:08 -04:00
sysconfig.py Issue #19760: Silence sysconfig's 'SO' key deprecation warnings in tests. 2013-11-26 17:08:24 +02:00
tabnanny.py Replace IOError with OSError (#16715) 2012-12-25 16:47:37 +02:00
tarfile.py Issue 21044: tarfile.open() now handles fileobj with an integer 'name' 2014-07-16 23:58:58 +03:00
telnetlib.py Fixes Issue #17200: telnetlib's read_until and expect timeout was broken by the 2013-12-10 18:25:21 -08:00
tempfile.py tempfile: Fix docstring. Issue #21397, patch by R. David Murray. 2014-09-26 17:08:02 -04:00
textwrap.py Add shorten to __all_ (issues #18585 and #18725). 2013-10-16 13:07:53 +03:00
this.py
threading.py #11866: Eliminate race condition in the computation of names for new threads. 2014-10-04 17:43:54 -04:00
timeit.py Issue #18518: timeit now rejects statements which can't be compiled outside 2015-01-26 12:09:17 +02:00
token.py Issue #19936: Added executable bits or shebang lines to Python scripts which 2014-01-16 17:33:23 +02:00
tokenize.py Issue #22599: Enhance tokenize.open() to be able to call it during Python 2014-12-05 10:17:10 +01:00
trace.py Issue #19936: Added executable bits or shebang lines to Python scripts which 2014-01-16 17:33:23 +02:00
traceback.py Issue #17825: Cursor ^ is correctly positioned for SyntaxError and IndentationError. 2014-01-22 01:16:25 +01:00
tracemalloc.py tracemalloc: filter_traces() raises a TypeError if filters is not an iterable 2014-03-10 11:05:07 +01:00
tty.py
turtle.py Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X. 2014-09-13 23:39:16 -07:00
types.py Close #19030: inspect.getmembers and inspect.classify_class_attrs 2013-10-18 00:27:39 -07:00
uu.py
uuid.py Issue #17293: socket.gethostbyname() can raise an exception of FreeBSD. 2014-11-21 21:55:39 +02:00
warnings.py Fixed a typo in a comment (issue #23016). 2014-12-14 10:53:00 +02:00
wave.py Issue #19641: Added the audioop.byteswap() function to convert big-endian 2013-11-23 22:26:01 +02:00
weakref.py Closes #21173: Fix len() on a WeakKeyDictionary when .clear() was called with an iterator alive. 2014-10-05 20:02:28 +02:00
webbrowser.py The webbrowser module now uses subprocess's start_new_session=True rather 2014-08-27 09:34:38 -07:00
xdrlib.py Issue #11694: Raise ConversionError in xdrlib as documented 2014-10-10 21:21:52 +03:00
zipfile.py Issue #14099: Backout changeset e5bb3044402b (except adapted tests). 2015-01-26 13:45:39 +02:00