]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agobpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. (GH-19642)
Miss Islington (bot) [Wed, 22 Apr 2020 03:00:27 +0000 (20:00 -0700)] 
bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. (GH-19642)

(cherry picked from commit 783a673f23c5e9ffafe12fe172e119dc0fa2abda)

Co-authored-by: Ned Deily <nad@python.org>
5 years agoSmall improvements to the recipes and examples. (GH-19635) (GH-19638)
Miss Islington (bot) [Tue, 21 Apr 2020 23:18:49 +0000 (16:18 -0700)] 
Small improvements to the recipes and examples. (GH-19635) (GH-19638)

* Add underscores to long numbers to improve readability
* Use bigger dataset in the bootstrapping example
* Convert single-server queue example to more useful multi-server queue
(cherry picked from commit d3a8d616faf3364b22fde18dce8c168de9368146)

5 years agobpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)
Miss Islington (bot) [Mon, 20 Apr 2020 20:24:35 +0000 (13:24 -0700)] 
bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)

https://bugs.python.org/issue39942
(cherry picked from commit a25a04fea5446b1712cde0cff556574be139285a)

Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
5 years ago[3.8] bpo-40330: Fix utf-8 size check in ShareableList (GH-19606) (GH-19625)
Antoine Pitrou [Mon, 20 Apr 2020 19:22:50 +0000 (21:22 +0200)] 
[3.8] bpo-40330: Fix utf-8 size check in ShareableList (GH-19606) (GH-19625)

The item size must be checked after encoding to bytes, not before.

Automerge-Triggered-By: @pitrou.
(cherry picked from commit eba9f6155df59c9beed97fb5764c9f01dd941af0)

Co-authored-by: Antoine Pitrou <antoine@python.org>
5 years agobpo-40260: Revert breaking changes made in modulefinder (GH-19595)
Miss Islington (bot) [Mon, 20 Apr 2020 15:18:11 +0000 (08:18 -0700)] 
bpo-40260: Revert breaking changes made in modulefinder (GH-19595)

(cherry picked from commit 9b0b5d2baebd0b6a545317200c313a6a7408731e)

Co-authored-by: Barry <barry@barrys-emacs.org>
5 years agoFix typo in Lib/tracepack.py (GH-19605)
Miss Islington (bot) [Mon, 20 Apr 2020 02:36:03 +0000 (19:36 -0700)] 
Fix typo in Lib/tracepack.py (GH-19605)

Typo fix: "emites" -> "emit".
(cherry picked from commit df8913f7c48d267efd662e8ffd9496595115eee8)

Co-authored-by: Galden <wudenggang0@163.com>
5 years agobpo-39285: Clarify example for PurePath.match (GH-19458)
Miss Islington (bot) [Sun, 19 Apr 2020 10:03:35 +0000 (03:03 -0700)] 
bpo-39285: Clarify example for PurePath.match (GH-19458)

Fixes Issue39285

The example incorrectly returned True for match.

Furthermore the example is ambiguous in its usage of PureWindowsPath.
Windows is case-insensitve, however the underlying match functionality
utilizes fnmatch.fnmatchcase.

Automerge-Triggered-By: @pitrou
(cherry picked from commit c12375aa0b838d34067efa3f1b9a1fbc632d0413)

Co-authored-by: Tim Lo <timlo@users.noreply.github.com>
5 years agobpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269)
Miss Islington (bot) [Sat, 18 Apr 2020 18:14:55 +0000 (11:14 -0700)] 
bpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269)

Automerge-Triggered-By: @pitrou
(cherry picked from commit 482259d0dcf27714a84cf56b93977320bea7e093)

Co-authored-by: Furkan Önder <furkantahaonder@gmail.com>
5 years ago[3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) (GH-19583)
Serhiy Storchaka [Sat, 18 Apr 2020 16:11:48 +0000 (19:11 +0300)] 
[3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) (GH-19583)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
(cherry picked from commit 12446e6a605f066d837d3a595d0a73e4f3b43b65)

5 years agoFix two typos in multiprocessing (GH-19571) (GH-19578)
Miss Islington (bot) [Sat, 18 Apr 2020 07:24:15 +0000 (00:24 -0700)] 
Fix two typos in multiprocessing (GH-19571) (GH-19578)

(cherry picked from commit c606624af8d4cb3b4a052fb263bb983b3f87585b)

Co-authored-by: Galden <wudenggang0@163.com>
Co-authored-by: Galden <wudenggang0@163.com>
5 years agobpo-40287: Fix SpooledTemporaryFile.seek() return value (GH-19540)
Miss Islington (bot) [Fri, 17 Apr 2020 07:14:55 +0000 (00:14 -0700)] 
bpo-40287: Fix SpooledTemporaryFile.seek() return value (GH-19540)

It has not returned the file position after the seek.
(cherry picked from commit 485e715cb1ff92bc9882cd51ec32589f9cb30503)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542)
Miss Islington (bot) [Fri, 17 Apr 2020 02:29:50 +0000 (19:29 -0700)] 
bpo-40294: Fix _asyncio when module is loaded/unloaded multiple times (GH-19542)

(cherry picked from commit a75e730075cd25be1143e6183006f3b1d61bb80f)

Co-authored-by: Jeffrey Quesnelle <jquesnelle@gmail.com>
5 years agoFix parameter names in assertIn() docs (GH-18829)
Miss Islington (bot) [Fri, 17 Apr 2020 02:06:11 +0000 (19:06 -0700)] 
Fix parameter names in assertIn() docs (GH-18829)

