]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 years agoThe comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586) 17624/head
Miss Islington (bot) [Sun, 15 Dec 2019 20:04:07 +0000 (12:04 -0800)] 
The comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586)

Automerge-Triggered-By: @gvanrossum
(cherry picked from commit b08d3f71beab59653edfbbcf7b92a7bc8050d6b8)

Co-authored-by: Guido van Rossum <guido@python.org>
5 years agobpo-39035: travis: Don't use beta group (GH-17603)
Inada Naoki [Sat, 14 Dec 2019 14:01:54 +0000 (23:01 +0900)] 
bpo-39035: travis: Don't use beta group (GH-17603)

5 years agoFix elif start column offset when there is an else following (GH-17596) (GH-17600)
Miss Islington (bot) [Sat, 14 Dec 2019 10:43:42 +0000 (02:43 -0800)] 
Fix elif start column offset when there is an else following (GH-17596) (GH-17600)

(cherry picked from commit 5936a4ce914d42af97b9238e5090dedc8d5b0bd2)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agoAdd PYTHONUTF8 to commandline usage. (GH-17587)
Miss Islington (bot) [Sat, 14 Dec 2019 10:38:35 +0000 (02:38 -0800)] 
Add PYTHONUTF8 to commandline usage. (GH-17587)

Co-Authored-By: Victor Stinner <vstinner@python.org>
(cherry picked from commit 95826c773a9004fc5b3c89de55f800504685ab21)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591)
Miss Islington (bot) [Fri, 13 Dec 2019 23:30:41 +0000 (15:30 -0800)] 
bpo-36406: Handle namespace packages in doctest (GH-12520) (GH-17591)

(cherry picked from commit 8289e27393395ee903bd096d42e07c112d7f15c6)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
5 years agobpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt...
Miss Islington (bot) [Fri, 13 Dec 2019 16:21:54 +0000 (08:21 -0800)] 
bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt (GH-17582) (GH-17589)

When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.

https://bugs.python.org/issue39031

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602af7ee284d8db6955c26016f3f27d35536)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 years agobpo-39022, bpo-38594: Sync with importlib_metadata 1.3 (GH-17568) (GH-17569)
Miss Islington (bot) [Wed, 11 Dec 2019 01:47:06 +0000 (17:47 -0800)] 
bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 (GH-17568) (GH-17569)

* bpo-39022, bpo-38594: Sync with importlib_metadata 1.3 including improved docs for custom finders and better serialization support in EntryPoints.

* 📜🤖 Added by blurb_it.

* Correct module reference
(cherry picked from commit b7a0109cd2bafaa21a4d50aad307e901c68f9156)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
5 years agobpo-39012: Fix RC version suffix for nuget release files (GH-17564)
Miss Islington (bot) [Tue, 10 Dec 2019 23:40:02 +0000 (15:40 -0800)] 
bpo-39012: Fix RC version suffix for nuget release files (GH-17564)

(cherry picked from commit d0802d07d2c864b95480a9b24c7cc050e19189d5)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years ago[3.8] Minor fixes to the NEWS entries (GH-17557)
Pablo Galindo [Tue, 10 Dec 2019 16:11:33 +0000 (16:11 +0000)] 
[3.8] Minor fixes to the NEWS entries (GH-17557)

Automerge-Triggered-By: @pablogsal
5 years agoPost 3.8.1rc1
Łukasz Langa [Tue, 10 Dec 2019 08:13:16 +0000 (09:13 +0100)] 
Post 3.8.1rc1

5 years agoMerge tag 'v3.8.1rc1' into 3.8
Łukasz Langa [Tue, 10 Dec 2019 08:12:15 +0000 (09:12 +0100)] 
Merge tag 'v3.8.1rc1' into 3.8

Python 3.8.1rc1

5 years agoFix Windows release builds (GH-17550)
Miss Islington (bot) [Tue, 10 Dec 2019 05:28:10 +0000 (21:28 -0800)] 
Fix Windows release builds (GH-17550)

(cherry picked from commit abdeb57a212556b4cd3568cca7d316d71a5b8cf0)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-39002: Fix simple typo: tranlation -> translation (GH-17517) (GH-17538)
Miss Islington (bot) [Tue, 10 Dec 2019 01:35:25 +0000 (17:35 -0800)] 
bpo-39002: Fix simple typo: tranlation -> translation (GH-17517) (GH-17538)

(cherry picked from commit c18b805ac6a2d22176240ca93982fa1fb6559ec7)

Co-authored-by: Tim Gates <tim.gates@iress.com>
5 years agobpo-38943: Fix IDLE autocomplete window not always appearing (GH-17416)
Miss Islington (bot) [Tue, 10 Dec 2019 00:48:20 +0000 (16:48 -0800)] 
bpo-38943: Fix IDLE autocomplete window not always appearing (GH-17416)

This has happened on some versions of Ubuntu.
(cherry picked from commit bbc4162bafe018f07bab0b624b37974cc33daad9)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
5 years agobpo-38944: Escape key now closes IDLE completion windows. (GH-17419)
Miss Islington (bot) [Mon, 9 Dec 2019 23:38:33 +0000 (15:38 -0800)] 
bpo-38944: Escape key now closes IDLE completion windows. (GH-17419)

(cherry picked from commit 232689b40d8fcbbac27c8705607ff482ea5b46f8)

Co-authored-by: JohnnyNajera <58344607+JohnnyNajera@users.noreply.github.com>
5 years agobpo-39007: Add auditing events to functions in winreg (GH-17541)
Miss Islington (bot) [Mon, 9 Dec 2019 19:36:25 +0000 (11:36 -0800)] 
bpo-39007: Add auditing events to functions in winreg (GH-17541)

