]> granicus.if.org Git - python/log
python
6 years agobpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots...
Eric Snow [Thu, 31 May 2018 16:17:24 +0000 (10:17 -0600)]
bpo-33615: Temporarily disable a test that is triggering crashes on a few buildbots. (gh-7288)

For bpo-32604 I added some subinterpreter-related tests (see #6914) that are causing crashes on a few buildbots. I'm working on fixing the crashes (see #7251).  This change temporarily disables the triggering test.

6 years agobpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283)
Victor Stinner [Thu, 31 May 2018 13:09:28 +0000 (15:09 +0200)]
bpo-33706: Fix pymain_parse_cmdline_impl() (GH-7283)

Fix a crash in Python initialization when parsing the command line
options.

Fix memcpy() size parameter: previously, we read one wchar_t after
the end of _PyOS_optarg. Moreover, don't copy the trailingg NUL
character: we write it manually anyway.

Thanks Christoph Gohlke for the bug report and the fix!

6 years agobpo-32911: Add the historical note about the magic number. (GH-7273)
Serhiy Storchaka [Thu, 31 May 2018 06:11:55 +0000 (09:11 +0300)]
bpo-32911: Add the historical note about the magic number. (GH-7273)

6 years agoFix "ditribution" typo in NEWS entry. (GH-7274)
Ned Deily [Thu, 31 May 2018 05:18:49 +0000 (01:18 -0400)]
Fix "ditribution" typo in NEWS entry. (GH-7274)

6 years agoAdds new upload script for Windows releases (GH-7268)
Steve Dower [Thu, 31 May 2018 05:13:43 +0000 (22:13 -0700)]
Adds new upload script for Windows releases (GH-7268)

6 years agobpo-33641: Convert RFC references into links. (GH-7103)
Serhiy Storchaka [Thu, 31 May 2018 04:39:00 +0000 (07:39 +0300)]
bpo-33641: Convert RFC references into links. (GH-7103)

85% of them are already links.

6 years agobpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196)
Serhiy Storchaka [Thu, 31 May 2018 04:34:34 +0000 (07:34 +0300)]
bpo-33677: Fix signatures of tp_clear handlers for AST and deque. (GH-7196)

6 years agobpo-33532: Fix multiprocessing test_ignore() (#7262)
Victor Stinner [Thu, 31 May 2018 03:08:42 +0000 (05:08 +0200)]
bpo-33532: Fix multiprocessing test_ignore() (#7262)

Fix test_ignore() of multiprocessing tests like
test_multiprocessing_forkserver: use support.PIPE_MAX_SIZE to make
sure that send_bytes() blocks.

6 years agobpo-31368: Enhance os.preadv() documentation (GH-7254)
Pablo Galindo [Wed, 30 May 2018 23:00:04 +0000 (00:00 +0100)]
bpo-31368: Enhance os.preadv() documentation (GH-7254)

6 years ago3.6 what's new: fix a reference to PEP 528 (#7113)
Dmitry Shachnev [Wed, 30 May 2018 22:52:43 +0000 (01:52 +0300)]
3.6 what's new: fix a reference to PEP 528 (#7113)

6 years agobpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242)
Andrés Delfino [Wed, 30 May 2018 16:08:25 +0000 (13:08 -0300)]
bpo-33696: Install python-docs-theme even if SPHINXBUILD is defined (GH-7242)

6 years agobpo-33691: Add _PyAST_GetDocString(). (GH-7236)
Serhiy Storchaka [Wed, 30 May 2018 07:56:16 +0000 (10:56 +0300)]
bpo-33691: Add _PyAST_GetDocString(). (GH-7236)

6 years agoImprove ensurepip's --help (GH-4686)
Wieland Hoffmann [Wed, 30 May 2018 07:45:55 +0000 (09:45 +0200)]
Improve ensurepip's --help (GH-4686)

* Add a space to ensurepip's --altinstall option
* Add periods to the arguments of ensurepip that didn't have it

This makes --help for all optional arguments consistent and also makes it
consistent with pip --help.

6 years agobpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)
jhaydaman [Wed, 30 May 2018 07:15:06 +0000 (02:15 -0500)]
bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)

Future.set_result and Future.set_exception now raise InvalidStateError
if the futures are not pending or running. This mirrors the behavior
of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future
when set_result is called multiple times.