The names "member" and "container" for the arguments are also used in the module and shown with the help() function, and are immediately understandable in this context, contrary to "first" and "second".
(cherry picked from commit a388bbd3f129364c39843f63e92f08bc53c71905)

Co-authored-by: Christoph Zwerschke <cito@online.de>
5 years agobpo-39793: use the same domain on make_msgid tests (GH-18698) (GH-19554)
Miss Islington (bot) [Thu, 16 Apr 2020 18:07:52 +0000 (11:07 -0700)] 
bpo-39793: use the same domain on make_msgid tests (GH-18698) (GH-19554)

(cherry picked from commit 5565c30f0b25996a0e73477fc0e1e1aced52b926)

Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
5 years ago[3.8] bpo-39667: Sync zipp 3.0 (GH-18540) (GH-18701)
Miss Islington (bot) [Wed, 15 Apr 2020 18:45:25 +0000 (11:45 -0700)] 
[3.8] bpo-39667: Sync zipp 3.0 (GH-18540) (GH-18701)

* bpo-39667: Sync zipp 3.0 (GH-18540)

* bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct performance degradation as found in zipp 3.0

* 📜🤖 Added by blurb_it.

* Update docs for new zipfile.Path.open

* Rely on dict, faster than OrderedDict.

* Syntax edits on docs

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 0aeab5c4381f0cc11479362af2533b3a391312ac)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Clarify the change in behavior with a couple of workaround options.

* Restore API compatibility while backporting performance improvements.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-40260: Update modulefinder to use io.open_code() and respect coding comments...
Miss Islington (bot) [Tue, 14 Apr 2020 19:34:41 +0000 (12:34 -0700)] 
bpo-40260: Update modulefinder to use io.open_code() and respect coding comments (GH-19488)

(cherry picked from commit d42e5820631cd66ee1eab8f610d4b58f3dfdd81c)

Co-authored-by: Barry <barry@barrys-emacs.org>
5 years agobpo-32033: Fix test_pwd failures on Android (GH-19502)
Miss Islington (bot) [Tue, 14 Apr 2020 18:31:00 +0000 (11:31 -0700)] 
bpo-32033: Fix test_pwd failures on Android (GH-19502)

(cherry picked from commit 96515e9f6785328c52ebc5d4ce60e0087a9adc2d)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years ago[3.8] Update libregrtest from master (GH-19516)
Victor Stinner [Tue, 14 Apr 2020 17:51:18 +0000 (19:51 +0200)] 
[3.8] Update libregrtest from master (GH-19516)

* bpo-37531: regrtest now catchs ProcessLookupError (GH-16827)

Fix a warning on a race condition on TestWorkerProcess.kill(): ignore
silently ProcessLookupError rather than logging an useless warning.

(cherry picked from commit a661392f8fb5ac4fc095aa1845d1eb7a25c4e9be)

* bpo-38502: regrtest uses process groups if available (GH-16829)

test.regrtest now uses process groups in the multiprocessing mode
(-jN command line option) if process groups are available: if
os.setsid() and os.killpg() functions are available.

(cherry picked from commit ecb035cd14c11521276343397151929a94018a22)

* bpo-37957: Allow regrtest to receive a file with test (and subtests) to ignore (GH-16989)

When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored.

For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.

(cherry picked from commit e0cd8aa70a3ce19c3d3712568940aa0cbd9aa97b)

* regrtest: log timeout at startup (GH-19514)

Reduce also worker timeout.

(cherry picked from commit 4cf65a630a8d45bad3fe5cdc4c2632ec64e7ba27)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agocloses bpo-40266, closes bpo-39953: Use numeric lib code if compiling against old...
Miss Islington (bot) [Tue, 14 Apr 2020 03:31:18 +0000 (20:31 -0700)] 
closes bpo-40266, closes bpo-39953: Use numeric lib code if compiling against old OpenSSL. (GH-19506)

(cherry picked from commit 584a3cfda4d7a65ea0c1ea1ee541378bb7be46ca)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years ago[3.8] Improved documentation for `BUILD_CONST_KEY_MAP` (GH-19454) (GH-19495)
Miss Islington (bot) [Mon, 13 Apr 2020 03:01:53 +0000 (20:01 -0700)] 
[3.8] Improved documentation for `BUILD_CONST_KEY_MAP` (GH-19454) (GH-19495)

(cherry picked from commit 85dd6bb1f61f7edcd6ac0b640a98644531690a0e)

Co-authored-by: laike9m <laike9m@users.noreply.github.com>
Automerge-Triggered-By: @zhangyangyu
5 years agocloses bpo-39953: Generate ifdefs around library code definitions. (GH-19490)
Miss Islington (bot) [Sun, 12 Apr 2020 19:17:34 +0000 (12:17 -0700)] 
closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)

(cherry picked from commit 909b87d2bb3d6330d39c48e43f7f50f4d086cc41)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object...
Miss Islington (bot) [Sun, 12 Apr 2020 15:18:57 +0000 (08:18 -0700)] 
bpo-31758: Prevent crashes when using an uninitialized _elementtree.XMLParser object (GH-3997) (GH-19485)

(cherry picked from commit 402e1cdb132f384e4dcde7a3d7ec7ea1fc7ab527)