Also allows winreg.CloseKey() to accept same types as other functions.
(cherry picked from commit ee17e3735634c5fe15a43f897707de8011618627)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation...
Miss Islington (bot) [Mon, 9 Dec 2019 19:22:30 +0000 (11:22 -0800)] 
bpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation warning (GH-17540)

(cherry picked from commit b8cbe74c3498c617f0e73fd0cdc5c07f2c532092)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agoPython 3.8.1rc1 v3.8.1rc1
Łukasz Langa [Mon, 9 Dec 2019 17:47:55 +0000 (18:47 +0100)] 
Python 3.8.1rc1

5 years agobpo-38992: avoid fsum test failure from constant-folding (GH-17513) (GH-17530)
Miss Islington (bot) [Mon, 9 Dec 2019 17:32:34 +0000 (09:32 -0800)] 
bpo-38992: avoid fsum test failure from constant-folding (GH-17513) (GH-17530)

* Issue 38992: avoid fsum test failure

* Add NEWS entry
(cherry picked from commit bba873e633f0f1e88ea12fb935cbd58faa77f976)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
5 years agoFix APPX registry key generation (GH-17489)
Miss Islington (bot) [Mon, 9 Dec 2019 17:02:22 +0000 (09:02 -0800)] 
Fix APPX registry key generation (GH-17489)