6 years agoRevert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)
Yury Selivanov [Wed, 30 May 2018 02:00:31 +0000 (22:00 -0400)]
Revert "A better fix for asyncio test_stdin_broken_pipe (GH-7221)" (GH-7235)

This reverts commit ad74d50517c069359578014bb32e660828d68332.

Turns out it's not a good fix -- Travis has just crashed on this test.

6 years agoA better fix for asyncio test_stdin_broken_pipe (#7221)
Yury Selivanov [Wed, 30 May 2018 00:57:50 +0000 (20:57 -0400)]
A better fix for asyncio test_stdin_broken_pipe (#7221)

6 years agoRevert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232)
Yury Selivanov [Wed, 30 May 2018 00:47:56 +0000 (20:47 -0400)]
Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232)

This reverts commit 5d97b7bcc19496617bf8c448d2f149cc28c73bc7.

6 years agoFix typo introduced in GH-7217 (#7230)
Elvis Pranskevichus [Wed, 30 May 2018 00:14:59 +0000 (20:14 -0400)]
Fix typo introduced in GH-7217 (#7230)

6 years agobpo-32684: Fix nits in tests (GH-7225)
Yury Selivanov [Tue, 29 May 2018 23:20:26 +0000 (19:20 -0400)]
bpo-32684: Fix nits in tests (GH-7225)

6 years agoFix whatsnew entry about ThreadedHTTPServer. (GH-7220)
Julien Palard [Tue, 29 May 2018 22:44:12 +0000 (00:44 +0200)]
Fix whatsnew entry about ThreadedHTTPServer. (GH-7220)

6 years agobpo-23859: Document that asyncio.wait() does not cancel its futures (#7217)
Elvis Pranskevichus [Tue, 29 May 2018 22:21:44 +0000 (18:21 -0400)]
bpo-23859: Document that asyncio.wait() does not cancel its futures (#7217)

Unlike `asyncio.wait_for()`, `asyncio.wait()` does not cancel the passed
futures when a timeout accurs.

6 years agobpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216)
Elvis Pranskevichus [Tue, 29 May 2018 21:31:01 +0000 (17:31 -0400)]
bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216)

Currently, asyncio.wait_for(fut), upon reaching the timeout deadline,
cancels the future and returns immediately.  This is problematic for
when *fut* is a Task, because it will be left running for an arbitrary
amount of time.  This behavior is iself surprising and may lead to
related bugs such as the one described in bpo-33638:

    condition = asyncio.Condition()
    async with condition:
        await asyncio.wait_for(condition.wait(), timeout=0.5)

Currently, instead of raising a TimeoutError, the above code will fail
with `RuntimeError: cannot wait on un-acquired lock`, because
`__aexit__` is reached _before_ `condition.wait()` finishes its
cancellation and re-acquires the condition lock.

To resolve this, make `wait_for` await for the task cancellation.
The tradeoff here is that the `timeout` promise may be broken if the
task decides to handle its cancellation in a slow way.  This represents
a behavior change and should probably not be back-patched to 3.6 and
earlier.

6 years agobpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209)
Yury Selivanov [Tue, 29 May 2018 21:20:02 +0000 (17:20 -0400)]
bpo-32684: Fix gather to propagate cancel of itself with return_exceptions (GH-7209)

6 years agobpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)
Géry Ogam [Tue, 29 May 2018 20:10:30 +0000 (22:10 +0200)]
bpo-31639: Change ThreadedHTTPServer to ThreadingHTTPServer class name (GH-7195)

6 years agobpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)
Yury Selivanov [Tue, 29 May 2018 19:38:07 +0000 (15:38 -0400)]
bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)

Original patch by Dan O'Reilly.

6 years agobpo-30935: update get_event_loop docs (GH-2731)
Mandeep Singh [Tue, 29 May 2018 18:37:08 +0000 (00:07 +0530)]
bpo-30935: update get_event_loop docs (GH-2731)