5 years ago[3.8] bpo-40126: Fix reverting multiple patches in unittest.mock. (GH-19351) (GH...
Serhiy Storchaka [Sun, 12 Apr 2020 11:53:46 +0000 (14:53 +0300)] 
[3.8] bpo-40126: Fix reverting multiple patches in unittest.mock. (GH-19351) (GH-19483)

Patcher's __exit__() is now never called if its __enter__() is failed.
Returning true from __exit__() silences now the exception.
(cherry picked from commit 4b222c9491d1700e9bdd98e6889b8d0ea1c7321e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agocloses bpo-39953: Update OpenSSL error codes table. (GH-19082)
Miss Islington (bot) [Sat, 11 Apr 2020 20:53:00 +0000 (13:53 -0700)] 
closes bpo-39953: Update OpenSSL error codes table. (GH-19082)

I updated the error codes using the OpenSSL 1.1.1f source tree.
(cherry picked from commit 3e0dd3730b5eff7e9ae6fb921aa77cd26efc9e3a)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-38501: Add a warning section to multiprocessing.Pool docs about resource managing...
Miss Islington (bot) [Sat, 11 Apr 2020 02:11:17 +0000 (19:11 -0700)] 
bpo-38501: Add a warning section to multiprocessing.Pool docs about resource managing (GH-19466)

(cherry picked from commit 7ec43a73092d43c6c95e7dd2669f49d54b57966f)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-40197: Better describe the benchmark results table (GH-19386)
Miss Islington (bot) [Fri, 10 Apr 2020 20:00:15 +0000 (13:00 -0700)] 
bpo-40197: Better describe the benchmark results table (GH-19386)

(cherry picked from commit c63629e7c09da80a6b7d0253d04a9b3f57f88eff)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agoRemove extraneous ')' in abstract.h (GH-19146) (#19451)
Miss Islington (bot) [Thu, 9 Apr 2020 18:55:00 +0000 (11:55 -0700)] 
Remove extraneous ')' in abstract.h (GH-19146) (#19451)

(cherry picked from commit ac2cfe6631b77a2005d8f16f034dbb6154f04ab2)

Co-authored-by: Jimmy Yang <codingExpert123@gmail.com>
5 years agobpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler is xlc...
Victor Stinner [Thu, 9 Apr 2020 15:32:21 +0000 (17:32 +0200)] 
bpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler is xlc on AIX (GH-19225) (GH-19444)

(cherry picked from commit 76db37b1d37a9daadd9e5b320f2d5a53cd1352ec)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
5 years agobpo-40214: Temporarily disable a ctypes test (GH-19404)
Miss Islington (bot) [Thu, 9 Apr 2020 12:31:42 +0000 (05:31 -0700)] 
bpo-40214: Temporarily disable a ctypes test (GH-19404)

Only one particular sub-test of
ctypes.test.test_loading.test_load_dll_with_flags is disabled, which
caused failures on Azure Pipelines CI.
(cherry picked from commit f407e209c1e35b64835f73e7e7ca23e33817e9fe)

Co-authored-by: Zachary Ware <zach@python.org>
5 years agobpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile (GH-19442)
Victor Stinner [Wed, 8 Apr 2020 22:36:13 +0000 (00:36 +0200)] 
bpo-40204: Pin Sphinx version to 1.8.2 in Doc/Makefile (GH-19442)

5 years agobpo-40089: Fix threading._after_fork() (GH-19191) (GH-19194)
Miss Islington (bot) [Tue, 7 Apr 2020 21:35:52 +0000 (14:35 -0700)] 
bpo-40089: Fix threading._after_fork() (GH-19191) (GH-19194)

If fork was not called by a thread spawned by threading.Thread,
threading._after_fork() now creates a _MainThread instance for
_main_thread, instead of a _DummyThread instance.
(cherry picked from commit d8ff44ce4cd6f3ec0fab5fccda6bf14afcb25c30)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40196: Fix a bug in the symtable when reporting inspecting global variables ...
Miss Islington (bot) [Mon, 6 Apr 2020 16:41:55 +0000 (09:41 -0700)] 
bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391) (GH-19394)

(cherry picked from commit 799d7d61a91eb0ad3256ef9a45a90029cef93b7c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoFix misinformation about NaN != NaN comparison (GH-19357) (GH-19383)
Miss Islington (bot) [Sun, 5 Apr 2020 09:56:37 +0000 (02:56 -0700)] 
Fix misinformation about NaN != NaN comparison (GH-19357) (GH-19383)

(cherry picked from commit 810f68f1282c917fc1ad6af540a9f08524dfe310)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
5 years ago[3.8] closes bpo-40184: Only define pysiphash if the hash algorithm is SIPHASH24...
Benjamin Peterson [Sat, 4 Apr 2020 21:46:54 +0000 (16:46 -0500)] 
[3.8] closes bpo-40184: Only define pysiphash if the hash algorithm is SIPHASH24. (GH-19373)

(cherry picked from commit 1b21573)

Co-authored-by: Batuhan Taşkaya <batuhanosmantaskaya@gmail.com>
5 years agobpo-36320: Use the deprecated-removed directive for _field_types (GH-19370)
Serhiy Storchaka [Sat, 4 Apr 2020 21:43:07 +0000 (00:43 +0300)] 
bpo-36320: Use the deprecated-removed directive for _field_types (GH-19370)

5 years agobpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359)
Steve Dower [Sat, 4 Apr 2020 14:47:40 +0000 (15:47 +0100)] 
bpo-40164: Update Windows to OpenSSL 1.1.1f (GH-19359)

5 years agobpo-38689: avoid IDLE hanging when calltip fails getting a signature (GH-17152)
Miss Islington (bot) [Sat, 4 Apr 2020 03:25:06 +0000 (20:25 -0700)] 
bpo-38689: avoid IDLE hanging when calltip fails getting a signature (GH-17152)

Inspect.signature failed on the test case because its isinstance call raised.
(cherry picked from commit 52013e5b6d5ca32eef5a3d65ecdf7db89cefc2fd)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)
Miss Islington (bot) [Fri, 3 Apr 2020 22:20:12 +0000 (15:20 -0700)] 
bpo-40158: Fix CPython MSBuild Properties in NuGet Package (GH-19343)

Fix default Python home path relative to the NuGet package
(cherry picked from commit 6e623ff9d251e0ce86e9b18a01bfd6f067079d7a)

Co-authored-by: Chris Martinez <sydefekt@hotmail.com>
5 years agobpo-40131: Fix source and target order in zipapp example (GH-19290) (GH-19339)
Miss Islington (bot) [Fri, 3 Apr 2020 17:13:58 +0000 (10:13 -0700)] 
bpo-40131: Fix source and target order in zipapp example (GH-19290) (GH-19339)

(cherry picked from commit bd6a4c3d72828d3d0e13922e165998539d24f8bc)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-40122: Updated documentation for dis.findlabels() (GH-19274)
Miss Islington (bot) [Fri, 3 Apr 2020 08:07:16 +0000 (01:07 -0700)] 
bpo-40122: Updated documentation for dis.findlabels() (GH-19274)

(cherry picked from commit b74468e233a5137ff518e61eff65ca2d8833e38a)

Co-authored-by: laike9m <laike9m@users.noreply.github.com>
5 years agobpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines (GH-19320)
Miss Islington (bot) [Fri, 3 Apr 2020 01:25:51 +0000 (18:25 -0700)] 
bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines (GH-19320)

Update also OpenSSL version in Ubuntu and Coverage jobs.
(cherry picked from commit 1767a0490f80c7b90d81051db24ef2b82cd9434f)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40162: Update Travis CI config to OpenSSL 1.1.1f (GH-19319)
Miss Islington (bot) [Fri, 3 Apr 2020 01:21:54 +0000 (18:21 -0700)] 
bpo-40162: Update Travis CI config to OpenSSL 1.1.1f (GH-19319)

(cherry picked from commit b1ffb8b72307a556442d09b427c3b29badb9878c)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40140: test_builtin.PtyTests registers SIGHUP handler (GH-19314) (GH-19316)
Victor Stinner [Fri, 3 Apr 2020 00:11:54 +0000 (02:11 +0200)] 
bpo-40140: test_builtin.PtyTests registers SIGHUP handler (GH-19314) (GH-19316)

test_builtin.PtyTests now registers an handler for SIGHUP signal.
Closing the PTY file descriptor can emit a SIGHUP signal: just ignore
it.

run_child() now also closes the PTY file descriptor before waiting
for the process completition, otherwise the test hangs on AIX.

(cherry picked from commit 7a51a7e19f0143f75f8fc9ff68f93ed40937aec6)

5 years agolib2to3: Support named assignment expressions (GH-12702)
Miss Islington (bot) [Thu, 2 Apr 2020 23:03:09 +0000 (16:03 -0700)] 
lib2to3: Support named assignment expressions (GH-12702)

There are two copies of the grammar -- the one used by Python itself as
Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at
Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it
to be reasonable stable to avoid requiring fixer rewrites.

This brings suport for syntax like `if x:= foo():` to match what the live
Python grammar does.

This should've been added at the time of the walrus operator itself, but lib2to3 being
independent is often overlooked.  So we do consider this a bugfix rather than enhancement.
(cherry picked from commit 3c3aa4516c70753de06bb142b6793d01330fcf0f)

Co-authored-by: Tim Hatch <tim@timhatch.com>
5 years agobpo-38972: Link to instructions to change PowerShell execution policy (GH-19131)
Miss Islington (bot) [Thu, 2 Apr 2020 19:19:41 +0000 (12:19 -0700)] 
bpo-38972: Link to instructions to change PowerShell execution policy (GH-19131)

(cherry picked from commit 45217af29c7f380089af17beb48a5ea0560bbb9d)

Co-authored-by: Derek Keeler <d3r3kk@users.noreply.github.com>
5 years agobpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284) (GH-19296)
Miss Islington (bot) [Thu, 2 Apr 2020 10:15:55 +0000 (03:15 -0700)] 
bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284) (GH-19296)

