]> granicus.if.org Git - python/log
python
7 years agoSynchronize libregrtest from master to 3.6 (#2244)
Victor Stinner [Fri, 16 Jun 2017 12:39:09 +0000 (14:39 +0200)]
Synchronize libregrtest from master to 3.6 (#2244)

* bpo-30523: regrtest: Add --list-cases option (#2238)
* bpo-30284: Fix regrtest for out of tree build (#1481)
* bpo-30540: regrtest: add --matchfile option (#1909)
* bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
* bpo-30263: regrtest: log system load (#1452)

7 years agoRevert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)" (#2246)
Victor Stinner [Fri, 16 Jun 2017 12:38:32 +0000 (14:38 +0200)]
Revert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)" (#2246)

This reverts commit e064d4dfeda09fd206653697b70b434e98cc1b57.

7 years ago[3.6]Add IDLE items to NEWS and idlelib/NEWS.txt (#2239) (#2240)
terryjreedy [Fri, 16 Jun 2017 06:11:31 +0000 (02:11 -0400)]
[3.6]Add IDLE items to NEWS and idlelib/NEWS.txt (#2239) (#2240)

7 years agobpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783) (GH-2237)
Zachary Ware [Fri, 16 Jun 2017 06:06:36 +0000 (01:06 -0500)]
bpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783) (GH-2237)

The Windows build now depends on Python 3.6 to fetch externals, but it will be downloaded via NuGet (which is downloaded via PowerShell) if it is not available via `py -3.6`.  This means the only thing that must be installed on a modern Windows box to do a full build of CPython with all extensions is Visual Studio.

Also fixes an outdated note about _lzma in PCbuild/readme.txt

(cherry-picked from commit 51599e2bdd10ab77212a7cbb41a13ea70ee13da8)

7 years agobpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer...
Mariatta [Fri, 16 Jun 2017 02:56:52 +0000 (19:56 -0700)]
bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer', e.g. zip()[x] (GH-24) (GH-2235)

(cherry picked from commit 93b4b47e3a720171d67f3b608de406aef462835c)

7 years agoCheck that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)
Neil Schemenauer [Fri, 16 Jun 2017 02:12:46 +0000 (19:12 -0700)]
Check that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)

(cherry picked from commit 6c991bdee7ec4bedd8c1b8d3812dc884b654b57c)

7 years agobpo-30656: Fix Python C API Module Objects documentation (GH-2170) (GH-2230)
Mariatta [Fri, 16 Jun 2017 01:49:43 +0000 (18:49 -0700)]
bpo-30656: Fix Python C API Module Objects documentation (GH-2170) (GH-2230)

`PyModule_New()` now refers to `PyModule_NewObject()`
(cherry picked from commit 2d0afef82a07afdb666f2ca0c533aac5d39155cd)

7 years agobpo-23890: Fix ref cycle in TestCase.assertRaises (#858)
Victor Stinner [Thu, 15 Jun 2017 22:18:15 +0000 (00:18 +0200)]
bpo-23890: Fix ref cycle in TestCase.assertRaises (#858)

unittest.TestCase.assertRaises() now manually breaks a
reference cycle to not keep objects alive longer than expected.
(cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5)

7 years agobpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)
Victor Stinner [Thu, 15 Jun 2017 22:14:35 +0000 (00:14 +0200)]
bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)

(cherry picked from commit 258bfc462b1e58689b43f662a10e44ece3a10bef)

7 years ago[3.6] bpo-30626: Fix error handling in PyImport_Import(). (GH-2103) (#2221)
Serhiy Storchaka [Thu, 15 Jun 2017 18:15:11 +0000 (21:15 +0300)]
[3.6] bpo-30626: Fix error handling in PyImport_Import(). (GH-2103) (#2221)

In rare circumstances PyImport_Import() could return NULL without raising
an error.
(cherry picked from commit 145541c)

7 years agobpo-30149: Fix partialmethod without explicit self parameter (#1308) (#1662)
Dong-hee Na [Thu, 15 Jun 2017 14:41:57 +0000 (23:41 +0900)]
bpo-30149: Fix partialmethod without explicit self parameter (#1308) (#1662)

7 years ago[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH...
Serhiy Storchaka [Thu, 15 Jun 2017 14:16:38 +0000 (17:16 +0300)]
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH-879) (#2217)

the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie

add more ip_interface comparison tests.
(cherry picked from commit 7bd8d3e794782582a4ad1c9749424fff86802c3e)

7 years ago[3.6] bpo-30650: Fixed a syntax error: missed right parentheses (GH-2154) (#2215)
Serhiy Storchaka [Thu, 15 Jun 2017 13:57:53 +0000 (16:57 +0300)]
[3.6] bpo-30650: Fixed a syntax error: missed right parentheses (GH-2154) (#2215)

(cherry picked from commit 0d32218)

7 years ago[3.6] bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (GH-2016...
Serhiy Storchaka [Thu, 15 Jun 2017 13:55:22 +0000 (16:55 +0300)]
[3.6] bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (GH-2016) (#2214)

Running our unit tests with `-bb` enabled triggered this failure..
(cherry picked from commit 171b9a354e816eebc6d4c3a8553303942e9c5025)

7 years agobpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2200)
Victor Stinner [Wed, 14 Jun 2017 23:26:16 +0000 (01:26 +0200)]
bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2200)

* bpo-29591: Upgrade Modules/expat to libexpat 2.2

* bpo-29591: Restore Python changes on expat

* bpo-29591: Remove expat config of unsupported platforms

Remove the configuration (Modules/expat/*config.h) of unsupported
platforms:

* Amiga
* MacOS Classic on PPC32
* Open Watcom

* bpo-29591: Remove useless XML_HAS_SET_HASH_SALT

The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became
useless since our local expat copy was upgrade to expat 2.1 (it's now
expat 2.2.0).

(cherry picked from commit 23ec4b57e1359f9c539b8defc317542173ae087e)

7 years agobpo-30231: Remove skipped test_imaplib tests (#1419) (#2192)
Victor Stinner [Wed, 14 Jun 2017 20:43:01 +0000 (22:43 +0200)]
bpo-30231: Remove skipped test_imaplib tests (#1419) (#2192)

The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept
TLS connection using our self-signed x509 certificate. Remove the two
tests which are already skipped.

Write a new test_certfile_arg_warn() unit test for the certfile
deprecation warning.
(cherry picked from commit b18563da8803433509e9a0e29718e0271014659f)

7 years ago[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) (#2199)
terryjreedy [Wed, 14 Jun 2017 20:10:10 +0000 (16:10 -0400)]
[3.6]bpo-15786: Fix IDLE autocomplete return problem. (#2198) (#2199)

Before,  Enter would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted.  Now it does.  Before, '\n' was inserted into text, which in Shell meant compile() and possibly execute.  Now cursor is left after completion.
(cherry picked from commit 32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02)

7 years agobpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2195)
Mariatta [Wed, 14 Jun 2017 18:59:37 +0000 (11:59 -0700)]
bpo-30659 : Use ** for kwargs in namedtuple._replace() signature (GH-2173) (GH-2195)

(cherry picked from commit 184bd82ba8106785ba22f0d2477dbd08bef821fb)

7 years agoFix trivial typo in Python Setup documentation (GH-2185) (GH-2188)
csabella [Wed, 14 Jun 2017 16:26:41 +0000 (12:26 -0400)]
Fix trivial typo in Python Setup documentation (GH-2185) (GH-2188)

Replace platform with platforms.
(cherry picked from commit 4ebf03d109f827c91a23256a447c1d74a203dfee)

7 years agobpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811) (#2187)
terryjreedy [Wed, 14 Jun 2017 15:43:49 +0000 (11:43 -0400)]
bpo-15786: IDLE: Fix mouse clicks on autocompletetion window (#1811) (#2187)

Patch by Louie Lu.
(cherry picked from commit 778b484145edfd0d9b65129322d3295bed8eb71a)

7 years ago[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)
Victor Stinner [Wed, 14 Jun 2017 12:26:52 +0000 (14:26 +0200)]
[3.6] bpo-30649: test_os tolerates 50 ms delta for utime (#2156) (#2175)

* bpo-30649: test_os tolerates 50 ms delta for utime (#2156)

On Windows, tolerate a delta of 50 ms instead of 20 ms in
test_utime_current() and test_utime_current_old() of test_os.

On other platforms, reduce the delta from 20 ms to 10 ms.
(cherry picked from commit c94caca65cd38802243b5279cf85ee44ffb2abb8)

* bpo-30649: Revert utime delta in test_os (#2176)

PPC64 Fedora 3.x buildbot requires at least a delta of 14 ms: revert
the utime delta to 20 ms.

I tried 10 ms, but test_os failed on the PPC64 Fedora 3.x buildbot.
(cherry picked from commit 3402f7268897db15053866e1e68404cfa0e02706)

7 years ago[3.6]bpo-25514: Improve IDLE's connection refused message (#2177) (#2178)
terryjreedy [Wed, 14 Jun 2017 02:13:15 +0000 (22:13 -0400)]
[3.6]bpo-25514: Improve IDLE's connection refused message (#2177) (#2178)

When IDLE fail to start because the socket connection fails, direct people to a new subsection of the IDLE doc listing various causes and remedies.
(cherry picked from commit 188aedf8bb623d41302e10503268b0852ea91134)

7 years ago[3.6]bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171) (#2172)
terryjreedy [Tue, 13 Jun 2017 19:40:59 +0000 (15:40 -0400)]
[3.6]bpo-27922: Stop gui flash from idle_test.test_parenmatch (#2171) (#2172)

For unknown reasons, this does not work when running leak tests.
(cherry picked from commit 049cf2bb44038351e1b2eed4fc7b1b522329e550)

7 years ago[3.6]bpo-30642: Fix ref leak in idle_test.test_macosx (#2163) (#2165)
terryjreedy [Tue, 13 Jun 2017 15:52:08 +0000 (11:52 -0400)]
[3.6]bpo-30642: Fix ref leak in idle_test.test_macosx (#2163) (#2165)

(cherry picked from commit 8323189ff1a19566f923c04b95e4d17fa57d1f56)

7 years ago[3.6] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2166)
Antoine Pitrou [Tue, 13 Jun 2017 15:51:26 +0000 (17:51 +0200)]
[3.6] bpo-24484: Avoid race condition in multiprocessing cleanup (GH-2159) (#2166)

* bpo-24484: Avoid race condition in multiprocessing cleanup

The finalizer registry can be mutated while inspected by multiprocessing
at process exit.

* Use test.support.start_threads()

* Add Misc/NEWS.
(cherry picked from commit 1eb6c0074d17f4fd425cacfdda893d65f5f77f0a)

7 years agobpo-30642: IDLE: Fix test_query refleak (#2147) (#2161)
terryjreedy [Tue, 13 Jun 2017 14:11:02 +0000 (10:11 -0400)]
bpo-30642: IDLE: Fix test_query refleak (#2147) (#2161)

Patch by Louie Lu.
(cherry picked from commit b070fd275b68df5c5ba9f6f43197b8d7066f0b18)

7 years ago[3.6] bpo-29514: Check magic number for bugfix releases (#2157)
Nick Coghlan [Tue, 13 Jun 2017 10:32:46 +0000 (20:32 +1000)]
[3.6] bpo-29514: Check magic number for bugfix releases (#2157)

Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.

This ensures that pre-merge CI will automatically pick up
on magic number changes in maintenance releases (and
explain why those are problematic), rather than relying on
all core developers to be aware of the implications of
such changes.

7 years agobpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)
Victor Stinner [Tue, 13 Jun 2017 08:39:30 +0000 (10:39 +0200)]
bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)

Replace __PyCodeExtraState_Get() with __PyCodeExtraState_Get(void) to
fix the following GCC warning:

./Include/pystate.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 __PyCodeExtraState* __PyCodeExtraState_Get();

7 years ago[3.6] Mention how to disable signal fd wakeup (GH-2140) (#2149)
Antoine Pitrou [Tue, 13 Jun 2017 08:23:13 +0000 (10:23 +0200)]
[3.6] Mention how to disable signal fd wakeup (GH-2140) (#2149)

(cherry picked from commit d79c1d4a9406384f10a37f26a7515ce79f9fdd78)

7 years agobpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2145)
Mariatta [Tue, 13 Jun 2017 05:40:18 +0000 (22:40 -0700)]
bpo-6519: Improve Python Input Output Tutorial (GH-2143) (GH-2145)

Move up the discussion about 'with' keyword, so it appears earlier in the document.
(cherry picked from commit bd4e9e0ca96dabf33605d9b1fd1e0562ece8ae18)

7 years ago[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in...
Dino Viehland [Tue, 13 Jun 2017 01:46:35 +0000 (18:46 -0700)]
[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in threads (#2015)

* Move co_extra_freefuncs to interpreter state to avoid crashes in
multi-threaded scenarios involving deletion of code objects

* Don't require that extra be zero initialized

* Build test list instead of defining empty test class

* Ensure extra is always assigned on success

* Keep the old fields in the thread state object, just don't use them
Add new linked list of code extra objects on a per-interpreter basis
  so that interpreter state size isn't changed

* Rename __PyCodeExtraState_Get and add comment about it going away in 3.7
Fix sort order of import's in test_code.py

* Remove an extraneous space

* Remove docstrings for comments

* Touch up formatting

* Fix casing of coextra local

* Fix casing of another variable

* Prefix PyCodeExtraState with __ to match C API for getting it

* Update NEWS file for bpo-30604

7 years agobpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2136)
Marco Buttu [Mon, 12 Jun 2017 19:41:42 +0000 (21:41 +0200)]
bpo-30217: add the operators ~ and | to the index (GH-1502) (GH-2136)

(cherry picked from commit dc980dfbcfce4695ccde056c3983160ba97b5a36)

7 years ago[3.6] bpo-30177: add NEWS entry (#2134)
Antoine Pietri [Mon, 12 Jun 2017 16:23:24 +0000 (18:23 +0200)]
[3.6] bpo-30177: add NEWS entry (#2134)

7 years agobpo-23404: `make regen-all` What's New entry (#2128)
Nick Coghlan [Mon, 12 Jun 2017 12:28:12 +0000 (22:28 +1000)]
bpo-23404: `make regen-all` What's New entry (#2128)

While the build changes won't affect most users,
they may affect redistributors and folks building
their own Python binaries from source.

7 years ago[3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121)
Serhiy Storchaka [Mon, 12 Jun 2017 06:02:13 +0000 (09:02 +0300)]
[3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121)

The traceback no longer displayed for SystemExit raised in a callback registered by atexit..
(cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)

7 years agobpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2118)
Mariatta [Mon, 12 Jun 2017 01:59:05 +0000 (18:59 -0700)]
bpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2118)

import json before using json module
(cherry picked from commit 1dbce04d0e3e93b715eb0d8024da396361759d16)

7 years agobackport ssl doc fixes (#2117)
Benjamin Peterson [Sun, 11 Jun 2017 18:53:14 +0000 (11:53 -0700)]
backport ssl doc fixes (#2117)

* clarify recv() and send() on SSLObject (#2100)

SSLObject has recv() and send(), but they don't do any network io.

* remove extra word (#2101)

7 years ago[3.6]bpo-20185: Adjust IDLE test to 3.7 Clinic change [GH-542] (#2116)
terryjreedy [Sun, 11 Jun 2017 18:29:38 +0000 (14:29 -0400)]
[3.6]bpo-20185: Adjust IDLE test to 3.7 Clinic change [GH-542] (#2116)

Synchronize 3.6/3.7 test_calltips to the extent possible.  Part of patch by Serhiy Storchaka.
(cherry-pick from fdd42c4)

7 years ago[3.6]bpo-29995: Adjust IDLE test for 3.7 re.escape change [GH-1007] (#2114)
terryjreedy [Sun, 11 Jun 2017 17:50:51 +0000 (13:50 -0400)]
[3.6]bpo-29995: Adjust IDLE test for 3.7 re.escape change [GH-1007] (#2114)

7 years ago[3.6] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2092)
Zachary Ware [Sun, 11 Jun 2017 16:30:57 +0000 (11:30 -0500)]
[3.6] Use Travis to make sure all generated files are up to date (GH-2080) (GH-2092)

(cherry picked from commit 0afbabe245)

Also fixes some line endings missed in GH-840 backport.

7 years agoRevert "[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with...
Yury Selivanov [Sun, 11 Jun 2017 14:46:45 +0000 (16:46 +0200)]
Revert "[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) (#2062)" (#2112)

This reverts commit 6e14fd2a14cef6ea0709ad234ab41198c2195591.

7 years agobpo-30508: Don't log exceptions if Task/Future "cancel()" method was called. (#2109)
Yury Selivanov [Sun, 11 Jun 2017 14:00:14 +0000 (14:00 +0000)]
bpo-30508: Don't log exceptions if Task/Future "cancel()" method was called. (#2109)

7 years ago[3.6]bpo-30022: idlelib.run IOError -> OSError [GH-1051] (#2107)
terryjreedy [Sun, 11 Jun 2017 10:26:25 +0000 (06:26 -0400)]
[3.6]bpo-30022: idlelib.run IOError -> OSError [GH-1051] (#2107)

Part of patch by Serhiy Storchaka.
(cherry-pick from 55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0)

7 years ago[3.6]bpo-30144: change idlelib abc import [GH-1263] (#2106)
terryjreedy [Sun, 11 Jun 2017 10:12:31 +0000 (06:12 -0400)]
[3.6]bpo-30144: change idlelib abc import [GH-1263] (#2106)

Part of patch by Serhiy Storchaka.
(cherry-pick from 2e576f5)

7 years ago[3.6] bpo-29919 Remove unused imports from idlelib [GH-137] (#2105)
terryjreedy [Sun, 11 Jun 2017 09:53:46 +0000 (05:53 -0400)]
[3.6] bpo-29919 Remove unused imports from idlelib [GH-137] (#2105)

Part of patch by Victor Stinner.
(cherry-pick from d6debb24e06152a827769b0cac24c47deccdeac1)

7 years ago[3.6] Remove unused imports (#2104)
terryjreedy [Sun, 11 Jun 2017 08:45:35 +0000 (04:45 -0400)]
[3.6] Remove unused imports (#2104)

Part of patch by Serhiy Strochaka, 2016-12-16 (no bpo issue)
(cherry-pick of 70d28a184c42d107cc8c69a95aa52a4469e7929c)

7 years agobpo-30495: IDLE: Modernize textview.py with docstrings and PEP8 names (#1839) (#2102)
terryjreedy [Sun, 11 Jun 2017 08:16:55 +0000 (04:16 -0400)]
bpo-30495: IDLE: Modernize textview.py with docstrings and PEP8 names (#1839) (#2102)

Patch by Cheryl Sabella.
(cherry picked from commit 0aa0a06e8b719533aefd175a5716f1698f474052)

7 years ago[3.6] bpo-30166: backport pyshell changes (GH 1293) (#2098)
terryjreedy [Sun, 11 Jun 2017 04:34:20 +0000 (00:34 -0400)]
[3.6] bpo-30166: backport pyshell changes (GH 1293) (#2098)

(cherry-pick IDLE pyshell change from 7e4db2f)

7 years ago[3.6] Update idlelib NEWS for 3.6 (GH-2089) (#2097)
terryjreedy [Sun, 11 Jun 2017 03:48:00 +0000 (23:48 -0400)]
[3.6] Update idlelib NEWS for 3.6 (GH-2089) (#2097)

(cherry-picked from 503bc63)

7 years ago[3.6] Add IDLE news items (GH-2090) (#2096)
terryjreedy [Sun, 11 Jun 2017 03:15:08 +0000 (23:15 -0400)]
[3.6] Add IDLE news items (GH-2090) (#2096)

(cherry-pick from c94c41c)

7 years agobpo-28556: Updates to typing module (GH-2076) (GH-2087)
Mariatta [Sat, 10 Jun 2017 21:41:00 +0000 (14:41 -0700)]
bpo-28556: Updates to typing module (GH-2076) (GH-2087)

This PR contains two updates to typing module:

- Support ContextManager on all versions (original PR by Jelle Zijlstra).
- Add generic AsyncContextManager..
(cherry picked from commit 29fda8db16e0edab92841277fa223f844f5a92cc)

7 years ago[3.6] bpo-27425: Be more explicit in .gitattributes (GH-840) (GH-2083)
Zachary Ware [Sat, 10 Jun 2017 20:39:29 +0000 (15:39 -0500)]
[3.6] bpo-27425: Be more explicit in .gitattributes (GH-840) (GH-2083)

Also updates checked-in line endings on some files

7 years agobpo-30312: Small correction in datastructures set code sample (GH-2081) (GH-2085)
KatherineMichel [Sat, 10 Jun 2017 20:33:57 +0000 (15:33 -0500)]
bpo-30312: Small correction in datastructures set code sample (GH-2081) (GH-2085)

(cherry picked from commit ca816153445cba3baec15f7e890c71abfe495340)

7 years agobpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2065)
Mariatta [Sat, 10 Jun 2017 14:25:33 +0000 (07:25 -0700)]
bpo-25409: Clarify fnmatch and fnmatchcase documentation (GH-1535) (GH-2065)

Mention that fnmatchcase does not call normcase, and fnmatch does.
(cherry picked from commit e5f6e86c48c7b2eb9e1d6a0e72867b4d8b4720f3)

7 years ago[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain...
Yury Selivanov [Sat, 10 Jun 2017 14:00:45 +0000 (10:00 -0400)]
[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with 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)

7 years ago[3.6] Regenerate Argument Clinic code for bpo-19180. (GH-2073). (#2077)
Serhiy Storchaka [Sat, 10 Jun 2017 10:48:53 +0000 (13:48 +0300)]
[3.6] Regenerate Argument Clinic code for bpo-19180. (GH-2073). (#2077)

(cherry picked from commit 5f31d5cf6efa8c304d352e34f9f2a1ed0074298e)

7 years agobpo-30038: fix race condition in signal delivery + wakeup fd (#1082) (#2075)
Victor Stinner [Sat, 10 Jun 2017 09:20:03 +0000 (11:20 +0200)]
bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) (#2075)

Before, it was possible to get the following sequence of
events (especially on Windows, where the C-level signal handler for
SIGINT is run in a separate thread):

- SIGINT arrives
- trip_signal is called
- trip_signal writes to the wakeup fd
- the main thread wakes up from select()-or-equivalent
- the main thread checks for pending signals, but doesn't see any
- the main thread drains the wakeup fd
- the main thread goes back to sleep
- trip_signal sets is_tripped=1 and calls Py_AddPendingCall to notify
  the main thread the it should run the Python-level signal handler
- the main thread doesn't notice because it's asleep

This has been causing repeated failures in the Trio test suite:
  https://github.com/python-trio/trio/issues/119
(cherry picked from commit 4ae01496971624c75080431806ed1c08e00f22c7)

7 years ago[3.6] bpo-30290: IDLE - pep8 names and tests for help-about (#2070)
terryjreedy [Sat, 10 Jun 2017 06:53:19 +0000 (02:53 -0400)]
[3.6] bpo-30290: IDLE - pep8 names and tests for help-about (#2070)

(cherry picked from commit 054e09147aaa6f61aca6cd40c7bf7ce6dc54a04b)

* bpo-30290: IDLE: Refactor help_about to PEP8 names (#1714)

Patch by Cheryl Sabella.
(cherry picked from commit 5a346d5dbc1f0f70eca706a8ba19f7645bf17837)

* IDLE test_help_about: edit and add test. (#1838)

Coverage is now 100%
(cherry picked from commit eca7da0f13c78013b924fe7306f3e2e59c0af40b)

7 years ago[3.6] Fix TypeError is asyncio/proactor_events (GH-993) (#2061)
Yury Selivanov [Sat, 10 Jun 2017 04:15:28 +0000 (00:15 -0400)]
[3.6] Fix TypeError is asyncio/proactor_events (GH-993) (#2061)

(cherry picked from commit 34792d25ab7329241ea24595286d65d54c266274)

7 years agobpo-30266: support "= None" pattern in AbstractContextManager (GH-1448) (GH-2054)
Mariatta [Sat, 10 Jun 2017 03:36:28 +0000 (20:36 -0700)]
bpo-30266: support "= None" pattern in AbstractContextManager (GH-1448) (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)

7 years ago[3.6] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)
Zachary Ware [Sat, 10 Jun 2017 03:26:31 +0000 (22:26 -0500)]
[3.6] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)

(cherry picked from commit 42e3acda86829def9adc354fbee77597b849bf9e)

7 years ago[3.6] bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536...
Mariatta [Sat, 10 Jun 2017 01:33:31 +0000 (18:33 -0700)]
[3.6] bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536) (GH-2055)

Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex.
(cherry picked from commit 74921ed8941fce14c2a53dc7280f43eb01fe4ed8)

7 years ago[3.6] Make codecov config on master the only config used (GH-2041) (GH-2052)
Brett Cannon [Sat, 10 Jun 2017 00:02:04 +0000 (17:02 -0700)]
[3.6] Make codecov config on master the only config used (GH-2041) (GH-2052)

This will allow for centralized management of the Codecov config to prevent skew as well as easier management going forward.

Closes python/core-workflowGH-81.
(cherry picked from commit 11ffb4543bc000dea527bcc0417e2f8bda13790f)

7 years agoBreak circular references when closing SSLTransport objects (#981) (#2049)
Yury Selivanov [Fri, 9 Jun 2017 23:14:35 +0000 (19:14 -0400)]
Break circular references when closing SSLTransport objects (#981) (#2049)

7 years agoClosing transport during handshake process leaks socket (#480) (#2044)
Yury Selivanov [Fri, 9 Jun 2017 22:33:31 +0000 (18:33 -0400)]
Closing transport during handshake process leaks socket (#480) (#2044)

7 years ago[3.6] Clarify what --enable-optimizations does (GH-1847) (GH-2039)
Brett Cannon [Fri, 9 Jun 2017 21:34:32 +0000 (14:34 -0700)]
[3.6] Clarify what --enable-optimizations does (GH-1847) (GH-2039)

(cherry picked from commit b4e5fee6f5bcc50500ea6261a22021db58955b55)

7 years agoFix waiter cancellation in asyncio.Lock (#1031) (#2037)
Yury Selivanov [Fri, 9 Jun 2017 21:07:48 +0000 (17:07 -0400)]
Fix waiter cancellation in asyncio.Lock (#1031) (#2037)

Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585

7 years ago[3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack (GH...
Yury Selivanov [Fri, 9 Jun 2017 21:06:39 +0000 (17:06 -0400)]
[3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack (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)

7 years agobpo-30524: Write unit tests for FASTCALL (#2022) (#2030)
Victor Stinner [Fri, 9 Jun 2017 20:28:32 +0000 (22:28 +0200)]
bpo-30524: Write unit tests for FASTCALL (#2022) (#2030)

Test C functions:

* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()
(cherry picked from commit 3b5cf85edc188345668f987c824a2acb338a7816)

7 years ago[3.6] IDLE test_textview: add comments and test, increase coverage to 100% (GH-1641...
terryjreedy [Fri, 9 Jun 2017 19:59:31 +0000 (15:59 -0400)]
[3.6] IDLE test_textview: add comments and test, increase coverage to 100% (GH-1641) (#2018)

(cherry picked from commit 295304d412700cc6621bb592109fa42249a9dcdb)

7 years agobpo-24755: Document asyncio.wrap_future (GH-603) (GH-2019)
Mariatta [Fri, 9 Jun 2017 14:32:46 +0000 (07:32 -0700)]
bpo-24755: Document asyncio.wrap_future (GH-603) (GH-2019)

(cherry picked from commit 824f6879121413e09439fffef54580413e44bf46)

7 years ago[3.6] bpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366
Nick Coghlan [Fri, 9 Jun 2017 12:37:53 +0000 (22:37 +1000)]
[3.6] bpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366

* RFC 1750 has been been obsoleted by RFC 4086.
* RFC 3280 has been obsoleted by RFC 5280.
* RFC 4366 has been obsoleted by RFC 6066.
(cherry picked from commit 63c2c8ac17750ba2be2cfc4e339cae1f4edee54f)

7 years agobpo-30524: Fix _PyStack_UnpackDict() (#1886)
Victor Stinner [Fri, 9 Jun 2017 11:24:53 +0000 (13:24 +0200)]
bpo-30524: Fix _PyStack_UnpackDict() (#1886)

* bpo-29259: Remove unused func parameter of _PyStack_UnpackDict()
* bpo-29286: Change _PyStack_UnpackDict() prototype to be able to
  notify of failure when args is NULL. _PyStack_UnpackDict() now
  returns -1 on error.

7 years ago[3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. ...
Serhiy Storchaka [Thu, 8 Jun 2017 21:38:06 +0000 (00:38 +0300)]
[3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. (GH-1888) (#2013)

'invalid character in identifier' now is raised instead of
'f-string: empty expression not allowed' if a subexpression contains
only whitespaces and they are not accepted by Python parser.
(cherry picked from commit 2e9cd58)

7 years agobpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)
Victor Stinner [Thu, 8 Jun 2017 21:14:07 +0000 (23:14 +0200)]
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)

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)

7 years agobpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)
Victor Stinner [Thu, 8 Jun 2017 21:13:12 +0000 (23:13 +0200)]
bpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)

Fix a reference leak in _io._WindowsConsoleIO: PyUnicode_FSDecoder()
always initialize decodedname when it succeed and it doesn't clear
input decodedname object.
(cherry picked from commit 29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c)

7 years ago[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
Denis Osipov [Thu, 8 Jun 2017 12:02:05 +0000 (17:02 +0500)]
[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)

* 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)

7 years ago[3.6] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1994)
Nathaniel J. Smith [Thu, 8 Jun 2017 11:14:40 +0000 (04:14 -0700)]
[3.6] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1994)

If pass a server_hostname= that fails IDNA decoding to SSLContext.wrap_socket or SSLContext.wrap_bio, then the SSLContext object had a spurious Py_DECREF called on it, eventually leading to segfaults.
(cherry picked from commit 65ece7ca2366308fa91a39a8dfa255e6bdce3cca)

7 years ago[3.6] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#1990)
Matthias Klose [Thu, 8 Jun 2017 01:07:41 +0000 (18:07 -0700)]
[3.6] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#1990)

* Update config.{guess,sub} from gnu.org.
(cherry picked from commit 6f46683a6257f22f25d136ed080d58d0c060a43b)

7 years agobpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985)
Antoine Pietri [Wed, 7 Jun 2017 17:18:56 +0000 (19:18 +0200)]
bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985)

7 years ago[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)
Nate [Wed, 7 Jun 2017 04:21:34 +0000 (21:21 -0700)]
[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)

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)

7 years agobpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527...
Nate [Wed, 7 Jun 2017 00:31:03 +0000 (17:31 -0700)]
bpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (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

7 years agobpo-29596: Improve clinic howto documentation (GH-1710) (GH-1976)
gfyoung [Tue, 6 Jun 2017 21:17:18 +0000 (17:17 -0400)]
bpo-29596: Improve clinic howto documentation (GH-1710) (GH-1976)

Clarify that `two-pass` buffer can only be dumped once, and it prints out all text sent to it during all processing, even from Clinic blocks *after* the dumping point.

7 years ago[3.6] bpo-30557: faulthandler now correctly filters and displays exception … (#1960)
Steve Dower [Tue, 6 Jun 2017 20:47:14 +0000 (13:47 -0700)]
[3.6] bpo-30557: faulthandler now correctly filters and displays exception … (#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).

7 years agobpo-30583: Fix typo in datetime dateutil documentation (GH-1972) (GH-1974)
wim glenn [Tue, 6 Jun 2017 19:32:14 +0000 (14:32 -0500)]
bpo-30583: Fix typo in datetime dateutil documentation (GH-1972) (GH-1974)

Replace `datetuil` into `dateutil`
(cherry picked from commit 53f2af16551eb3a080da313257603c31ef8b93b4)

7 years ago[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)
Serhiy Storchaka [Tue, 6 Jun 2017 16:23:02 +0000 (19:23 +0300)]
[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)

(cherry picked from commit 48fb766)

7 years ago[3.6] bpo-30303: IDLE: Add _utest argument to textview (GH-1499) (#1916)
Mariatta [Tue, 6 Jun 2017 15:56:59 +0000 (08:56 -0700)]
[3.6] bpo-30303: IDLE: Add _utest argument to textview (GH-1499) (#1916)

(cherry picked from commit ba365da9cee8901fad08ab0b61c7489c110e5c97)

7 years ago[3.6] Install dependencies in Travis OSX build (GH-1952)
Zachary Ware [Tue, 6 Jun 2017 03:41:17 +0000 (22:41 -0500)]
[3.6] Install dependencies in Travis OSX build (GH-1952)

(cherry picked from commit 167e0fc211c06df)

7 years agobpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)
Nick Coghlan [Tue, 6 Jun 2017 02:19:37 +0000 (12:19 +1000)]
bpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)

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)

7 years ago[3.6] bpo-30417: Disable 'cpu' and 'tzdata' resources on Travis (GH-1928)
Zachary Ware [Tue, 6 Jun 2017 00:10:21 +0000 (19:10 -0500)]
[3.6] bpo-30417: Disable 'cpu' and 'tzdata' resources on Travis (GH-1928)

Also weakens the 'should this be run?' regex to allow all builds when .travis.yml changes.
(cherry picked from commit c53b13b270767948fddb58b287149c499f9a03c4)

7 years agobpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943)
csabella [Mon, 5 Jun 2017 03:12:23 +0000 (23:12 -0400)]
bpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943)

* bpo-30538: Update count() in Functional HOWTO
* bpo-30538: Update enumerate() arguments in Functional HOWTO
(cherry picked from commit 9be4ff359daa67cde6246494f643ed7cd2825d46)

7 years agobpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)
Mariatta [Mon, 5 Jun 2017 03:06:48 +0000 (20:06 -0700)]
bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)

Update the code example in Functions and Methods section
Remove objtype argument in MethodType
(cherry picked from commit 1bced56567335745f91676192fc39c06aab30da9)

7 years ago[3.6] Only run AppVeyor on long-lived branches (GH-1941)
Zachary Ware [Mon, 5 Jun 2017 00:50:37 +0000 (19:50 -0500)]
[3.6] Only run AppVeyor on long-lived branches (GH-1941)

Also on the short-lived `buildbot-custom` branch.
(cherry picked from commit d3bedf356aca04ed9135a84b08)

7 years ago[3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised...
Zachary Ware [Sun, 4 Jun 2017 22:14:03 +0000 (17:14 -0500)]
[3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised (GH-1920)

We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).
(cherry picked from commit 7a99625e0d95cd88ed8842d8677b5beea1fde5ae)

7 years ago[3.6] Turn on macOS builds for Travis (GH-1846) (#1929)
Brett Cannon [Sat, 3 Jun 2017 17:33:53 +0000 (10:33 -0700)]
[3.6] Turn on macOS builds for Travis (GH-1846) (#1929)

Initially the macOS builds are allowed to fail until such time that they can be determined to be stable and not add an unacceptable amount of time to the overall Travis-passing process.
(cherry picked from commit 21c2dd7cf8414c903f0e83cf1d6b7f02f645f422)

7 years agobpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW...
Steve Dower [Fri, 2 Jun 2017 21:39:05 +0000 (14:39 -0700)]
bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912) (#1925)

* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

7 years agobpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) (GH-1915)
Mariatta [Fri, 2 Jun 2017 04:56:24 +0000 (21:56 -0700)]
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions  (GH-1271) (GH-1915)

Builtin container types have two potential link targets in the docs:

- their entry in the list of builtin callables
- their type documentation

This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry..
(cherry picked from commit c6db4811f9ea3aeff0e1fafe1c60a22835ef359e)

7 years agobpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH...
Matthias Bussonnier [Fri, 2 Jun 2017 03:26:15 +0000 (20:26 -0700)]
bpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH-1913)

(cherry picked from commit cdb89cd)

7 years agobpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1676...
Xiang Zhang [Thu, 1 Jun 2017 14:20:27 +0000 (22:20 +0800)]
bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1676) (#1903)

7 years agobpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1905)
Mariatta [Thu, 1 Jun 2017 14:12:01 +0000 (07:12 -0700)]
bpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1905)

(cherry picked from commit 0737ee20671d60802a7ef40f653fe449f1921de0)