6 years agoAttempt to fix test_stdin_broken_pipe on Travis (#7210)
Yury Selivanov [Tue, 29 May 2018 17:40:47 +0000 (13:40 -0400)]
Attempt to fix test_stdin_broken_pipe on Travis (#7210)

6 years agobpo-33622: Add checks for exceptions leaks in the garbage collector. (GH-7126)
Serhiy Storchaka [Tue, 29 May 2018 15:50:10 +0000 (18:50 +0300)]
bpo-33622: Add checks for exceptions leaks in the garbage collector. (GH-7126)

* Failure in adding to gc.garbage is no longer fatal.
* An exception in tp_clear() no longer lead to crash (though tp_clear() should not leave exceptions).

6 years agobpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636)
Dong-hee Na [Tue, 29 May 2018 15:04:08 +0000 (00:04 +0900)]
bpo-33197: Update a error message of invalid inspect.Parameters. (GH-6636)

6 years agobpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200)
Victor Stinner [Tue, 29 May 2018 14:02:07 +0000 (16:02 +0200)]
bpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200)

Use transport.set_write_buffer_limits() in sendfile tests of
test_asyncio to make sure that the protocol is paused after sending
4 KiB. Previously,
test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed
on FreeBSD if the DATA was smaller than the default limit of 64 KiB.

6 years agobpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)
Serhiy Storchaka [Tue, 29 May 2018 09:04:55 +0000 (12:04 +0300)]
bpo-32911: Revert bpo-29463. (GH-7121) (GH-7197)

Remove the docstring attribute of AST types and restore docstring
expression as a first stmt in their body.

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-33654: Support protocol type switching in SSLTransport.set_protocol() (#7194)
Yury Selivanov [Tue, 29 May 2018 09:02:40 +0000 (05:02 -0400)]
bpo-33654: Support protocol type switching in SSLTransport.set_protocol() (#7194)

6 years agobpo-33674: Pause the transport as early as possible (#7192)
Yury Selivanov [Tue, 29 May 2018 05:00:12 +0000 (01:00 -0400)]
bpo-33674: Pause the transport as early as possible (#7192)

6 years agobpo-32878: Adds documentation for st_ino on Windows (GH-5764)
Steve Dower [Tue, 29 May 2018 00:24:36 +0000 (17:24 -0700)]
bpo-32878: Adds documentation for st_ino on Windows (GH-5764)

6 years agobpo-33674: asyncio: Fix SSLProtocol race (GH-7175)
Victor Stinner [Mon, 28 May 2018 23:33:35 +0000 (01:33 +0200)]
bpo-33674: asyncio: Fix SSLProtocol race (GH-7175)

Fix a race condition in SSLProtocol.connection_made() of
asyncio.sslproto: start immediately the handshake instead of using
call_soon(). Previously, data_received() could be called before the
handshake started, causing the handshake to hang or fail.

6 years agobpo-33670: Expose Sphinx errorlevel (GH-7156)
Andrés Delfino [Mon, 28 May 2018 23:28:22 +0000 (20:28 -0300)]
bpo-33670: Expose Sphinx errorlevel (GH-7156)

6 years agobpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163)
Andrés Delfino [Mon, 28 May 2018 23:20:34 +0000 (20:20 -0300)]
bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163)

6 years agobpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)
Yury Selivanov [Mon, 28 May 2018 22:31:55 +0000 (18:31 -0400)]
bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)

6 years agobpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)
Yury Selivanov [Mon, 28 May 2018 21:54:02 +0000 (17:54 -0400)]
bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)

6 years agobpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)
Yury Selivanov [Mon, 28 May 2018 21:10:20 +0000 (17:10 -0400)]
bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)

6 years agobro-33614: Override exit code in find_msbuild.bat (GH-7169)
Steve Dower [Mon, 28 May 2018 21:05:05 +0000 (14:05 -0700)]
bro-33614: Override exit code in find_msbuild.bat (GH-7169)

6 years agobpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161)
Yury Selivanov [Mon, 28 May 2018 20:27:34 +0000 (16:27 -0400)]
bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161)

6 years agobpo-32458: Further tune start_tls tests (#7166)
Yury Selivanov [Mon, 28 May 2018 19:48:59 +0000 (15:48 -0400)]
bpo-32458: Further tune start_tls tests (#7166)

6 years agobpo-33614: Ensures module definition files for the stable ABI on Windows are correctl...
Steve Dower [Mon, 28 May 2018 19:32:05 +0000 (12:32 -0700)]
bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated. (GH-7165)

6 years agoregrtest: repeat summary after re-run (GH-7159)
Victor Stinner [Mon, 28 May 2018 19:03:43 +0000 (21:03 +0200)]
regrtest: repeat summary after re-run (GH-7159)

Using -w, when failing tests are re-run in verbose mode, display
again the tests results at the end.

6 years agobpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)
Yury Selivanov [Mon, 28 May 2018 18:31:28 +0000 (14:31 -0400)]
bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)