The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.

AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 0b297d4ff1c0e4480ad33acae793fbaf4bf015b4)

5 years agobpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines (GH-19288)
Miss Islington (bot) [Thu, 2 Apr 2020 01:26:09 +0000 (18:26 -0700)] 
bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines (GH-19288)

(cherry picked from commit 224e1c34d677ef42fe665ac008a000d4dcec1398)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-40094: Enhance os.WIFEXITED documentation (GH-19244) (GH-19277)
Miss Islington (bot) [Wed, 1 Apr 2020 23:26:55 +0000 (16:26 -0700)] 
bpo-40094: Enhance os.WIFEXITED documentation (GH-19244) (GH-19277)

(cherry picked from commit 7c72383f95b0cdedf390726069428d7b69ed2597)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-38527: fix configure script for Solaris (GH-16845)
Miss Islington (bot) [Wed, 1 Apr 2020 15:38:17 +0000 (08:38 -0700)] 
bpo-38527: fix configure script for Solaris (GH-16845)

On Solaris, the regular "grep" command may be an old version that fails to search a binary file. We need to use the correct command (ggrep, in our case), which is found by the configure script earlier.

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 5dd836030e0e399b21ab0865ae0d93934bdb3930)

Co-authored-by: Arnon Yaari <wiggin15@yahoo.com>
5 years agobpo-40121: Fix exception type in test (GH-19267)
Miss Islington (bot) [Wed, 1 Apr 2020 13:02:55 +0000 (06:02 -0700)] 
bpo-40121: Fix exception type in test (GH-19267)