(cherry picked from commit e89e159b18cc9f32a0a4a818d080eb6a63d888a7)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-34776: Fix dataclasses to support __future__ "annotations" mode (GH-9518) (#17531)
Miss Islington (bot) [Mon, 9 Dec 2019 16:07:51 +0000 (08:07 -0800)] 
bpo-34776: Fix dataclasses to support __future__ "annotations" mode (GH-9518) (#17531)

(cherry picked from commit d219cc4180e7589807ebbef7421879f095e72a98)

Co-authored-by: Yury Selivanov <yury@magic.io>
5 years agobpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (GH-17311...
Miss Islington (bot) [Mon, 9 Dec 2019 14:39:54 +0000 (06:39 -0800)] 
bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (GH-17311) (#17529)

(cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
5 years agobpo-39006: Fix asyncio when the ssl module is missing (GH-17524)
Miss Islington (bot) [Mon, 9 Dec 2019 14:19:48 +0000 (06:19 -0800)] 
bpo-39006: Fix asyncio when the ssl module is missing (GH-17524)

Fix asyncio when the ssl module is missing: only check for
ssl.SSLSocket instance if the ssl module is available.
(cherry picked from commit 82b4950b5e92bec343a436b3f9c116400b66e1b9)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-38916: Document array.array deprecation (GH-17523)
Victor Stinner [Mon, 9 Dec 2019 13:46:33 +0000 (14:46 +0100)] 
bpo-38916: Document array.array deprecation (GH-17523)

array.array: Document that tostring() and fromstring() deprecated
aliases will be removed in Python 3.9.

5 years agobpo-38547: Fix test_pty if the process is the session leader (GH-17519)
Miss Islington (bot) [Mon, 9 Dec 2019 11:15:23 +0000 (03:15 -0800)] 
bpo-38547: Fix test_pty if the process is the session leader (GH-17519)

Fix test_pty: if the process is the session leader, closing the
master file descriptor raises a SIGHUP signal: simply ignore SIGHUP
when running the tests.
(cherry picked from commit a1838ec2592e5082c75c77888f2a7a3eb21133e5)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-38669: patch.object now raises a helpful error (GH17510)
Miss Islington (bot) [Mon, 9 Dec 2019 06:59:04 +0000 (22:59 -0800)] 
bpo-38669: patch.object now raises a helpful error (GH17510)

This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.
(cherry picked from commit cd90a52983db34896a6335a572d55bdda274778f)

Co-authored-by: Elena Oat <oat.elena@gmail.com>
5 years agobpo-38673: dont switch to ps2 if the line starts with comment or whitespace (GH-17421)
Miss Islington (bot) [Mon, 9 Dec 2019 04:56:19 +0000 (20:56 -0800)] 
bpo-38673: dont switch to ps2 if the line starts with comment or whitespace (GH-17421)

https://bugs.python.org/issue38673
(cherry picked from commit 109fc2792a490ee5cd8a423e17d415fbdedec5c8)

Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
5 years agobpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)
Miss Islington (bot) [Mon, 9 Dec 2019 02:12:50 +0000 (18:12 -0800)] 
bpo-38708: email: Fix a potential IndexError when parsing Message-ID (GH-17504)

Fix a potential IndexError when passing an empty value to the message-id
parser. Instead, HeaderParseError should be raised.
(cherry picked from commit 3ae4ea1931361dd2743e464790e739d9285501bf)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
5 years agobpo-38698: Add a new InvalidMessageID token to email header parser. (GH-17503)
Miss Islington (bot) [Mon, 9 Dec 2019 02:11:31 +0000 (18:11 -0800)] 
bpo-38698: Add a new InvalidMessageID token to email header parser. (GH-17503)

This adds a new InvalidMessageID token to the email header parser which can be
used to represent invalid message-id headers in the parse tree.
(cherry picked from commit 68157da8b42b26408af5d157d2dba4fcf29c6320)

Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
5 years agobpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
Miss Islington (bot) [Sun, 8 Dec 2019 12:49:07 +0000 (04:49 -0800)] 
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)

now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.

https://bugs.python.org/issue38979

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 28c91631c24e53713ad0e8a2bbae716373f5e53d)

Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
5 years ago[3.8] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17499)
Miss Islington (bot) [Sat, 7 Dec 2019 17:20:27 +0000 (09:20 -0800)] 
[3.8] bpo-38820: OpenSSL 3.0.0 compatibility. (GH-17190) (GH-17499)

test_openssl_version now accepts version 3.0.0.

getpeercert() no longer returns IPv6 addresses with a trailing new line.

Signed-off-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820
(cherry picked from commit 2b7de6696bf2f924cd2cd9ff0a539c8aa37c6244)

Co-authored-by: Christian Heimes <christian@python.org>
https://bugs.python.org/issue38820

Automerge-Triggered-By: @tiran
5 years ago[3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions...
Andrew Svetlov [Sat, 7 Dec 2019 12:44:20 +0000 (14:44 +0200)] 
[3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio functions (GH-16457) (#17496)

https://bugs.python.org/issue37404
(cherry picked from commit 892f9e0777f262d366d4747a54c33a1c15a49da6)

Co-authored-by: idomic <michael.ido@gmail.com>
5 years agoMake repr of C accelerated TaskWakeupMethWrapper the same as of pure Python version...
Miss Islington (bot) [Sat, 7 Dec 2019 11:41:41 +0000 (03:41 -0800)] 
Make repr of C accelerated TaskWakeupMethWrapper the same as of pure Python version (GH-17484)

(cherry picked from commit 969ae7aca809a8dacafee04c261110eea0ac1945)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-38529: Fix asyncio stream warning (GH-17474)
Miss Islington (bot) [Sat, 7 Dec 2019 11:39:57 +0000 (03:39 -0800)] 
bpo-38529: Fix asyncio stream warning (GH-17474)

(cherry picked from commit 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
5 years agobpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)
Miss Islington (bot) [Fri, 6 Dec 2019 19:32:33 +0000 (11:32 -0800)] 
bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)

On most platforms, the `environ` symbol is accessible everywhere.

In a dylib on OSX, it's not easily accessible, you need to find it with
_NSGetEnviron.

The code was caching the *value* of environ. But a setenv() can change the value,
leaving garbage at the old value. Fix: don't cache the value of environ, just
read it every time.
(cherry picked from commit 723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb)

Co-authored-by: Benoit Hudson <benoit@imgspc.com>
5 years agobpo-33125: Add support for building and releasing Windows ARM64 packages (GH-17480)
Steve Dower [Fri, 6 Dec 2019 17:40:39 +0000 (09:40 -0800)] 
bpo-33125: Add support for building and releasing Windows ARM64 packages (GH-17480)

Note that the support is not actually enabled yet, and so we won't be publishing these packages. However, for those who want to build it themselves (even by reusing the Azure Pipelines definition), it's now relatively easy to enable.

5 years agobpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py (GH-13135)
Miss Islington (bot) [Fri, 6 Dec 2019 14:59:49 +0000 (06:59 -0800)] 
bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py (GH-13135)

Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute.

https://bugs.python.org/issue36820

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

Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
5 years agobpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)
Miss Islington (bot) [Thu, 5 Dec 2019 17:42:01 +0000 (09:42 -0800)] 
bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id (GH-17277)

parse_message_id() was improperly using a token defined inside an exception
handler, which was raising `UnboundLocalError` on parsing an invalid value.

https://bugs.python.org/issue38698
(cherry picked from commit bb815499af855b1759c02535f8d7a9d0358e74e8)

Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
5 years ago[3.8] bpo-38270: Fix indentation of test_hmac assertions (GH-17446) (GH-17450)
Miss Islington (bot) [Thu, 5 Dec 2019 16:51:30 +0000 (08:51 -0800)] 
[3.8] bpo-38270: Fix indentation of test_hmac assertions (GH-17446) (GH-17450)

Since https://github.com/python/cpython/commit/c64a1a61e6fc542cada40eb069a239317e1af36e two assertions were indented and thus ignored when running test_hmac.

This PR fixes it. As the change is quite trivial I didn't add a NEWS entry.

https://bugs.python.org/issue38270
(cherry picked from commit 894331838b256412c95d54051ec46a1cb96f52e7)

Co-authored-by: stratakis <cstratak@redhat.com>
https://bugs.python.org/issue38270

Automerge-Triggered-By: @tiran
5 years agobpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)
Miss Islington (bot) [Wed, 4 Dec 2019 20:30:31 +0000 (12:30 -0800)] 
bpo-38965: Fix faulthandler._stack_overflow() on GCC 10 (GH-17467)

Use the "volatile" keyword to prevent tail call optimization
on any compiler, rather than relying on compiler specific pragma.
(cherry picked from commit 8b787964e0a647caa0558b7c29ae501470d727d9)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agobpo-38634: Allow non-apple build to cope with libedit (GH-16986)
Miss Islington (bot) [Wed, 4 Dec 2019 16:21:16 +0000 (08:21 -0800)] 
bpo-38634: Allow non-apple build to cope with libedit (GH-16986)

The readline module now detects if Python is linked to libedit at runtime
on all platforms.  Previously, the check was only done on macOS.

If Python is used as a library by a binary linking to libedit, the linker
resolves the rl_initialize symbol required by the readline module against
libedit instead of libreadline, which leads to a segfault.

Take advantage of the existing supporting code to have readline module being
compatible with both situations.
(cherry picked from commit 7105319ada2e663659020cbe9fdf7ff38f421ab2)

Co-authored-by: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
5 years agobpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)
Miss Islington (bot) [Wed, 4 Dec 2019 09:57:55 +0000 (01:57 -0800)] 
bpo-33684: json.tool: Use utf-8 for infile and outfile. (GH-17460)

