summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with ↵Yury Selivanov2017-06-101-0/+4
| | | | | | | | | | | | | | | certain servers (GH-409) (#2062) * bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (#409) (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390) * [3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) * asyncio SSL contexts leak sockets after calling close with certain servers * cleanup _shutdown_timeout_handle on _fatal_error. (cherry picked from commit a608d2d5a7f1aabe9bcbfc220135c5e126189390)
* bpo-30266: support "= None" pattern in AbstractContextManager (GH-1448) ↵Mariatta2017-06-101-0/+4
| | | | | | | | (GH-2054) contextlib.AbstractContextManager now supports anti-registration by setting __enter__ = None or __exit__ = None, following the pattern introduced in bpo-25958.. (cherry picked from commit 57161aac5eb9bcb0b43e551a1937ff0a84c1ec52)
* Break circular references when closing SSLTransport objects (#981) (#2049)Yury Selivanov2017-06-091-0/+3
|
* Closing transport during handshake process leaks socket (#480) (#2044)Yury Selivanov2017-06-091-0/+3
|
* Fix waiter cancellation in asyncio.Lock (#1031) (#2037)Yury Selivanov2017-06-091-0/+3
| | | | | | Avoid a deadlock when the waiter who is about to take the lock is cancelled Issue #27585
* [3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack ↵Yury Selivanov2017-06-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-1081) (#1640) If we have a chain of generators/coroutines that are 'yield from'ing each other, then resuming the stack works like: - call send() on the outermost generator - this enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - which calls send() on the next generator - which enters _PyEval_EvalFrameDefault, which re-executes the YIELD_FROM opcode - ...etc. However, every time we enter _PyEval_EvalFrameDefault, the first thing we do is to check for pending signals, and if there are any then we run the signal handler. And if it raises an exception, then we immediately propagate that exception *instead* of starting to execute bytecode. This means that e.g. a SIGINT at the wrong moment can "break the chain" – it can be raised in the middle of our yield from chain, with the bottom part of the stack abandoned for the garbage collector. The fix is pretty simple: there's already a special case in _PyEval_EvalFrameEx where it skips running signal handlers if the next opcode is SETUP_FINALLY. (I don't see how this accomplishes anything useful, but that's another story.) If we extend this check to also skip running signal handlers when the next opcode is YIELD_FROM, then that closes the hole – now the exception can only be raised at the innermost stack frame. This shouldn't have any performance implications, because the opcode check happens inside the "slow path" after we've already determined that there's a pending signal or something similar for us to process; the vast majority of the time this isn't true and the new check doesn't run at all.. (cherry picked from commit ab4413a7e9bda95b6fcd517073e2a51dafaa1624)
* bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)Victor Stinner2017-06-081-0/+3
| | | | | | On Windows, subprocess.Popen.communicate() now also ignore EINVAL on stdin.write() if the child process is still running but closed the pipe. (cherry picked from commit d52aa31378ae43e044a300edfe8285954c167216)
* [3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)Denis Osipov2017-06-081-0/+1
| | | | | | | | * Fix bpo-30584 * Adding a comment mentionning the bpo and explaining what is the identifier * Add Denis Osipov to Misc/ACKS (cherry picked from commit 897bba75632dfce87c355e3cd4700468357715a7)
* bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) ↵Antoine Pietri2017-06-071-0/+1
| | | | (#1985)
* [3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)Nate2017-06-071-0/+3
| | | | | | | | At the time when an abstract base class' __init_subclass__ runs, ABCMeta.__new__ has not yet finished running, so in the presence of __init_subclass__, inspect.isabstract() can no longer depend only on TPFLAGS_IS_ABSTRACT. (cherry picked from commit fcfe80ec2592fed8b3941c79056a8737abef7d3b)
* bpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ ↵Nate2017-06-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-527) (GH-1282) Many metaclasses in the standard library don't play nice with __init_subclass__. This bug makes ABCMeta in particular with __init_subclass__, which is an 80/20 solution for me personally. AFAICT, a general solution to this problem requires updating all metaclasses in the standard library to make sure they pass **kwargs to type.__new__, whereas this PR only fixes ABCMeta. For context, see https://bugs.python.org/issue29581. * added a test combining ABCMeta and __init_subclass__ * Added NEWS item (cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc) * [3.6] bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527) Many metaclasses in the standard library don't play nice with __init_subclass__. This bug makes ABCMeta in particular with __init_subclass__, which is an 80/20 solution for me personally. AFAICT, a general solution to this problem requires updating all metaclasses in the standard library to make sure they pass **kwargs to type.__new__, whereas this PR only fixes ABCMeta. For context, see https://bugs.python.org/issue29581. * added a test combining ABCMeta and __init_subclass__ * Added NEWS item. (cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc) * **kwargs -> ``kwargs`` in attempts to fix the Travis build. * Quote the **kwargs
* [3.6] bpo-30557: faulthandler now correctly filters and displays exception ↵Steve Dower2017-06-061-0/+3
| | | | | | | | | | | | | | | | | … (#1960) * bpo-30557: faulthandler now correctly filters and displays exception codes on Windows (#1924) * bpo-30557: faulthandler now correctly filters and displays exception codes on Windows * Adds test for non-fatal exceptions. * Adds bpo number to comment. * bpo-30557: Fix test_faulthandler (#1969) On Windows 8, 8.1 and 10 at least, the exit code is the exception code (no bit is cleared).
* bpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)Nick Coghlan2017-06-061-0/+9
| | | | | | | | | | | | The patch for bpo-30052 changed the preferred link target for :func:`bytes` and :func`bytearray` references to be the respective type definitions rather than the corresponding builtin function entries. This patch changes the daily documentation builds to disable the output caching in Sphinx, in order to ensure that cross-reference changes like this one are reliably picked up and applied automatically after merging. (cherry picked from commit 7a82f9c2b94d31c8f4cc8bb8e3151765d8b148d7)
* bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses ↵Xiang Zhang2017-06-011-0/+3
| | | | (#1676) (#1903)
* bpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)csabella2017-05-301-0/+1
| | | | Original patch by Dennis Mårtensson. (cherry picked from commit 763557eac06ba60d7c5133e4f80df8870d8f917e)
* [3.6] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1287)Mariatta2017-05-272-0/+4
| | | (cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)
* [3.6] bpo-30414: multiprocessing.Queue._feed do not break from main loop on ↵Antoine Pitrou2017-05-251-0/+3
| | | | | | | | | | | | | | | | | | exc (GH-1683) (#1815) * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored. * bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc Queue background running thread was not handling exceptions correctly. Any exception occurred inside thread (putting unpickable object) cause feeder to finish running. After that every message put into queue is silently ignored. (cherry picked from commit bc50f03db4f58c869b78e98468e374d7e61f1227)
* [3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a ↵Serhiy Storchaka2017-05-251-0/+7
| | | | | | | macro (GH-1049) (#1813) if Py_LIMITED_API is not defined. (cherry picked from commit 49a9059)
* [3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812)Serhiy Storchaka2017-05-251-0/+2
| | | (cherry picked from commit 0cd7a3f)
* [3.6] Add --with-assertions configure flag to enable C assertions(GH-1731) ↵T. Wouters2017-05-231-0/+4
| | | | | | (#1739) Defaults to 'no', but as before assertions are implied by --with-pydebug.. (cherry picked from commit ddbfa2c35b298a56f0b813656745bca9cb7334f1)
* [3.6] bpo-30395 _PyGILState_Reinit deadlock fix (GH-1734) (#1740)Łukasz Langa2017-05-231-0/+1
| | | | | head_lock could be held by another thread when fork happened. We should reset it to avoid deadlock. (cherry picked from commit f82c951d1c5416f3550d544e50ff5662d3836e73)
* bpo-30003: Fix handling escape characters in HZ codec (#1556) (#1719)Xiang Zhang2017-05-221-0/+3
|
* [3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)Serhiy Storchaka2017-05-202-0/+5
| | | | Based on patches by Duane Griffin and Tim Mitchell. (cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)
* [3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. ↵Serhiy Storchaka2017-05-201-0/+3
| | | | | | | (GH-1652) (#1673) Based on patch by Eryk Sun. (cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)
* bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1628)Xiang Zhang2017-05-171-0/+3
| | | | Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could raise AttributeError due to not setting _poll in __setstate__.
* bpo-30357: test_thread now uses threading_cleanup() (#1592) (#1622)Victor Stinner2017-05-172-0/+6
| | | | | | | | test_thread: setUp() now uses support.threading_setup() and support.threading_cleanup() to wait until threads complete to avoid random side effects on following tests. Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl> (cherry picked from commit 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08)
* bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1620)Victor Stinner2017-05-161-0/+4
| | | | | | | Catch the Windows socket WSAEINVAL error (code 10022) in imaplib and poplib on shutdown(SHUT_RDWR): An invalid operation was attempted This error occurs sometimes on SSL connections. (cherry picked from commit 83a2c2879839da2e10037f5e4af1bd1dafbf1a52)
* [3.6] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1614)Serhiy Storchaka2017-05-161-1/+1
| | | | | | | | | * Use explicit numbering for footnotes referred by explicit number. * Restore missed footnote reference in stdtypes.rst. * Fix literal strings formatting in howto/urllib2.rst. * Update susp-ignored.csv for zipapp.rst. * Fix suspicious mark up in Misc/NEWS.. (cherry picked from commit d97b7dc94b19063f0589d401bdc4aaadc7030762)
* [3.6] bpo-30375: Correct the stacklevel of regex compiling warnings. ↵Serhiy Storchaka2017-05-161-0/+4
| | | | | | | | | (GH-1595) (#1604) Warnings emitted when compile a regular expression now always point to the line in the user code. Previously they could point into inners of the re module if emitted from inside of groups or conditionals.. (cherry picked from commit c7ac7280c321b3c1679fe5f657a6be0f86adf173)
* [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549)Victor Stinner2017-05-121-0/+6
| | | | | | | | | | | | | | * python-gdb.py supports method-wrapper bpo-29367: python-gdb.py now supports also method-wrapper (wrapperobject) objects. (cherry picked from commit 611083331d534481ca7956a376e38fb0e9ef3854) * Update and enhance python-gdb.py bpo-29259: Detect PyCFunction is the current frame, not only in the older frame.
* bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)INADA Naoki2017-05-111-0/+3
| | | | | | | | | | | | | | when there are no more `await` or `yield (from)` before return in coroutine, cancel was ignored. example: async def coro(): asyncio.Task.current_task().cancel() return 42 ... res = await coro() # should raise CancelledError (cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)
* [3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543)stratakis2017-05-112-0/+4
| | | | | | | | * bpo-28787: Fix out of tree --with-dtrace builds * Unsilence directory creation * Add Misc/NEWS and Misc/ACKS entries. (cherry picked from commit f6eae5bf1c5d7b83e5d5bdbecfff928e478c1cfd)
* [3.6] bpo-30298: Weaken the condition of deprecation warnings for inline ↵Serhiy Storchaka2017-05-101-0/+6
| | | | | | | | | modifiers. (GH-1490) (#1525) Now allowed several subsequential inline modifiers at the start of the pattern (e.g. '(?i)(?s)...'). In verbose mode whitespaces and comments now are allowed before and between inline modifiers (e.g. '(?x) (?i) (?s)...').. (cherry picked from commit 305ccbe27ea5ba82fd2d8c32ec739f980e524330)
* [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations ↵torsava2017-05-092-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-1478) (#1518) * bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478) * bpo-29243: Fix Makefile with respect to --enable-optimizations When using the Profile Guided Optimization (./configure --enable-optimizations) Python is built not only during `make` but rebuilt again during `make test`, `make install` and others. This patch fixes the issue. Note that this fix produces no change at all in the Makefile if configure is run witout --enable-optimizations. * !squash (cherry picked from commit a1054c3b0037d4c2a5492e79fc193f36245366c7) * [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) * bpo-29243: Fix Makefile with respect to --enable-optimizations When using the Profile Guided Optimization (./configure --enable-optimizations) Python is built not only during `make` but rebuilt again during `make test`, `make install` and others. This patch fixes the issue. Note that this fix produces no change at all in the Makefile if configure is run witout --enable-optimizations. * !squash. (cherry picked from commit a1054c3b0037d4c2a5492e79fc193f36245366c7)
* bpo-29990: Fix range checking in GB18030 decoder (#1495) (#1507)Xiang Zhang2017-05-091-0/+2
| | | When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.
* [3.6] Revert bpo-26293 for zipfile breakage. See also bpo-29094. (GH-1484). ↵Serhiy Storchaka2017-05-061-0/+2
| | | | | | (#1485) (cherry picked from commit 3763ea865cee5bbabcce11cd577811135e0fc747)
* [3.6] bpo-30243: Fixed the possibility of a crash in _json. (GH-1420) (#1469)Serhiy Storchaka2017-05-051-0/+4
| | | | | | It was possible to get a core dump by using uninitialized _json objects. Now __new__ methods create initialized objects. __init__ methods are removed.. (cherry picked from commit 76a3e51a403bc84ed536921866c86dd7d07aaa7e)
* [3.6] bpo-23404: make touch becomes make regen-all (#1405) (#1461)Victor Stinner2017-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-23404: make touch becomes make regen-all (#1405) Don't rebuild generated files based on file modification time anymore, the action is now explicit. Replace "make touch" with "make regen-all". Changes: * Remove "make touch", Tools/hg/hgtouch.py and .hgtouch * Add a new "make regen-all" command to rebuild all generated files * Add subcommands to only generate specific files: - regen-ast: Include/Python-ast.h and Python/Python-ast.c - regen-grammar: Include/graminit.h and Python/graminit.c - regen-importlib: Python/importlib_external.h and Python/importlib.h - regen-opcode: Include/opcode.h - regen-opcode-targets: Python/opcode_targets.h - regen-typeslots: Objects/typeslots.inc * Rename PYTHON_FOR_GEN to PYTHON_FOR_REGEN * pgen is now only built by by "make regen-grammar" * Add $(srcdir)/ prefix to paths to source files to handle correctly compilation outside the source directory Note: $(PYTHON_FOR_REGEN) is no more used nor needed by "make" default target building Python. (cherry picked from commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b) * bpo-30273: Update sysconfig (#1464) The AST_H_DIR variable was removed from Makefile.pre.in by the commit a5c62a8e9f0de6c4133825a5710984a3cd5e102b (bpo-23404). AST_H_DIR was hardcoded to "Include", so replace the removed variable by its content. Remove also ASDLGEN variable from sysconfig example since this variable was also removed. (cherry picked from commit b109a1d3360fc4bb87b9887264e3634632d392ca)
* [3.6] bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver (GH-1319) ↵Antoine Pitrou2017-05-041-0/+3
| | | | | | | | (#1454) * bpo-30185: avoid KeyboardInterrupt tracebacks in forkserver * Tweak comment. (cherry picked from commit 6dd4d734ed207ba16b017e38f8909de7ef187e29)
* [3.6] bpo-28556: Routine updates to typing (GH-1366) (#1416)Mariatta2017-05-031-0/+4
| | | | | | - Add NoReturn type - Use WrapperDescriptorType (original PR by Jim Fasarakis-Hilliard) - Minor bug-fixes (cherry picked from commit f06e0218ef6007667f5d61184b85a81a0466d3ae)
* Backport bpo-30205 to 3.6 (#1403)Antoine Pitrou2017-05-021-0/+2
|
* [3.6] bpo-30197: Enhance functions swap_attr() and swap_item() in ↵Serhiy Storchaka2017-04-281-0/+9
| | | | | | | | | | | test.support. (GH-1341) (#1345) They now work when delete replaced attribute or item inside the with statement. The old value of the attribute or item (or None if it doesn't exist) now will be assigned to the target of the "as" clause, if there is one. (cherry picked from commit d1a1def7bf221b04dcf3fc3a67aa19aa2f622f83)
* [3.6] bpo-12414: Update code_sizeof() to take in account co_extra memory. ↵Dong-hee Na2017-04-202-0/+5
| | | | (#1168) (#1198)
* [3.6] bpo-30070: Fixed leaks and crashes in errors handling in the parser ↵Serhiy Storchaka2017-04-191-0/+2
| | | | | module. (GH-1131). (#1184) (cherry picked from commit a79f4c219531c05fc8f670c1e4bbf12c081935d3)
* bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() ↵Serhiy Storchaka2017-04-191-0/+5
| | | | | | | (#1096) (#1180) raised an error. (cherry picked from commit bf623ae8843dc30b28c574bec8d29fc14be59d86)
* bpo-30017: Allowed calling the close() method of the zip entry writer object ↵Serhiy Storchaka2017-04-161-0/+3
| | | | | | | (#1041) (#1092) multiple times. Writing to closed zip entry writer object now always produce a ValueError. (cherry picked from commit 4c0d9ea995da595e90e08813b89510de59907802)
* bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is ↵Xiang Zhang2017-04-151-3/+5
| | | | present (#1130) (#1150)
* [3.6] bpo-29694: race condition in pathlib mkdir with flags parents=True ↵Mariatta2017-04-141-0/+4
| | | | | (GH-1089). (GH-1126) (cherry picked from commit 22a594a0047d7706537ff2ac676cdc0f1dcb329c)
* [3.6] bpo-29692: contextlib.contextmanager may incorrectly unchain ↵Mariatta2017-04-131-0/+3
| | | | | | | | | | | RuntimeError (GH-949) (#1105) contextlib._GeneratorContextManager.__exit__ includes a special case to deal with PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context manager body. Previously this check was too permissive, and undid one level of chaining on *all* RuntimeError instances, not just those that wrapped a StopIteration instance. (cherry picked from commit 00c75e9a45ff0366c185e9e8a2e23af5a35481b0)
* bpo-26985: Add missing info of code object in inspect documentation ↵Xiang Zhang2017-04-131-0/+5
| | | | (GH-1090) (GH-1099)