(cherry picked from commit 3ef4a7e5a7c29e17d5152d1fa6ceeb1fee269699)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoHandle when IOCTL_VM_SOCKETS_GET_LOCAL_CID does not exist in "socket" (GH-19270)
Miss Islington (bot) [Wed, 1 Apr 2020 01:25:34 +0000 (18:25 -0700)] 
Handle when IOCTL_VM_SOCKETS_GET_LOCAL_CID does not exist in "socket" (GH-19270)

Running `test_socket` or anything that depends on it (like python -m
test.pythoninfo) crashes if IOCTL_VM_SOCKETS_GET_LOCAL_CID does not
exist in the socket module.

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 6eb9619c88612565b424be14196a8adae6d51978)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agoDocument most common signals (GH-19245) (GH-19257)
Victor Stinner [Tue, 31 Mar 2020 17:44:28 +0000 (19:44 +0200)] 
Document most common signals (GH-19245) (GH-19257)

Document individual signals (only the most common signals):
description, default action, availability.

(cherry picked from commit 400e1dbcad93061f1f7ab4735202daaa5e731507)

5 years agobpo-40019: Skip test_gdb if Python was optimized (GH-19081)
Miss Islington (bot) [Tue, 31 Mar 2020 17:27:41 +0000 (10:27 -0700)] 
bpo-40019: Skip test_gdb if Python was optimized (GH-19081)

test_gdb now skips tests if it detects that gdb failed to read debug
information because the Python binary is optimized.
(cherry picked from commit 7bf069b6110278102c8f4719975a5eb5a5af25f9)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agocloses bpo-40125: Update multissltests.py to use OpenSSL 1.1.1f. (GH-19248)
Miss Islington (bot) [Tue, 31 Mar 2020 16:08:49 +0000 (09:08 -0700)] 
closes bpo-40125: Update multissltests.py to use OpenSSL 1.1.1f. (GH-19248)

(cherry picked from commit cd16661f903153ecac55f190ed682e576c5deb24)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
5 years agobpo-39689: Do not use native packing for format "?" with standard size (GH-18969)
Miss Islington (bot) [Tue, 31 Mar 2020 12:26:05 +0000 (05:26 -0700)] 
bpo-39689: Do not use native packing for format "?" with standard size (GH-18969)

(cherry picked from commit 472fc843ca816d65c12f9508ac762ca492165c45)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-40121: Fixes audit event raised on creating a new socket (GH-19238)
Miss Islington (bot) [Tue, 31 Mar 2020 11:57:06 +0000 (04:57 -0700)] 
bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)

(cherry picked from commit 63ba5cccf484b9ec23dfbf4cf7ffdc833eda98c3)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agofix comma location in various places (GH-19233)
Miss Islington (bot) [Mon, 30 Mar 2020 21:34:31 +0000 (14:34 -0700)] 
fix comma location in various places (GH-19233)

(cherry picked from commit c49016e67c3255b37599b354a8d7995d40663991)

Co-authored-by: Mathieu Dupuy <deronnax@users.noreply.github.com>
5 years agobpo-38002: Use False/True for IDLE pyshell bools (GH-19203)
Miss Islington (bot) [Sat, 28 Mar 2020 17:16:03 +0000 (10:16 -0700)] 
bpo-38002: Use False/True for IDLE pyshell bools (GH-19203)

Change 0/1 assignments to 'executing', 'canceled', 'reading', 'endoffile'.
These are not used outside of pyshell. Other bools already use False/True.
Add comment about int needed for Windows call.
Remove self.more, unused in idlelib and code.InteractiveInterpreter.
The latter uses 'more' as a local.
(cherry picked from commit 34a49aa3e4d023b5f9e9029f4f1ec68f1a8a8120)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-40045: Make "dunder" method documentation easier to locate (GH-19153) (GH-19198)
Miss Islington (bot) [Fri, 27 Mar 2020 19:15:11 +0000 (12:15 -0700)] 
bpo-40045: Make "dunder" method documentation easier to locate (GH-19153) (GH-19198)

* issue 40045

* Update lexical_analysis.rst

Make "dunder" method documentation easier(GH-19153)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
(cherry picked from commit 5f9c131c099d6675d1a9d0228497865488afd548)

Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
Co-authored-by: Javad Mokhtari <javadmokhtari@outlook.com>
5 years agobpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)
Miss Islington (bot) [Fri, 27 Mar 2020 16:45:05 +0000 (09:45 -0700)] 
bpo-38237: Use divmod for positional arguments whatsnew example (GH-19171)

(cherry picked from commit 5a58c5280b8df4ca5d6a19892b24fff96e9ea868)