(cherry picked from commit 808769f3a4cbdc47cf1a5708dd61b1787bb192d4)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-27873: Update docstring for multiprocessing.Pool.map (GH-17436)
Miss Islington (bot) [Tue, 3 Dec 2019 23:37:40 +0000 (15:37 -0800)] 
bpo-27873: Update docstring for multiprocessing.Pool.map (GH-17436)

Update docstring for `multiprocessing.Pool.map` to mention `pool.starmap()`.

Prev PR: https://github.com/python/cpython/pull/17367  @aeros

https://bugs.python.org/issue27873
(cherry picked from commit eb48a451e3844185b9a8751c9badffbddc89689d)

Co-authored-by: An Long <aisk@users.noreply.github.com>
5 years agobpo-38945: UU Encoding: Don't let newline in filename corrupt the output format ...
Miss Islington (bot) [Mon, 2 Dec 2019 22:44:44 +0000 (14:44 -0800)] 
bpo-38945: UU Encoding: Don't let newline in filename corrupt the output format (GH-17418)

(cherry picked from commit a62ad4730c9b575f140f24074656c0257c86a09a)

Co-authored-by: Matthew Rollings <1211162+stealthcopter@users.noreply.github.com>
5 years agobpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)
Miss Islington (bot) [Mon, 2 Dec 2019 16:34:44 +0000 (08:34 -0800)] 
bpo-38815: Accept TLSv3 default in min max test (GH-NNNN) (GH-17437)

Make ssl tests less strict and also accept TLSv3 as the default maximum
version. This change unbreaks test_min_max_version on Fedora 32.

https://bugs.python.org/issue38815
(cherry picked from commit 34864d1cffdbfc620f8517dab9a68ae9a37b8c53)

Co-authored-by: torsava <torsava@redhat.com>
5 years agobpo-38449: Add URL delimiters test cases (GH-16729)
Miss Islington (bot) [Sun, 1 Dec 2019 23:24:17 +0000 (15:24 -0800)] 
bpo-38449: Add URL delimiters test cases (GH-16729)

* bpo-38449: Add tricky test cases

* bpo-38449: Reflect codereview
(cherry picked from commit 2fe4c48917c2d1b40cf063c6ed22ae2e71f4cb62)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agodocument threading.Lock.locked() (GH-17427)
Miss Islington (bot) [Sun, 1 Dec 2019 20:14:26 +0000 (12:14 -0800)] 
document threading.Lock.locked() (GH-17427)

(cherry picked from commit fdafa1d0ed0a8930b52ee81e57c931cc4d5c2388)

Co-authored-by: idomic <michael.ido@gmail.com>
5 years agoFix typos (GH-17423)
Miss Islington (bot) [Sun, 1 Dec 2019 05:52:39 +0000 (21:52 -0800)] 
Fix typos (GH-17423)

(cherry picked from commit 575d0b46d122292ca6e0576a91265d7abf7cbc3d)

Co-authored-by: Ofek Lev <ofekmeister@gmail.com>
5 years ago[3.8] Added missing coma after end of list in subprocess.rst (GH-17389)
Jules Lasne (jlasne) [Fri, 29 Nov 2019 04:47:45 +0000 (05:47 +0100)] 
[3.8] Added missing coma after end of list in subprocess.rst (GH-17389)

(cherry picked from commit f25875af425a3480e557aaedf49c3bb867bcbd5d)

5 years agobpo-38920: Add audit hooks for when sys.excepthook and sys.unraisablehook are invoked...
Steve Dower [Thu, 28 Nov 2019 16:46:23 +0000 (08:46 -0800)] 
bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisablehook are invoked (GH-17392)

Also fixes some potential segfaults in unraisable hook handling.

5 years agobpo-38928: Remove upgrade_dependencies() from venv doc (GH-17410)
Tzu-ping Chung [Thu, 28 Nov 2019 15:44:08 +0000 (23:44 +0800)] 
bpo-38928: Remove upgrade_dependencies() from venv doc (GH-17410)

5 years agobpo-38524: clarify example a bit and improve formatting (GH-17406)
Miss Islington (bot) [Thu, 28 Nov 2019 05:29:02 +0000 (21:29 -0800)] 
bpo-38524: clarify example a bit and improve formatting (GH-17406)

(cherry picked from commit 02519f75d15b063914a11351da30178ca4ceb54b)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agobpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)
Miss Islington (bot) [Thu, 28 Nov 2019 05:23:14 +0000 (21:23 -0800)] 
bpo-26730: Fix SpooledTemporaryFile data corruption (GH-17400)

SpooledTemporaryFile.rollback() might cause data corruption
when it is in text mode.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit ea9835c5d154ab6a54eed627958473b6768b28cc)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
5 years agobpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH...
Miss Islington (bot) [Wed, 27 Nov 2019 08:53:52 +0000 (00:53 -0800)] 
bpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH-17364)

(cherry picked from commit 1bddf890e595a865414645c6041733043c4081f8)

Co-authored-by: Florian Dahlitz <f2dahlitz@freenet.de>
5 years ago[3.8] bpo-38688, shutil.copytree: consume iterator and create list of entries to...
Bruno P. Kinoshita [Wed, 27 Nov 2019 04:49:37 +0000 (17:49 +1300)] 
[3.8] bpo-38688, shutil.copytree: consume iterator and create list of entries to prevent infinite recursion (GH-17397)

(cherry picked from commit 9bbcbc9f6dfe1368fe7330b117707f828e6a2c18)

Co-authored-by: Bruno P. Kinoshita <kinow@users.noreply.github.com>
5 years ago[3.8] bpo-38862: IDLE Strip Trailing Whitespace fixes end newlines (GH-17366)
Terry Jan Reedy [Wed, 27 Nov 2019 01:13:23 +0000 (20:13 -0500)] 
[3.8] bpo-38862: IDLE Strip Trailing Whitespace fixes end newlines  (GH-17366)