In this commit:

* Support BufferedProtocol in set_protocol() and start_tls()
* Fix proactor to cancel readers reliably
* Update tests to be compatible with OpenSSL 1.1.1
* Clarify BufferedProtocol docs
* Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving
* Rewrite test_start_tls_server_1

6 years agobpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836)
jimmylai [Mon, 28 May 2018 16:42:05 +0000 (06:42 -1000)]
bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836)

6 years agobpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)
twisteroid ambassador [Mon, 28 May 2018 15:16:45 +0000 (23:16 +0800)]
bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)

Fixed bug where calling write_eof() on a _SelectorSocketTransport after
it's already closed raises AttributeError.

6 years agobpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (#7080)
Yury Selivanov [Mon, 28 May 2018 15:11:31 +0000 (11:11 -0400)]
bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ (#7080)

6 years agobpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)
Marcel Plch [Mon, 28 May 2018 12:11:20 +0000 (14:11 +0200)]
bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145)

6 years agobpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
Serhiy Storchaka [Mon, 28 May 2018 10:54:56 +0000 (13:54 +0300)]
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)

6 years agobpo-32380: Create functools.singledispatchmethod (#6306)
Ethan Smith [Sat, 26 May 2018 20:38:33 +0000 (16:38 -0400)]
bpo-32380: Create functools.singledispatchmethod (#6306)

6 years agobpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)
Ned Deily [Sat, 26 May 2018 20:30:46 +0000 (16:30 -0400)]
bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)

The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.

6 years agobpo-33652: Improve pickle support in the typing module. (GH-7123)
Serhiy Storchaka [Sat, 26 May 2018 18:19:26 +0000 (21:19 +0300)]
bpo-33652: Improve pickle support in the typing module. (GH-7123)

Pickles of type variables and subscripted generics are now future-proof
and compatible with older Python versions.

6 years agoFix typo spotted by Guido (GH-7131)
Andrés Delfino [Sat, 26 May 2018 18:18:02 +0000 (15:18 -0300)]
Fix typo spotted by Guido (GH-7131)

6 years agobpo-32769: A new take on annotations/type hinting glossary entries (GH-6829)
Andrés Delfino [Sat, 26 May 2018 12:43:39 +0000 (09:43 -0300)]
bpo-32769: A new take on annotations/type hinting glossary entries (GH-6829)

6 years agobpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111)
Serhiy Storchaka [Sat, 26 May 2018 07:51:58 +0000 (10:51 +0300)]
bpo-33644: Fix signatures of tp_finalize handlers in testing code. (GH-7111)

6 years agotest.regrtest: flush stdout when display progress (#7105)
Victor Stinner [Fri, 25 May 2018 15:21:55 +0000 (17:21 +0200)]
test.regrtest: flush stdout when display progress (#7105)

runtest_mp.py: call print() with flush=True.

6 years agoDocument typing.NoReturn (GH-7107)
Ivan Levkivskyi [Fri, 25 May 2018 04:33:55 +0000 (21:33 -0700)]
Document typing.NoReturn (GH-7107)

6 years agobpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099)
Serhiy Storchaka [Thu, 24 May 2018 22:45:09 +0000 (01:45 +0300)]
bpo-32493: Fix uuid.uuid1() on FreeBSD. (GH-7099)

Use uuid_enc_be() if available to encode UUID to bytes as big endian.

6 years agobpo-33629: Prevent coredump in test_importlib (GH-7090)
Victor Stinner [Thu, 24 May 2018 20:19:33 +0000 (22:19 +0200)]
bpo-33629: Prevent coredump in test_importlib (GH-7090)

bpo-32374, bpo-33629: Use support.SuppressCrashReport() in
test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent
leaking a core dump file.

6 years agobpo-33622: Fix issues with handling errors in the GC. (GH-7078)
Serhiy Storchaka [Thu, 24 May 2018 12:19:29 +0000 (15:19 +0300)]
bpo-33622: Fix issues with handling errors in the GC. (GH-7078)

* Fixed a leak when the GC fails to add an object with __del__ into
  the gc.garbage list.
* PyGC_Collect() can now be called when an exception is set and
  preserves it.
* Fixed an undefined behavior with comparing a dead pointer with NULL.

6 years agocloses bpo-33619: Fix libffi detection by regenerating ./configure (GH-7075)
Chih-Hsuan Yen [Thu, 24 May 2018 06:37:08 +0000 (14:37 +0800)]
closes bpo-33619: Fix libffi detection by regenerating ./configure (GH-7075)

6 years ago bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085)
Cheryl Sabella [Thu, 24 May 2018 02:18:15 +0000 (22:18 -0400)]
 bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests  (GH-7085)