Co-authored-by: Ammar Askar <ammar@ammaraskar.com>
5 years agobpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related metho...
Miss Islington (bot) [Thu, 26 Mar 2020 17:15:05 +0000 (10:15 -0700)] 
bpo-19698: Document when importlib.machinery.FrozenImporter gained spec-related methods (GH-19158) (#19164)

(cherry picked from commit 302e5a8f79514fd84bafbc44b7c97ec636302322)

Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
5 years agobpo-1812: Fix newline conversion when doctest.testfile loads from a package whose...
Miss Islington (bot) [Thu, 26 Mar 2020 16:18:52 +0000 (09:18 -0700)] 
bpo-1812: Fix newline conversion when doctest.testfile loads from a package whose loader has a get_data method (GH-17385)

This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
(cherry picked from commit e0b8101492f6c61dee831425b4d3dae39a953599)

Co-authored-by: Peter Donis <peterdonis@alum.mit.edu>
5 years agobpo-39879: Update datamodel docs to include dict ordering (GH-19006)
Miss Islington (bot) [Thu, 26 Mar 2020 15:00:46 +0000 (08:00 -0700)] 
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)

Co-authored-by: furkanonder <furkantahaonder@gmail.com>
(cherry picked from commit 59c644eaa72b0cc48302f59d66852c4ea8332eba)

Co-authored-by: Lahfa Samy <lahfa121999@gmail.com>
5 years agobpo-40016: re docstring: Clarify relationship of inline and argument flags (GH-19078)
Miss Islington (bot) [Wed, 25 Mar 2020 19:01:31 +0000 (12:01 -0700)] 
bpo-40016: re docstring: Clarify relationship of inline and argument flags (GH-19078)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 89a2209ae6fc5f39868621799730e16f931eb497)

Co-authored-by: Ram Rachum <ram@rachum.com>
5 years agobpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099) (GH-19141)
Miss Islington (bot) [Wed, 25 Mar 2020 07:00:53 +0000 (00:00 -0700)] 
bpo-40013: Clarify documentation of restval in csv.DictReader (GH-19099) (GH-19141)

(cherry picked from commit 4b3252cb764807fdb3a661b458d43e4af55cf4df)

Co-authored-by: Juhana Jauhiainen <juhana.jauhiainen@gmail.com>
5 years agobpo-40014: Fix os.getgrouplist() (GH-19126)
Miss Islington (bot) [Tue, 24 Mar 2020 17:40:31 +0000 (10:40 -0700)] 
bpo-40014: Fix os.getgrouplist() (GH-19126)

Fix os.getgrouplist(): if getgrouplist() function fails because the
group list is too small, retry with a larger group list.

On failure, the glibc implementation of getgrouplist() sets ngroups
to the total number of groups. For other implementations, double the
group list size.
(cherry picked from commit f5c7cabb2be4e42a5975ba8aac8bb458c8d9d6d7)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agoClarify a guarantee of the logging module. (GH-19132)
Miss Islington (bot) [Tue, 24 Mar 2020 16:54:40 +0000 (09:54 -0700)] 
Clarify a guarantee of the logging module. (GH-19132)

When no additional arguments are passed to logging.debug() and related
methods, no % operation is performed on the passed in message.
(cherry picked from commit 9b8e74ca77da7167033917d155e5f55c67b92f14)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 years agobpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136)
Victor Stinner [Tue, 24 Mar 2020 16:12:19 +0000 (17:12 +0100)] 
bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120) (GH-19136)

PyThreadState.frame is a borrowed reference, not a strong reference:
PyThreadState_Clear() must not call Py_CLEAR(tstate->frame).

Remove test_threading.test_warnings_at_exit(): we cannot warranty
that the Python thread state of daemon threads is cleared in a
reliable way during Python shutdown.

(cherry picked from commit 5804f878e779712e803be927ca8a6df389d82cdf)

5 years agobpo-40014: Fix os.getgrouplist() on macOS (GH-19118)
Miss Islington (bot) [Mon, 23 Mar 2020 19:18:41 +0000 (12:18 -0700)] 
bpo-40014: Fix os.getgrouplist() on macOS (GH-19118)

On macOS, getgrouplist() returns a non-zero value without setting
errno if the group list is too small. Double the list size and call
it again in this case.
(cherry picked from commit 8ec7370c89aa522602eb9604086ce9f09770953d)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516) (GH...
Miss Islington (bot) [Sun, 22 Mar 2020 18:56:26 +0000 (11:56 -0700)] 
bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516) (GH-19110)

* bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS

This changeset removes the environment varialbe "__PYVENV_LAUNCHER__"
during interpreter launch as it is only needed to communicate between
the stub executable in framework installs and the actual interpreter.

Leaving the environment variable present may lead to misbehaviour when
launching other scripts.

* Actually commit the changes for issue 22490...

* Correct typo

Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com>
* Run make patchcheck

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
(cherry picked from commit 044cf94f610e831464a69a8e713dad89878824ce)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
5 years agobpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. (GH...
Miss Islington (bot) [Sat, 21 Mar 2020 14:32:25 +0000 (07:32 -0700)] 
bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. (GH-18942)

(cherry picked from commit b146568dfcbcd7409c724f8917e4f77433dd56e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years ago[3.8] bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060) (GH...
Victor Stinner [Fri, 20 Mar 2020 14:10:14 +0000 (15:10 +0100)] 
[3.8] bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060) (GH-19090)

test_site.test_startup_imports() is now skipped if a path of sys.path
contains a .pth file.

Sort test_site imports.

5 years agobpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH-18929)
Miss Islington (bot) [Fri, 20 Mar 2020 08:08:52 +0000 (01:08 -0700)] 
bpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH-18929)

Automerge-Triggered-By: @ned-deily
(cherry picked from commit 2de7ac97981c30e9c1001b05a771f52a41772c54)

Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
5 years agoFix "versionchanged" for pow named arguments (GH-19042) (GH-19079)
Miss Islington (bot) [Thu, 19 Mar 2020 18:35:02 +0000 (11:35 -0700)] 
Fix "versionchanged" for pow named arguments (GH-19042) (GH-19079)