Extra newlines are removed at the end of non-shell files. If the file only has newlines after stripping other trailing whitespace, all are removed, as is done by patchcheck.py.
(cherry picked from commit 6bf644ec82f14cceae68278dc35bafb00875efae)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-38922: Raise code.__new__ audit event when code object replace() is called (GH...
Miss Islington (bot) [Wed, 27 Nov 2019 00:46:32 +0000 (16:46 -0800)] 
bpo-38922: Raise code.__new__ audit event when code object replace() is called (GH-17394)

(cherry picked from commit c7c01ab1e5415b772c68e15f1aba51e520010830)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38892: Improve docs for audit event (GH-17361)
Miss Islington (bot) [Tue, 26 Nov 2019 17:14:48 +0000 (09:14 -0800)] 
bpo-38892: Improve docs for audit event (GH-17361)

(cherry picked from commit e563a155be60fc0757914f87c8138f10de00bb16)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agoRemove use of deprecated `array.fromstring` method (GH-17332)
Miss Islington (bot) [Tue, 26 Nov 2019 08:38:41 +0000 (00:38 -0800)] 
Remove use of deprecated `array.fromstring` method (GH-17332)

(cherry picked from commit 386d00cc341b549800776b906bfc6b20ea40c7db)

Co-authored-by: David Coles <coles.david@gmail.com>
5 years agobpo-21063: Improve module synopsis for distutils (GH-17363)
Miss Islington (bot) [Mon, 25 Nov 2019 22:26:43 +0000 (14:26 -0800)] 
bpo-21063: Improve module synopsis for distutils (GH-17363)

(cherry picked from commit f8a6316778faff3991144c3aec4fa92d7b30a72b)

Co-authored-by: Sanchit Khurana <54467174+GeniusLearner@users.noreply.github.com>
5 years agobpo-38686: fix HTTP Digest handling in request.py (GH-17045)
Miss Islington (bot) [Fri, 22 Nov 2019 23:36:38 +0000 (15:36 -0800)] 
bpo-38686: fix HTTP Digest handling in request.py (GH-17045)

* fix HTTP Digest handling in request.py

There is a bug triggered when server replies to a request with `WWW-Authenticate: Digest` where `qop="auth,auth-int"` rather than mere `qop="auth"`. Having both `auth` and `auth-int` is legitimate according to the `qop-options` rule in §3.2.1 of [[https://www.ietf.org/rfc/rfc2617.txt|RFC 2617]]:
>      qop-options       = "qop" "=" <"> 1GH-qop-value <">
>      qop-value         = "auth" | "auth-int" | token
> **qop-options**: [...] If present, it is a quoted string **of one or more** tokens indicating the "quality of protection" values supported by the server.  The value `"auth"` indicates authentication; the value `"auth-int"` indicates authentication with integrity protection

This is description confirmed by the definition of the [//n//]`GH-`[//m//]//rule// extended-BNF pattern defined in §2.1 of [[https://www.ietf.org/rfc/rfc2616.txt|RFC 2616]] as 'a comma-separated list of //rule// with at least //n// and at most //m// items'.

When this reply is parsed by `get_authorization`, request.py only tests for identity with `'auth'`, failing to recognize it as one of the supported modes the server announced, and claims that `"qop 'auth,auth-int' is not supported"`.

* 📜🤖 Added by blurb_it.

* bpo-38686 review fix: remember why.

* fix trailing space in Lib/urllib/request.py

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit 14a89c47983f2fb9e7fdf33c769e622eefd3a14a)

Co-authored-by: PypeBros <PypeBros@users.noreply.github.com>
5 years agocloses bpo-29275: Remove Y2K reference from time module docs (GH-17321)
Miss Islington (bot) [Fri, 22 Nov 2019 17:03:50 +0000 (09:03 -0800)] 
closes bpo-29275: Remove Y2K reference from time module docs (GH-17321)

The Y2K reference is not needed as it only points out that Python's use
of C standard functions doesn't generally suffer from Y2K issues; the
point regarding conventions for conversion of 2-digit years in
:func:`strptime` is still valid.
(cherry picked from commit 42bc60ead39c7be9f6bb7329977826e962f601eb)

Co-authored-by: Callum Ward <wards.callum@gmail.com>
5 years agobpo-38804: Fix REDoS in http.cookiejar (GH-17157)
Miss Islington (bot) [Fri, 22 Nov 2019 14:42:06 +0000 (06:42 -0800)] 
bpo-38804: Fix REDoS in http.cookiejar (GH-17157)

The regex http.cookiejar.LOOSE_HTTP_DATE_RE was vulnerable to regular
expression denial of service (REDoS).

LOOSE_HTTP_DATE_RE.match is called when using http.cookiejar.CookieJar
to parse Set-Cookie headers returned by a server.
Processing a response from a malicious HTTP server can lead to extreme
CPU usage and execution will be blocked for a long time.

The regex contained multiple overlapping \s* capture groups.
Ignoring the ?-optional capture groups the regex could be simplified to

    \d+-\w+-\d+(\s*\s*\s*)$

Therefore, a long sequence of spaces can trigger bad performance.

Matching a malicious string such as

    LOOSE_HTTP_DATE_RE.match("1-c-1" + (" " * 2000) + "!")

caused catastrophic backtracking.

The fix removes ambiguity about which \s* should match a particular
space.

You can create a malicious server which responds with Set-Cookie headers
to attack all python programs which access it e.g.

    from http.server import BaseHTTPRequestHandler, HTTPServer

    def make_set_cookie_value(n_spaces):
        spaces = " " * n_spaces
        expiry = f"1-c-1{spaces}!"
        return f"b;Expires={expiry}"

    class Handler(BaseHTTPRequestHandler):
        def do_GET(self):
            self.log_request(204)
            self.send_response_only(204)  GH- Don't bother sending Server and Date
            n_spaces = (
                int(self.path[1:])  GH- Can GET e.g. /100 to test shorter sequences
                if len(self.path) > 1 else
                65506  GH- Max header line length 65536
            )
            value = make_set_cookie_value(n_spaces)
            for i in range(99):  GH- Not necessary, but we can have up to 100 header lines
                self.send_header("Set-Cookie", value)
            self.end_headers()

    if __name__ == "__main__":
        HTTPServer(("", 44020), Handler).serve_forever()

This server returns 99 Set-Cookie headers. Each has 65506 spaces.
Extracting the cookies will pretty much never complete.

Vulnerable client using the example at the bottom of
https://docs.python.org/3/library/http.cookiejar.html :

    import http.cookiejar, urllib.request
    cj = http.cookiejar.CookieJar()
    opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
    r = opener.open("http://localhost:44020/")

The popular requests library was also vulnerable without any additional
options (as it uses http.cookiejar by default):

    import requests
    requests.get("http://localhost:44020/")

* Regression test for http.cookiejar REDoS

If we regress, this test will take a very long time.

* Improve performance of http.cookiejar.ISO_DATE_RE

A string like

"444444" + (" " * 2000) + "A"

could cause poor performance due to the 2 overlapping \s* groups,
although this is not as serious as the REDoS in LOOSE_HTTP_DATE_RE was.
(cherry picked from commit 1b779bfb8593739b11cbb988ef82a883ec9d077e)

Co-authored-by: bcaller <bcaller@users.noreply.github.com>
5 years agobpo-22367: Update test_fcntl.py for spawn process mode (GH-17154) (GH-17252)
Miss Islington (bot) [Fri, 22 Nov 2019 14:15:36 +0000 (06:15 -0800)] 
bpo-22367: Update test_fcntl.py for spawn process mode (GH-17154) (GH-17252)

(cherry picked from commit 9960230f76eb555d6dfbe8a324efed35610c85f9)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
5 years agobpo-36854: Fix reference counter in PyInit__testcapi() (GH-17338)
Victor Stinner [Fri, 22 Nov 2019 12:39:36 +0000 (13:39 +0100)] 
bpo-36854: Fix reference counter in PyInit__testcapi() (GH-17338)

Increment properly Py_True/Py_False reference counter for
_testcapi.WITH_PYMALLOC variable.

5 years agobpo-38526: Fix zipfile.Path method name to be the correct one (GH-17317)
Miss Islington (bot) [Thu, 21 Nov 2019 21:41:20 +0000 (13:41 -0800)] 
bpo-38526: Fix zipfile.Path method name to be the correct one (GH-17317)

(cherry picked from commit 65444cf7fe84d8ca1f9b51c7f5992210751e08bb)

Co-authored-by: Claudiu Popa <pcmanticore@gmail.com>
5 years ago[3.8] bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] ...
Lisa Roach [Thu, 21 Nov 2019 18:14:32 +0000 (10:14 -0800)] 
[3.8] bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] (GH-17269) (#17304)

(cherry picked from commit 046442d02bcc6e848e71e93e47f6cde9e279e993)

Co-authored-by: Jason Fried <fried@fb.com>
5 years agobpo-37838: get_type_hints for wrapped functions with forward reference (GH-17126)
Miss Islington (bot) [Thu, 21 Nov 2019 17:43:42 +0000 (09:43 -0800)] 
bpo-37838: get_type_hints for wrapped functions with forward reference (GH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3a1e68b4ca2d334ab5255dfc267719096e)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
5 years agobpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)
Miss Islington (bot) [Thu, 21 Nov 2019 12:11:44 +0000 (04:11 -0800)] 
bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)