6 years agobpo-33109: argparse subparsers are once again not required by default (GH-6919)
Ned Deily [Thu, 24 May 2018 01:55:15 +0000 (21:55 -0400)]
bpo-33109: argparse subparsers are once again not required by default (GH-6919)

bpo-26510 in 3.7.0a2 changed the behavior of argparse to make
subparsers required by default, returning to the behavior of 2.7
and 3.2. The behavior was changed in 3.3 to be no longer required.
While it might make more sense to have the default to required,
compatibility with 3.3 through 3.6 is probably less disruptive
than trying to reintroduce compatibility with 2.7 at this point.
This change restores the 3.6 behavior.

6 years agobpo-33540: Add block_on_close attr to socketserver (GH-6911)
Victor Stinner [Thu, 24 May 2018 01:14:44 +0000 (03:14 +0200)]
bpo-33540: Add block_on_close attr to socketserver (GH-6911)

Add a new block_on_close class attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour.

6 years agobpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)
Victor Stinner [Thu, 24 May 2018 00:43:45 +0000 (02:43 +0200)]
bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)

bpo-32622, bpo-33353: On macOS, sock.connect() changes the
SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

6 years agobpo-33353: test_asyncio uses smaller sendfile data (#7083)
Victor Stinner [Wed, 23 May 2018 22:56:00 +0000 (00:56 +0200)]
bpo-33353: test_asyncio uses smaller sendfile data (#7083)

bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket
buffers of 1 kB "to test on relative small data sets". Send only
160 KiB rather 10 MB to make the test much faster.

Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB.

On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take
less than 1 second, instead of 18 seconds.

On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now
the 3 tests pass in less than 1 seconds.

6 years agobpo-33618: Enable TLS 1.3 in tests (GH-7079)
Christian Heimes [Wed, 23 May 2018 20:24:45 +0000 (22:24 +0200)]
bpo-33618: Enable TLS 1.3 in tests (GH-7079)

TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS
client cert auth are now handled after the initialy handshake. Tests now
either send/recv data to trigger session and client certs. Or tests
ignore ConnectionResetError / BrokenPipeError on the server side to
handle clients that force-close the socket fd.

To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR
https://github.com/openssl/openssl/pull/6340) is required.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-32436: Document PEP 567 changes to asyncio. (GH-7073)
Yury Selivanov [Wed, 23 May 2018 17:35:04 +0000 (13:35 -0400)]
bpo-32436: Document PEP 567 changes to asyncio. (GH-7073)

6 years agobpo-33612: Remove PyThreadState_Clear() assertion (#7069)
Victor Stinner [Wed, 23 May 2018 16:00:55 +0000 (18:00 +0200)]
bpo-33612: Remove PyThreadState_Clear() assertion (#7069)

bpo-25612, bpo-33612: Remove an assertion from PyThreadState_Clear()
which failed at Python shutdown or on fork if a thread was running a
generator.

6 years agobpo-27300: Add the errors parameter to tempfile classes. (GH-6696)
sth [Wed, 23 May 2018 05:07:01 +0000 (07:07 +0200)]
bpo-27300: Add the errors parameter to tempfile classes. (GH-6696)

6 years agoReverse the meaning of is_argument when used for type check (GH-7039)
Nina Zakharenko [Wed, 23 May 2018 03:32:10 +0000 (20:32 -0700)]
Reverse the meaning of is_argument when used for type check (GH-7039)

6 years agobpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)
Matthias Bussonnier [Tue, 22 May 2018 22:55:31 +0000 (15:55 -0700)]
bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)

bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...

6 years agobpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)
Christian Heimes [Tue, 22 May 2018 20:50:12 +0000 (22:50 +0200)]
bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)

Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
default.