The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
(cherry picked from commit c691f209523e20797c7b696c3f171b37429f5b3f)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
5 years agobpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL (GH-18968)
Miss Islington (bot) [Thu, 19 Mar 2020 11:54:16 +0000 (04:54 -0700)] 
bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL (GH-18968)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit 9052f7a41b90f2d34011c8da68f9a4facebc8a97)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
5 years agobpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)
Miss Islington (bot) [Tue, 17 Mar 2020 08:25:34 +0000 (01:25 -0700)] 
bpo-39973: Fix the docs for PyObject_GenericSetDict() (GH-19026)

PyObject_GenericSetDict() takes three arguments, not two.
(cherry picked from commit a45b695b9fcfbbb0a087222abc5c8d691a7d2770)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-35370: PyEval_SetTrace() logs unraisable error (GH-18977) (GH-19029)
Victor Stinner [Mon, 16 Mar 2020 17:18:20 +0000 (18:18 +0100)] 
bpo-35370: PyEval_SetTrace() logs unraisable error (GH-18977) (GH-19029)

If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(),
log the error as an unraisable exception.

(cherry picked from commit f6a58507820c67e8d0fb07875cd1b1d9f5e510a8)

5 years agobpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009)
Miss Islington (bot) [Sun, 15 Mar 2020 21:26:43 +0000 (14:26 -0700)] 
bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool (GH-19009)

When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads.

This commit moves the notification to the _terminate_pool function so is called from both code paths.

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
(cherry picked from commit ac10e0c93218627d1a639db0b7b41714c5f6a883)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
5 years agoFix a possible refleak in tupleobject.c (GH-19018)
Miss Islington (bot) [Sun, 15 Mar 2020 19:55:39 +0000 (12:55 -0700)] 
Fix a possible refleak in tupleobject.c (GH-19018)

(cherry picked from commit c81609e44eed641d3b8a137daa31ef35501c1f85)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
5 years agobpo-39965: Correctly raise SyntaxError if await is used outside async functions when...
Miss Islington (bot) [Sun, 15 Mar 2020 04:46:26 +0000 (21:46 -0700)] 
bpo-39965: Correctly raise SyntaxError if await is used outside async functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)

(cherry picked from commit 90235810ec28ca954bbf4b61a5ae5df7a00db409)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-39869: Fix typo in 'Instance objects' section. (GH-18889)
Miss Islington (bot) [Sat, 14 Mar 2020 22:13:18 +0000 (15:13 -0700)] 
bpo-39869: Fix typo in 'Instance objects' section. (GH-18889)

(cherry picked from commit e5e56328afac50aad6d8893185d8e7ba8928afe2)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
5 years agoLink to list of keywords in the laguage reference (GH-18024)
Miss Islington (bot) [Sat, 14 Mar 2020 19:14:57 +0000 (12:14 -0700)] 
Link to list of keywords in the laguage reference (GH-18024)

(cherry picked from commit 33238ec2af379e837cabc3945db5df8e23bf43e9)

Co-authored-by: Борис Верховский <boris.verk@gmail.com>
5 years agobpo-38576: Disallow control characters in hostnames in http.client (GH-18995)
Miss Islington (bot) [Sat, 14 Mar 2020 19:13:32 +0000 (12:13 -0700)] 
bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)

Add host validation for control characters for more CVE-2019-18348 protection.
(cherry picked from commit 9165addc22d05e776a54319a8531ebd0b2fe01ef)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
5 years agobpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 3...
Miss Islington (bot) [Sat, 14 Mar 2020 14:45:23 +0000 (07:45 -0700)] 
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 3.6+ (GC-18550)

(cherry picked from commit 6672c16b1d7f83789bf3a2016bd19edfd3568e71)

Co-authored-by: Taine Zhao <twshere@outlook.com>
5 years agobpo-39582: ossaudiodev module update helpers signature for ioctl calls. (GH-18412)
Miss Islington (bot) [Sat, 14 Mar 2020 14:43:53 +0000 (07:43 -0700)] 
bpo-39582: ossaudiodev module update helpers signature for ioctl calls. (GH-18412)

(cherry picked from commit b81f40f0adae3b1d1e57f9a89940ba827b9ede70)

Co-authored-by: David CARLIER <devnexen@gmail.com>
5 years ago[3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806...
Mark Dickinson [Sat, 14 Mar 2020 11:38:52 +0000 (11:38 +0000)] 
[3.8] bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806) (GH-18989)

In math_2(), the first PyFloat_AsDouble() call should be checked
for failure before the second call.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>.
(cherry picked from commit 5208b4b37953a406db0ed6a9db545c2948dde989)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
5 years agobpo-39915: Ensure await_args_list is updated according to the order in which coroutin...
Miss Islington (bot) [Sat, 14 Mar 2020 07:12:57 +0000 (00:12 -0700)] 
bpo-39915: Ensure await_args_list is updated according to the order in which coroutines were awaited (GH-18927)

Create call objects with awaited arguments instead of using call_args which has only last call value.
(cherry picked from commit e553f204bf0e39b1d701a364bc71b286acb9433f)

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
5 years ago[3.8] Doc: Fix grammar in PyErr_ResourceWarning (GH-18879) (GH-18976)
Karthikeyan Singaravelan [Fri, 13 Mar 2020 15:32:38 +0000 (21:02 +0530)] 
[3.8] Doc: Fix grammar in PyErr_ResourceWarning (GH-18879) (GH-18976)

(cherry picked from commit fdcd53f)