test_capi: trashcan tests now require the test "cpu" resource.
(cherry picked from commit 0127bb1c5c3286f87e284ff6083133bfdcfd5a4f)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 years agoUpdate functions.rst (GH-16468)
Miss Islington (bot) [Thu, 21 Nov 2019 02:17:51 +0000 (18:17 -0800)] 
Update functions.rst (GH-16468)

This PR will make the following changes to the [_Built-in Functions_](https://docs.python.org/3/library/functions.html) chapter of the library documentation:

- improve hyperlinks in Sphinx roles (trailing 's' belong to hyperlinks).

Automerge-Triggered-By: @csabella
(cherry picked from commit d67279147ace3b63187e5d75a15c345264f39e85)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
5 years agobpo-36277: Add document for pdb debug and retval commands (GH-12872)
Miss Islington (bot) [Thu, 21 Nov 2019 01:56:26 +0000 (17:56 -0800)] 
bpo-36277: Add document for pdb debug and retval commands (GH-12872)

https://bugs.python.org/issue36277

Automerge-Triggered-By: @csabella
(cherry picked from commit 9391f6c3ef24f7962c534c42ccb792debdbef509)

Co-authored-by: Dave Nguyen <dv@dvnguyen.com>
5 years agoRemoved capital letter in parameter in stdtypes.rst (GH-17218)
Miss Islington (bot) [Thu, 21 Nov 2019 01:36:46 +0000 (17:36 -0800)] 
Removed capital letter in parameter in stdtypes.rst (GH-17218)

Automerge-Triggered-By: @csabella
(cherry picked from commit 6db2fb7c300ca79d5585f2ae524ff4ca2707a7b6)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
5 years agoFixed an incorrect sentence in the docs (GH-17205)
Miss Islington (bot) [Thu, 21 Nov 2019 01:26:30 +0000 (17:26 -0800)] 
Fixed an incorrect sentence in the docs (GH-17205)

Fixed an incorrect sentence in Doc/c-api/mapping.rst I fell on
while translating the file.

skip issue

Automerge-Triggered-By: @csabella
(cherry picked from commit 06ca2a2be9374ac390e9407685ccce941ab9ffa2)

Co-authored-by: Aveheuzed <a.masson555@ntymail.com>
5 years agobpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix (GH-17294)
Miss Islington (bot) [Wed, 20 Nov 2019 20:20:25 +0000 (12:20 -0800)] 
bpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix (GH-17294)

on platforms lacking a functional bind() for named unix domain sockets

https://bugs.python.org/issue38841

Automerge-Triggered-By: @asvetlov
(cherry picked from commit 559bad1a70ed50cc9caa7cb303b6ac1fe6a34af3)

Co-authored-by: xdegaye <xdegaye@gmail.com>
5 years agobpo-38821: Fix crash in argparse when using gettext (GH-17192)
Miss Islington (bot) [Wed, 20 Nov 2019 13:48:25 +0000 (05:48 -0800)] 
bpo-38821: Fix crash in argparse when using gettext (GH-17192)

(cherry picked from commit be5c79e0338005d675a64ba6e5b137e850d556d1)

Co-authored-by: Federico Bond <federicobond@gmail.com>
5 years agobpo-38823: Fix refleak in _tracemalloc init error handling (GH-17235)
Miss Islington (bot) [Wed, 20 Nov 2019 10:26:48 +0000 (02:26 -0800)] 
bpo-38823: Fix refleak in _tracemalloc init error handling (GH-17235)

(cherry picked from commit d51a363a4379385fdfe9c09a56324631465ede29)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-38823: Fix refleak in marshal init error path (GH-17260)
Miss Islington (bot) [Wed, 20 Nov 2019 10:16:02 +0000 (02:16 -0800)] 
bpo-38823: Fix refleak in marshal init error path (GH-17260)

(cherry picked from commit 33b671e72450bf4b5a946ce0dde6b7fe21150108)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)
Miss Islington (bot) [Wed, 20 Nov 2019 06:37:47 +0000 (22:37 -0800)] 
bpo-38636: Fix IDLE tab toggle and file indent width (GH-17008)