Also update multissltests and Travis config to test with latest OpenSSL.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-33516: Add support for __round__ in MagicMock (GH-6880)
John Reese [Tue, 22 May 2018 20:01:10 +0000 (13:01 -0700)]
bpo-33516: Add support for __round__ in MagicMock (GH-6880)

unittest.mock.MagicMock now supports the __round__() magic method.

6 years agoAdd missed details of the C API introduced in 3.7. (GH-7047)
Serhiy Storchaka [Tue, 22 May 2018 17:59:42 +0000 (20:59 +0300)]
Add missed details of the C API introduced in 3.7. (GH-7047)

* Set the limited API version for PyImport_GetModule and PyOS_*Fork
  functions.
* Add PyImport_GetModule and Py_UTF8Mode in PC/python3.def.
* Add several functions in Doc/data/refcounts.dat.

6 years agobpo-33592: Document the C API in PEP 567 (contextvars) (GH-7033)
Elvis Pranskevichus [Tue, 22 May 2018 17:31:56 +0000 (13:31 -0400)]
bpo-33592: Document the C API in PEP 567 (contextvars) (GH-7033)

6 years agoImprove comments in test_idle.py. (GH-7057)
Terry Jan Reedy [Tue, 22 May 2018 17:24:04 +0000 (13:24 -0400)]
Improve comments in test_idle.py. (GH-7057)

6 years agobpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)
Serhiy Storchaka [Tue, 22 May 2018 11:55:07 +0000 (14:55 +0300)]
bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)

6 years agoAdd PyThread_tss_* to Doc/data/refcounts.dat. (GH-7038)
Masayuki Yamamoto [Tue, 22 May 2018 08:21:25 +0000 (17:21 +0900)]
Add PyThread_tss_* to Doc/data/refcounts.dat. (GH-7038)

Thread Specific Storage (TSS) API is a public C API (new in 3.7).

6 years agobpo-5945: Improve mappings and sequences C API docs. (GH-7029)
Serhiy Storchaka [Tue, 22 May 2018 08:02:44 +0000 (11:02 +0300)]
bpo-5945: Improve mappings and sequences C API docs. (GH-7029)

6 years agoFix lambda parameters being refered as arguments (GH-7037)
Andrés Delfino [Tue, 22 May 2018 05:57:45 +0000 (02:57 -0300)]
Fix lambda parameters being refered as arguments (GH-7037)

6 years agoUse IPv4 only to avoid IP address collision (#7030)
Andrew Svetlov [Mon, 21 May 2018 12:06:26 +0000 (15:06 +0300)]
Use IPv4 only to avoid IP address collision (#7030)

6 years agobpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
INADA Naoki [Mon, 21 May 2018 09:35:41 +0000 (18:35 +0900)]
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)

6 years agoFix asyncio flaky tests (#7023)
Andrew Svetlov [Mon, 21 May 2018 09:03:45 +0000 (12:03 +0300)]
Fix asyncio flaky tests (#7023)

6 years agobpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)
Vlad Starostin [Mon, 21 May 2018 08:13:45 +0000 (11:13 +0300)]
bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)

* bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450)

Under particular circumstances _SelectorSocketTransport can try to add a reader
even the transport is already being closed. This can lead to FD leak and
invalid stated of the following connections. Fixed the SelectorSocketTransport
to add the reader only if the trasport is still active.

6 years agobpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. (GH-1959)
Aaron Hall, MBA [Sun, 20 May 2018 23:46:42 +0000 (19:46 -0400)]
bpo-26103: Fix inspect.isdatadescriptor() and a data descriptor definition. (GH-1959)

Look for '__set__' or '__delete__'.

6 years agoFix line breaks added after hyphens by blurb. (GH-7002)
Serhiy Storchaka [Sun, 20 May 2018 23:36:05 +0000 (02:36 +0300)]
Fix line breaks added after hyphens by blurb. (GH-7002)

Also remove bullet asterisks from IDLE entries.