Co-authored-by: Daniel Hahler <git@thequod.de>
5 years agobpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18966)
Miss Islington (bot) [Thu, 12 Mar 2020 18:56:18 +0000 (11:56 -0700)] 
bpo-39689: Do not test undefined casts to _Bool (GH-18964) (#18966)

- When casting to _Bool, arrays should only contain zeros or ones.
(cherry picked from commit 1ae9cde4b2323235b5f9ff4bc76e4175a2257172)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
5 years agobpo-39930: Fix MSBuild detection for Build Tools (GH-18938)
Miss Islington (bot) [Thu, 12 Mar 2020 16:47:53 +0000 (09:47 -0700)] 
bpo-39930: Fix MSBuild detection for Build Tools (GH-18938)

Ensure we detect Build Tools installs using the newer logic, and skip looking in the registry for VS 2017.
(cherry picked from commit 894adc18b4fb7246b762276a50a332c0e4f0e0f0)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18956)
Victor Stinner [Thu, 12 Mar 2020 12:37:02 +0000 (13:37 +0100)] 
bpo-39884: Add method name in "bad call flags" error (GH-18944) (GH-18956)

PyDescr_NewMethod() and PyCFunction_NewEx() now include the method
name in the SystemError "bad call flags" error message to ease debug.

(cherry picked from commit c7d2d69d95b263ee5f83511bc6fbe53acdc24ea3)

5 years ago[3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called...
Serhiy Storchaka [Thu, 12 Mar 2020 07:30:56 +0000 (09:30 +0200)] 
[3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18954)

(cherry picked from commit e5ccc94bbb153431698b2391df625e8d47a93276)

5 years agoFix syntax error in an example in the ast documentation and sync docstrings (GH-18946)
Miss Islington (bot) [Thu, 12 Mar 2020 01:06:53 +0000 (18:06 -0700)] 
Fix syntax error in an example in the ast documentation and sync docstrings (GH-18946)

(cherry picked from commit c00c86b90443dbf3534cc4786a0b42b58db6e8af)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
5 years agobpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780)
Miss Islington (bot) [Wed, 11 Mar 2020 23:57:16 +0000 (16:57 -0700)] 
bpo-39847: EnterNonRecursiveMutex() uses GetTickCount64() (GH-18780)

The 32-bit (49-day) TickCount relied on in EnterNonRecursiveMutex can overflow
in the gap between the 'target' time and the 'now' time WaitForSingleObjectEx
returns, causing the loop to think it needs to wait another 49 days. This is
most likely to happen when the machine is hibernated during
WaitForSingleObjectEx.

This makes acquiring a lock/event/etc from the _thread or threading module
appear to never timeout.

Replace with GetTickCount64 - this is OK now Python no longer supports XP which
lacks it, and is in use for time.monotonic().

Co-authored-by: And Clover <and.clover@bromium.com>
(cherry picked from commit 64838ce7172c7a92183b39b22504b433a33a884d)

Co-authored-by: bobince <and+github@doxdesk.com>
5 years agobpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)
Miss Islington (bot) [Wed, 11 Mar 2020 20:18:01 +0000 (13:18 -0700)] 
bpo-39520: Fix un-parsing of ext slices with no dimensions (GH-18304)

(cherry picked from commit 185903de12de8837bf0dc0008a16e5e56c66a019)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
5 years agobpo-39916: Use os.scandir() as context manager in Path.glob(). (GH-18880)
Miss Islington (bot) [Wed, 11 Mar 2020 17:07:04 +0000 (10:07 -0700)] 
bpo-39916: Use os.scandir() as context manager in Path.glob(). (GH-18880)

(cherry picked from commit 704e2065f8b8021a4a6999470fb6ed3453f7679e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 years agobpo-39930: Convert error to warning for more silent failure (GH-18921)
Miss Islington (bot) [Wed, 11 Mar 2020 14:31:07 +0000 (07:31 -0700)] 
bpo-39930: Convert error to warning for more silent failure (GH-18921)

Makes it an error to create a layout without vcruntime DLL
(cherry picked from commit fde44ae6d08d3df79554155b1cf079e73a8fabdd)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-39930: Ensure vcruntime140.dll is included in all Windows packages (GH-18918)
Miss Islington (bot) [Wed, 11 Mar 2020 11:38:18 +0000 (04:38 -0700)] 
bpo-39930: Ensure vcruntime140.dll is included in all Windows packages (GH-18918)

Also adds GitHub CI test for Windows installer changes
(cherry picked from commit 2dd41740c97bd77695ddcc590caa7f53e76dc35a)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoFix download.html (GH-18902)
Miss Islington (bot) [Wed, 11 Mar 2020 04:40:04 +0000 (21:40 -0700)] 
Fix download.html (GH-18902)

`<tt>` is not allowed.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 39c34933fc958fd773ebf14ccd2e0224450b17ed)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-38662: ensurepip invokes pip via runpy (GH-18901)
Miss Islington (bot) [Tue, 10 Mar 2020 21:37:50 +0000 (14:37 -0700)] 
bpo-38662: ensurepip invokes pip via runpy (GH-18901)

The ensurepip module now invokes pip via the runpy module.
Hence it is no longer tightly coupled with the internal API of the bundled
pip version, allowing easier updates to a newer pip version both
internally and for distributors.

This way, any changes to the internal pip API won't mean ensurepip needs to be
changed as well. Also, distributors can update their pip wheels independent on
CPython release schedule.

Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit 88f82b2b9ea3514359cb6e3218121f75334063ac)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>