These Format menu functions (default shortcuts Alt-T and Alt-U)
were mistakenly disabled in 3.7.5 and 3.8.0.
(cherry picked from commit b8462477bfd01ff21461065d5063e6b0238ca809)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 years agobpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)
Miss Islington (bot) [Tue, 19 Nov 2019 23:31:08 +0000 (15:31 -0800)] 
bpo-38823: Fix refleaks in faulthandler init error path on Windows (GH-17250)

(cherry picked from commit ac2235432c607ce2c0faf6dff5d9b2534d2f6652)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)
Miss Islington (bot) [Tue, 19 Nov 2019 20:11:20 +0000 (12:11 -0800)] 
bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)

This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`.

In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own).

This change forces the Process object to update its `native_id` attribute during the bootstrap process.

cc @vstinner

https://bugs.python.org/issue38707

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

Co-authored-by: Jake Tesler <jake.tesler@gmail.com>
5 years agobpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)
Miss Islington (bot) [Tue, 19 Nov 2019 14:12:06 +0000 (06:12 -0800)] 
bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)

Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator.

https://bugs.python.org/issue35409
(cherry picked from commit 8e0de2a4808d7c2f4adedabff89ee64e0338790a)

Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
5 years agoAdd missing comma and period in unittest docs (GH-17211)
Miss Islington (bot) [Tue, 19 Nov 2019 12:12:58 +0000 (04:12 -0800)] 
Add missing comma and period in unittest docs (GH-17211)

Automerge-Triggered-By: @csabella
(cherry picked from commit b1f160a236cb590b1c1a678ca5fc19d5c75dcd83)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
5 years agobpo-38807: Add os.PathLike to exception message raised by _check_arg_types (GH-17160...
Miss Islington (bot) [Tue, 19 Nov 2019 06:46:10 +0000 (22:46 -0800)] 
bpo-38807: Add os.PathLike to exception message raised by _check_arg_types (GH-17160) (GH-17249)

(cherry picked from commit fe75b62575bcfdf1c39be71c1e50257832a596db)

Co-authored-by: Tomás Farías <tomasfariassantana@gmail.com>
5 years agobpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument...
Miss Islington (bot) [Mon, 18 Nov 2019 21:59:51 +0000 (13:59 -0800)] 
bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument (GH-17243)

(cherry picked from commit dcf1f83de8678b09df5bd7d04ca5f4ef1cd02aca)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38722: Runpy use io.open_code() (GH-17234)
Miss Islington (bot) [Mon, 18 Nov 2019 21:58:02 +0000 (13:58 -0800)] 
bpo-38722: Runpy use io.open_code() (GH-17234)

https://bugs.python.org/issue38722

Automerge-Triggered-By: @taleinat
(cherry picked from commit e243bae9999418859106328d9fce71815b7eb2fe)

Co-authored-by: jsnklln <jsnklln@gmail.com>
5 years agobpo-38622: Add missing audit events for ctypes module (GH-17158)
Miss Islington (bot) [Mon, 18 Nov 2019 19:53:34 +0000 (11:53 -0800)] 
bpo-38622: Add missing audit events for ctypes module (GH-17158)

(cherry picked from commit 00923c63995e34cdc25d699478f113de99a69df9)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)
Miss Islington (bot) [Mon, 18 Nov 2019 17:53:21 +0000 (09:53 -0800)] 
bpo-38809: Windows build scripts use python.exe from virtual envs (GH-17164)

https://bugs.python.org/issue38809
(cherry picked from commit ee703cbb418b7458bebb1d26a5e19d6b55280b28)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
5 years agoCorrect the description of the 3.7 change in urllib.parse.quote (GH-17065)
Miss Islington (bot) [Mon, 18 Nov 2019 15:42:13 +0000 (07:42 -0800)] 
Correct the description of the 3.7 change in urllib.parse.quote (GH-17065)

`~` is now treated as an unreserved character (i.e. it doesn't get quoted), not a reserved one.
(cherry picked from commit f49f6baa6bf7916ac039194c24b59d2eff5b180a)

Co-authored-by: Роман Донченко <dpb@corrigendum.ru>
5 years agobpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)
Miss Islington (bot) [Mon, 18 Nov 2019 15:10:31 +0000 (07:10 -0800)] 
bpo-38823: Clean up refleaks in _tkinter initialization. (GH-17206)

https://bugs.python.org/issue38823
(cherry picked from commit 289cf0fbf78c4f38c38ac71ac8b772be7ec2672f)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-16576: Add checks for bitfields passed by value to functions. (GH-17097) (GH...
Miss Islington (bot) [Mon, 18 Nov 2019 14:29:15 +0000 (06:29 -0800)] 
bpo-16576: Add checks for bitfields passed by value to functions. (GH-17097) (GH-17223)

(cherry picked from commit 106271568c58cfebae58f0c52b640dbe716ba2ce)

5 years ago[3.8] bpo-38830: Correct slot signature in Qt example. (GH-17220) (GH-17221)
Vinay Sajip [Mon, 18 Nov 2019 12:23:46 +0000 (12:23 +0000)] 
[3.8] bpo-38830: Correct slot signature in Qt example. (GH-17220) (GH-17221)

(cherry picked from commit 5383956583bb758f3828513bcdd011871f24a0e8)

5 years agobpo-38678: Improve argparse example in tutorial (GH-17207) (GH-17212)
Miss Islington (bot) [Mon, 18 Nov 2019 06:17:14 +0000 (22:17 -0800)] 
bpo-38678: Improve argparse example in tutorial (GH-17207) (GH-17212)

(cherry picked from commit 04c79d6088a22d467f04dbe438050c26de22fa85)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
5 years agobpo-25866: Minor cleanups to "sequence" in docs (GH-17177) (GH-17208)
Miss Islington (bot) [Sun, 17 Nov 2019 22:13:33 +0000 (14:13 -0800)] 
bpo-25866: Minor cleanups to "sequence" in docs (GH-17177) (GH-17208)

(cherry picked from commit 4544e78ec4558b75bf95e5b7dfc1b5bbb07ae5f0)

Co-authored-by: alclarks <57201106+alclarks@users.noreply.github.com>
5 years agobpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)
Miss Islington (bot) [Sun, 17 Nov 2019 00:16:33 +0000 (16:16 -0800)] 
bpo-38823: Clean up refleaks in _contextvars initialization. (GH-17198)

https://bugs.python.org/issue38823
(cherry picked from commit 143a97f64128070386b12a0ee589bdaad5e51f40)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agobpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)
Miss Islington (bot) [Sat, 16 Nov 2019 22:44:15 +0000 (14:44 -0800)] 
bpo-38823: Clean up refleaks in _asyncio initialization. (GH-17195)

https://bugs.python.org/issue38823
(cherry picked from commit c3f6bdc332d23588102eba749a5929dd5bb67c9d)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
5 years agoFix typo in Lib/socketserver.py (GH-17024)
Miss Islington (bot) [Sat, 16 Nov 2019 18:35:08 +0000 (10:35 -0800)] 
Fix typo in Lib/socketserver.py (GH-17024)

changed 'This is bad class design, but save some typing'
into 'This is bad class design, but saves some typing'.
(cherry picked from commit d0acdfcf345b44b01e59f3623dcdab6279de686a)

Co-authored-by: Jason (Perry) Taylor <jtaylor@seek.com.au>
5 years agobpo-38453: Ensure correct short path is obtained for test (GH-17184)
Miss Islington (bot) [Sat, 16 Nov 2019 00:21:27 +0000 (16:21 -0800)] 
bpo-38453: Ensure correct short path is obtained for test (GH-17184)

(cherry picked from commit 7c6130c8c36c941255365e5414c956fc919b8629)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 years agobpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)
Steve Dower [Fri, 15 Nov 2019 23:25:03 +0000 (15:25 -0800)] 
bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)

Ensure isabs() is always True for \\?\ prefixed paths
Avoid unnecessary usage of readlink() to avoid resolving broken links incorrectly
Ensure shutil tests run in test directory

5 years agoUpdated missing periods in cmdline.rst (GH-17173)
Miss Islington (bot) [Fri, 15 Nov 2019 22:25:18 +0000 (14:25 -0800)] 
Updated missing periods in cmdline.rst (GH-17173)

(cherry picked from commit 0fe0b88d6eb597c9a929e14ad47a5a9bd99bfe53)

Co-authored-by: Jules Lasne (jlasne) <jules.lasne@gmail.com>
5 years agoFix the description of isdatadescriptor in inspect.rst (GH-16645)
Miss Islington (bot) [Fri, 15 Nov 2019 21:54:33 +0000 (13:54 -0800)] 
Fix the description of isdatadescriptor in inspect.rst (GH-16645)

(cherry picked from commit 84f2528d4836f9e8f80f8354cb26341ef7ef0a1b)

Co-authored-by: HongWeipeng <961365124@qq.com>