6 years agoAdd idlelib and IDLE section to What's New in 3.7. (#7019)
Terry Jan Reedy [Sun, 20 May 2018 21:00:13 +0000 (17:00 -0400)]
Add idlelib and IDLE section to What's New in 3.7. (#7019)

6 years agobpo-32262: Fix typo in f-string (GH-7016)
Christian Heimes [Sun, 20 May 2018 17:57:13 +0000 (19:57 +0200)]
bpo-32262: Fix typo in f-string (GH-7016)

Fix typo from commit 6370f345e1d5829e1fba59cd695c8b82c5a8c620

Signed-off-by: Christian Heimes <christian@python.org>
<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.

# Pull Request title

It should be in the following format:

```
bpo-NNNN: Summary of the changes made
```

Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.

Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.

# Backport Pull Request title

If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:

```
[X.Y] <title from the original PR> (GH-NNNN)
```

Where: [X.Y] is the branch name, e.g. [3.6].

GH-NNNN refers to the PR number from `master`.

-->

<!-- issue-number: bpo-32262 -->
https://bugs.python.org/issue32262
<!-- /issue-number -->

6 years agobpo-33541: Remove unused __pad function (GH-4377)
Mario Corchero [Sun, 20 May 2018 17:42:30 +0000 (13:42 -0400)]
bpo-33541: Remove unused __pad function (GH-4377)

Function was added with the initial implementation 00efe7e798.

6 years agobpo-33580: Make binary/text file glossary entries follow most common "see also" style...
Andrés Delfino [Sun, 20 May 2018 15:12:50 +0000 (12:12 -0300)]
bpo-33580: Make binary/text file glossary entries follow most common "see also" style. (GH-6991)

6 years agobpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922)
CtrlZvi [Sun, 20 May 2018 15:03:25 +0000 (08:03 -0700)]
bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922)

uuid._ipconfig_getnode did not validate the maximum length of the value,
so long as the value had the same type of formatting as a MAC address.
This let it select DUIDs as MAC addresses. It now requires an exact
length match.

6 years agobpo-30940: Updating round() docs. (GH-6342)
Lisa Roach [Sun, 20 May 2018 15:00:18 +0000 (11:00 -0400)]
bpo-30940: Updating round() docs. (GH-6342)

6 years agoDocs: be less specific about python versions (GH-6985)
Eitan Adler [Sun, 20 May 2018 14:38:01 +0000 (07:38 -0700)]
Docs: be less specific about python versions (GH-6985)

CPython 3.5 is old now, and we don't bump this version often,
so lets avoid using specific versions.

6 years agobpo-33584: Fix several minor bugs in asyncio. (GH-7003)
Serhiy Storchaka [Sun, 20 May 2018 13:30:31 +0000 (16:30 +0300)]
bpo-33584: Fix several minor bugs in asyncio. (GH-7003)

Fix the following bugs in the C implementation:

* get_future_loop() silenced all exceptions raised when look up the get_loop
  attribute, not just an AttributeError.
* enter_task() silenced all exceptions raised when look up the current task,
  not just a KeyError.
* repr() was called for a borrowed link in enter_task() and task_step_impl().
* str() was used instead of repr() in formatting one error message (in
  Python implementation too).
* There where few reference leaks in error cases.

6 years agobpo-26819: Prevent proactor double read on resume (#6921)
CtrlZvi [Sun, 20 May 2018 10:21:10 +0000 (03:21 -0700)]
bpo-26819: Prevent proactor double read on resume (#6921)

The proactor event loop has a race condition when reading with
pausing/resuming. `resume_reading()` unconditionally schedules the read
function to read from the current future. If `resume_reading()` was
called before the previously scheduled done callback fires, this results
in two attempts to get the data from the most recent read and an
assertion failure. This commit tracks whether or not `resume_reading`
needs to reschedule the callback to restart the loop, preventing a
second attempt to read the data.

6 years agobpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)
Serhiy Storchaka [Sun, 20 May 2018 05:48:12 +0000 (08:48 +0300)]
bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)

A DeprecationWarning was emitted in Python 3.6-3.7.

6 years agobpo-23722: Fix docs for future __classcell__ changes. (GH-6999)
Serhiy Storchaka [Sun, 20 May 2018 05:13:52 +0000 (08:13 +0300)]
bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)