]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years ago[3.10] bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs...
Charlie Zhao [Sat, 12 Mar 2022 01:03:52 +0000 (09:03 +0800)] 
[3.10] bpo-46677: Add examples of inheritance and attributes to `TypedDict` docs (GH-31349) (GH-31815)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 8a207e0321db75f3342692905e342f1d5e1add54)

Co-authored-by: Charlie Zhao <68189100+CharlieZhao95@users.noreply.github.com>
3 years agobpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789) (GH-31830)
Victor Stinner [Fri, 11 Mar 2022 23:04:14 +0000 (00:04 +0100)] 
bpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789) (GH-31830)

In Linux kernel 5.14 one can dynamically request size of altstacksize
based on hardware capabilities with getauxval(AT_MINSIGSTKSZ).

This changes allows for Python extension's request to Linux kernel
to use AMX_TILE instruction set on Sapphire Rapids Xeon processor
to succeed, unblocking use of the ISA in frameworks.

Introduced HAVE_LINUX_AUXVEC_H in configure.ac and pyconfig.h.in
Used cpython_autoconf:269 docker container to generate configure.

(cherry picked from commit 3b128c054885fe881c3b57a5978de3ea89c81a9c)

Co-authored-by: Oleksandr Pavlyk <oleksandr.pavlyk@intel.com>
3 years agobpo-31327: Update time documentation to reflect possible errors (GH-31460)
Miss Islington (bot) [Fri, 11 Mar 2022 19:29:48 +0000 (11:29 -0800)] 
bpo-31327: Update time documentation to reflect possible errors (GH-31460)

As per the comments, this mirrors the [datetime documentation](https://docs.python.org/3/library/datetime.htmlGH-datetime.datetime.fromtimestamp).

```
>>> import time
>>> time.localtime(999999999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t
>>> time.localtime(-3600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
```
(cherry picked from commit c83fc9c02c9846ec3a2d0123999c98e02f00b3f5)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with (GH-31061) ...
Matt Bogosian [Fri, 11 Mar 2022 14:57:52 +0000 (08:57 -0600)] 
[3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with (GH-31061) (GH-31821)

(Cherry-picked from 32bf3597922ac3f613989582afa2bff43bea8a2f.)

GH-26091 added the _typevar_types and _paramspec_tvars instance
variables to _GenericAlias. However, they were not propagated
consistently. This commit addresses the most prominent deficiency
identified in bpo-46581 (namely their absence from
_GenericAlias.copy_with), but there could be others.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31796)
Jelle Zijlstra [Thu, 10 Mar 2022 21:53:50 +0000 (13:53 -0800)] 
[3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) (GH-31796)

(cherry picked from commit 6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agoRemove print race from task_done example. (GH-31795)
Miss Islington (bot) [Thu, 10 Mar 2022 17:22:46 +0000 (09:22 -0800)] 
Remove print race from task_done example. (GH-31795)

(cherry picked from commit a0eb69c1a2e3aee75cb48e9868ef06a531b94a70)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
3 years ago[3.10] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31777)
Jelle Zijlstra [Wed, 9 Mar 2022 18:19:27 +0000 (10:19 -0800)] 
[3.10] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31777)

Replace two instances of "pysqlite" with "sqlite3" in sqlite3
docstrings. Also reword "is a no-op" to "does nothing" for clarity..
(cherry picked from commit b33a1ae703338e09dc0af5fbfd8ffa01d3ff75da)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years agobpo-24959: fix unittest.assertRaises bug where traceback entries are dropped from...
Miss Islington (bot) [Tue, 8 Mar 2022 22:09:28 +0000 (14:09 -0800)] 
bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped from chained exceptions (GH-23688)

(cherry picked from commit 88b7d86a73da9388aa65c96401c2984c8c16f8db)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years agobpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)
Miss Islington (bot) [Tue, 8 Mar 2022 21:36:35 +0000 (13:36 -0800)] 
bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)

This change aligns the documentation at https://docs.python.org/3/library/asyncio-eventloop.htmlGH-asyncio.Server
with the actual implementation

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit da80d6b2f3beff519cb1457d5e055168c89f7224)

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
3 years agobpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)
Miss Islington (bot) [Tue, 8 Mar 2022 18:53:24 +0000 (10:53 -0800)] 
bpo-23325: Fix SIG_IGN and SIG_DFL int comparison in signal module (GH-31759)

(cherry picked from commit c8a47e76a391c8818bf10a282cdcd3bb5c23ebf6)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agoRemoved confusing reference to sys (GH-31638)
Miss Islington (bot) [Tue, 8 Mar 2022 16:04:56 +0000 (08:04 -0800)] 
Removed confusing reference to sys (GH-31638)

(cherry picked from commit 28f84c72b6cee145f9c00e9b999656e9a2517e49)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years ago[3.10] docs: Don't use code formatting for emphasis (GH-30519) (GH-31764)
Jelle Zijlstra [Tue, 8 Mar 2022 15:42:54 +0000 (07:42 -0800)] 
[3.10] docs: Don't use code formatting for emphasis (GH-30519) (GH-31764)

(cherry picked from commit badb637c8ce91625122d5f4d71276bfe1a8ed5e9)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
3 years ago[3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) (GH-31753)
Erlend Egeberg Aasland [Tue, 8 Mar 2022 15:30:14 +0000 (16:30 +0100)] 
[3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) (GH-31753)

(cherry picked from commit 4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb)

3 years agobpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)
Miss Islington (bot) [Tue, 8 Mar 2022 10:03:12 +0000 (02:03 -0800)] 
bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)

Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
(cherry picked from commit 36dd7396fcd26d8bf9919d536d05d7000becbe5b)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
3 years agoRemoved ambiguity in __init_subclass__ docs (GH-31540)
Miss Islington (bot) [Tue, 8 Mar 2022 04:33:19 +0000 (20:33 -0800)] 
Removed ambiguity in __init_subclass__ docs (GH-31540)

(cherry picked from commit ab014978aef303ac60465c9010505d798dc34df8)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years agobpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
Miss Islington (bot) [Tue, 8 Mar 2022 04:25:30 +0000 (20:25 -0800)] 
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)

(cherry picked from commit 8debeed3075bf4d7e568e65da16bec63cf276f4f)

Co-authored-by: Meer Suri <46469858+meersuri@users.noreply.github.com>
3 years agoimportlib.metadata: Remove empty footnote section (GH-30451)
Miss Islington (bot) [Tue, 8 Mar 2022 04:21:32 +0000 (20:21 -0800)] 
importlib.metadata: Remove empty footnote section (GH-30451)

(cherry picked from commit 13331a12c3c4d5007e2ab61514ba1d76cedd8b84)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
3 years agobpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479)
Miss Islington (bot) [Tue, 8 Mar 2022 04:12:59 +0000 (20:12 -0800)] 
bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects (GH-29479)

(cherry picked from commit 50731297a9b6d57eec3b3f89522785b23f7b3e71)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agobpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
Miss Islington (bot) [Mon, 7 Mar 2022 22:17:29 +0000 (14:17 -0800)] 
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)

(cherry picked from commit 176835c3d5c70f4c1b152cc2062b549144e37094)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agobpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 and...
Steve Dower [Mon, 7 Mar 2022 19:15:04 +0000 (19:15 +0000)] 
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 and CVE-2019-12900 (GH-31732)

3 years agobpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the...
Steve Dower [Mon, 7 Mar 2022 17:23:20 +0000 (17:23 +0000)] 
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses the install path during repair (GH-31727)

3 years ago[3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719)
Luca Chiodini [Mon, 7 Mar 2022 14:54:08 +0000 (15:54 +0100)] 
[3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719)

(cherry picked from commit 7f07b5ee9c2d17f837c44440bf066c73f92dac14)

Co-authored-by: Luca Chiodini <luca@chiodini.org>
3 years ago[3.10] bpo-46940: Don't override existing AttributeError suggestion information ...
Pablo Galindo Salgado [Mon, 7 Mar 2022 13:18:36 +0000 (13:18 +0000)] 
[3.10] bpo-46940: Don't override existing AttributeError suggestion information (GH-31710) (GH-31724)

When an exception is created in a nested call to PyObject_GetAttr, any
external calls will override the context information of the
AttributeError that we have already placed in the most internal call.
This will cause the suggestions we create to nor work properly as the
attribute name and object that we will be using are the incorrect ones.

To avoid this, we need to check first if these attributes are already
set and bail out if that's the case..
(cherry picked from commit 3b3be05a164da43f201e35b6dafbc840993a4d18)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)
Miss Islington (bot) [Mon, 7 Mar 2022 10:31:52 +0000 (02:31 -0800)] 
bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 496c428de3318c9c5770937491b71dc3d3f18a6a)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
3 years agobpo-14156: Make argparse.FileType work correctly for binary file modes when argument...
Miss Islington (bot) [Sun, 6 Mar 2022 12:12:06 +0000 (04:12 -0800)] 
bpo-14156: Make argparse.FileType work correctly for binary file modes when argument is '-' (GH-13165)

Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-'
(so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb').
(cherry picked from commit eafec26ae5327bb23b6dace2650b074c3327dfa0)

Co-authored-by: MojoVampire <shadowranger+github@gmail.com>
3 years agoLib/typing.py copy edits originating from GH-31061 (GH-31684)
Miss Islington (bot) [Sat, 5 Mar 2022 03:17:32 +0000 (19:17 -0800)] 
Lib/typing.py copy edits originating from GH-31061 (GH-31684)

(cherry picked from commit 2031149b9a7dfab5f5bad63f417e19f4fc2b9661)

Co-authored-by: Matt Bogosian <eb3f73+github+com@yaymail.com>
3 years agobpo-38738: Fix formatting of True and False in the threading documentation (GH-31678)
Miss Islington (bot) [Fri, 4 Mar 2022 20:37:56 +0000 (12:37 -0800)] 
bpo-38738: Fix formatting of True and False in the threading documentation (GH-31678)

* Fix formatting of True and False in the threading documentation
* Update threading.rst
(cherry picked from commit 46a116c1c9f6b60a3d35ab9a419f8eee5de2542e)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years agobpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)
Miss Islington (bot) [Fri, 4 Mar 2022 18:33:57 +0000 (10:33 -0800)] 
bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)

(cherry picked from commit cedd2473a9bebe07f3ced4f341cf58a2fef07b03)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675)
Victor Stinner [Fri, 4 Mar 2022 00:12:06 +0000 (01:12 +0100)] 
[3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan (GH-31675)

* bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662)

Disable undefined behavior sanitizer (UBSAN) on
faulthandler_sigfpe().

(cherry picked from commit 4173d677a1d7c72bb32d292fbff1b4cf073d615c)

* bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672)

Disable undefined behavior sanitizer (UBSan) on
faulthandler._read_null().

(cherry picked from commit 65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549)

* bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673)

If Python is built with UBSan, test_hashlib skips tests on the _sha3
extension which currently has undefined behaviors.

This change allows to run test_hashlib to check for new UBSan regression,
but the known _sha3 undefined behavior must be fixed.

(cherry picked from commit 6d0d7d2b8c1e04fd51c6cb29cc09a41b60b97b7b)

* bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674)

If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.

(cherry picked from commit ad1b04451d3aca2c6fa6dbe2891676a4e0baac49)

3 years agobpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter (GH...
Miss Islington (bot) [Thu, 3 Mar 2022 14:49:22 +0000 (06:49 -0800)] 
bpo-6634: [doc] clarify that sys.exit() does not always exit the interpreter (GH-31639)

(cherry picked from commit 10117f1d8cb49ce95493555c06050faf636ccee7)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
3 years agobpo-46831: Update __build_class__ comment (GH-31522)
Miss Islington (bot) [Thu, 3 Mar 2022 06:02:59 +0000 (22:02 -0800)] 
bpo-46831: Update __build_class__ comment (GH-31522)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 81d968b7c30d5b41f3f28b297b7ee5345d569509)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agobpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)
Miss Islington (bot) [Thu, 3 Mar 2022 02:26:50 +0000 (18:26 -0800)] 
bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)

(cherry picked from commit 75d2d945b4e28ca34506b2d4902367b61a8dff82)

Co-authored-by: Gregory Beauregard <greg@greg.red>
3 years agobpo-21910: Clarify docs for codecs writelines method (GH-31245)
Miss Islington (bot) [Thu, 3 Mar 2022 01:43:00 +0000 (17:43 -0800)] 
bpo-21910: Clarify docs for codecs writelines method (GH-31245)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a8c87a239ee1414d6dd0b062fe9ec3e5b0c50cb8)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] bpo-45492: Corrected documentation for co_names in inspect library doc (GH...
Irit Katriel [Wed, 2 Mar 2022 19:37:17 +0000 (19:37 +0000)] 
[3.10] bpo-45492: Corrected documentation for co_names in inspect library doc (GH-31456). (GH-31645)

(cherry picked from commit 3257d49d236e5f3453fe9d2fd8338bcdfe9756b7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632) (GH-31634)
Victor Stinner [Wed, 2 Mar 2022 16:05:14 +0000 (17:05 +0100)] 
[3.10] bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632) (GH-31634)

* Refactor sanitiser skip tests into test.support (GH-30889)

* Refactor sanitizer skip tests into test.support

(cherry picked from commit b1cb8430504931f7854eac5d32cba74770078a4e)

* Add skips to crashing tests under sanitizers instead of manually skipping them (GH-30897)

(cherry picked from commit a27505345e34d462139f5f8b6b5e7c9a59955150)

* bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632)

Skip tests on ASAN and/or MSAN builds:

* multiprocessing tests
* test___all__
* test_concurrent_futures
* test_decimal
* test_peg_generator
* test_tools

(cherry picked from commit 9204bb72a2da5885facc747e63d2bd2d654606fe)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-42982: update pbkdf2 example & add another link (GH-30966) (#30968)
Miss Islington (bot) [Tue, 1 Mar 2022 20:56:25 +0000 (12:56 -0800)] 
bpo-42982: update pbkdf2 example & add another link (GH-30966) (#30968)

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit ace0aa2a2793ba4a2b03e56c4ec375c5470edee8)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agoAdd missing "to" to two tp_flags notes (GH-31624)
Miss Islington (bot) [Tue, 1 Mar 2022 01:45:26 +0000 (17:45 -0800)] 
Add missing "to" to two tp_flags notes (GH-31624)

(cherry picked from commit 422fdb37172c145043d4f1276adad43ff375f0d5)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
3 years agobpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)
Miss Islington (bot) [Fri, 25 Feb 2022 17:03:37 +0000 (09:03 -0800)] 
bpo-26897: Clarify Popen stdin, stdout, stderr file object docs (GH-30231)

(cherry picked from commit dd69f734218ac5d3a551227069ac53ee09b0cd3e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoUpdate dict/OrderedDict differences with code equivalents. (GH-31563)
Miss Islington (bot) [Fri, 25 Feb 2022 15:15:58 +0000 (07:15 -0800)] 
Update dict/OrderedDict differences with code equivalents. (GH-31563)

(cherry picked from commit 26aba295a9c1bcb0812fe44bd7e68ddd1d8a6828)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
3 years agobpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) (GH...
Victor Stinner [Fri, 25 Feb 2022 14:47:07 +0000 (15:47 +0100)] 
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) (GH-31578)

Rename the private undocumented float.__set_format__() method to
float.__setformat__() to fix a typo introduced in Python 3.7. The
method is only used by test_float.

The change enables again test_float tests on the float format which
were previously skipped because of the typo.

The typo was introduced in Python 3.7 by bpo-20185
in commit b5c51d3dd95bbfde533655fb86ac0f96f771ba7b.

(cherry picked from commit 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6)

3 years agobpo-46756: Fix authorization check in urllib.request (GH-31353)
Miss Islington (bot) [Fri, 25 Feb 2022 11:57:30 +0000 (03:57 -0800)] 
bpo-46756: Fix authorization check in urllib.request (GH-31353)

Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which
allowed to bypass authorization. For example, access to URI "example.org/foobar"
was allowed if the user was authorized for URI "example.org/foo".
(cherry picked from commit e2e72567a1c94c548868f6ee5329363e6036057a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547)
Miss Islington (bot) [Fri, 25 Feb 2022 11:30:31 +0000 (03:30 -0800)] 
bpo-34429: Noted TemporaryFile behavior on non-Posix/non-Cygwin systems (GH-31547)

(cherry picked from commit 53ecf9e08d35801807daf74492c090a325f995b7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agobpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)
Miss Islington (bot) [Fri, 25 Feb 2022 08:49:55 +0000 (00:49 -0800)] 
bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)

(cherry picked from commit 98c3bea4d1c7335135e60946d0ec8cd5031fb6c0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)
Miss Islington (bot) [Wed, 23 Feb 2022 19:12:51 +0000 (11:12 -0800)] 
bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535)

Fix PyFrame_GetBack() and PyFrame_GetCode() return type in
the documentation.
(cherry picked from commit 78859e58e4e016286e648d1dc155e0f6cebfa6ff)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agoInherit asyncio proactor datagram transport from asyncio.DatagramTransport (GH-31512...
Miss Islington (bot) [Wed, 23 Feb 2022 12:04:49 +0000 (04:04 -0800)] 
Inherit asyncio proactor datagram transport from asyncio.DatagramTransport (GH-31512) (GH-31514)

(cherry picked from commit cff4d5c5d29528299ec1ac5b3b3a6f7735577c01)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agoMinor fixes to C API docs (GH-31501)
Miss Islington (bot) [Wed, 23 Feb 2022 04:57:02 +0000 (20:57 -0800)] 
Minor fixes to C API docs (GH-31501)

* C API docs: move PyErr_SetImportErrorSubclass docs

It was in the section about warnings, but it makes more sense to
put it with PyErr_SetImportError.

* C API docs: document closeit argument to PyRun_AnyFileExFlags

It was already documented for PyRun_SimpleFileExFlags.

* textual fixes to unicode docs

* Move paragraph about tp_dealloc into tp_dealloc section

* __aiter__ returns an async iterator, not an awaitable
(cherry picked from commit 43cf44ddcce6b225f959ea2a53e4817244ca6054)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487)
Miss Islington (bot) [Wed, 23 Feb 2022 02:50:38 +0000 (18:50 -0800)] 
bpo-46794: Bump up the libexpat version into 2.4.6 (GH-31487)

(cherry picked from commit 1935e1cc284942bec8006287c939e295e1a7bf13)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agobpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)
Miss Islington (bot) [Tue, 22 Feb 2022 21:09:35 +0000 (13:09 -0800)] 
bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
3 years ago[3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name' and .SECTCRE...
Miss Islington (bot) [Tue, 22 Feb 2022 18:28:34 +0000 (10:28 -0800)] 
[3.10] bpo-20923 : [doc] Explain ConfigParser 'valid section name'  and .SECTCRE (GH-31413) (GH-31506)

(cherry picked from commit bba8008f99d615a02984422a3825082bb5621f5a)

Co-authored-by: vidhya <96202776+Vidhyavinu@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
3 years ago[3.10] bpo-36557: Updated wording for using/windows (GH-31457) (GH-31504)
Miss Islington (bot) [Tue, 22 Feb 2022 17:57:01 +0000 (09:57 -0800)] 
[3.10] bpo-36557: Updated wording for using/windows (GH-31457) (GH-31504)

(cherry picked from commit 9a0d941df4c3e1efb8b3017cd2c2de17e582fd5c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Automerge-Triggered-By: GH:iritkatriel
3 years agobpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" (GH-31479...
Miss Islington (bot) [Tue, 22 Feb 2022 10:00:50 +0000 (02:00 -0800)] 
bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" (GH-31479) (GH-31493)

Fix parsing a numeric literal immediately (without spaces) followed by
"not in" keywords, like in "1not in x". Now the parser only emits
a warning, not a syntax error.
(cherry picked from commit 090e5c4b946b28f50fce445916c5d3ec45c8f45f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31473) 31485/head
Miss Islington (bot) [Mon, 21 Feb 2022 17:18:48 +0000 (09:18 -0800)] 
[3.10] bpo-46732: fix __bool__ docstring (GH-31301) (GH-31473)

(cherry picked from commit 0a222db2bca63070f429c0e613707da1bdfaf0e0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agobpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)
Miss Islington (bot) [Mon, 21 Feb 2022 16:16:09 +0000 (08:16 -0800)] 
bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)

Curly brackets were never allowed in namespace URIs
according to RFC 3986, and so-called namespace-validating
XML parsers have the right to reject them a invalid URIs.

libexpat >=2.4.5 has become strcter in that regard due to
related security issues; with ET.XML instantiating a
namespace-aware parser under the hood, this test has no
future in CPython.

References:
- https://datatracker.ietf.org/doc/html/rfc3968
- https://www.w3.org/TR/xml-names/

Also, test_minidom.py: Support Expat >=2.4.5
(cherry picked from commit 2cae93832f46b245847bdc252456ddf7742ef45e)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
3 years agobpo-46232: Fix parsing of certs with bit string in DN (GH-30351)
Miss Islington (bot) [Mon, 21 Feb 2022 09:37:26 +0000 (01:37 -0800)] 
bpo-46232: Fix parsing of certs with bit string in DN (GH-30351)

(cherry picked from commit be095f6c32188bba02079d086ac8639ea37cec3c)

Co-authored-by: Christian Heimes <christian@python.org>
3 years agobpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)
Miss Islington (bot) [Mon, 21 Feb 2022 08:07:46 +0000 (00:07 -0800)] 
bpo-39327: Close file descriptors as soon as possible in shutil.rmtree (GH-31384)

It fixes the "Text File Busy" OSError when using 'rmtree' on a
windows-managed filesystem in via the VirtualBox shared folder
(and possible other scenarios like a windows-managed network file
system).
(cherry picked from commit b77158b4da449ec5b8f682816a79d004fd65ed07)

Co-authored-by: Lital Natan <litaln@gmail.com>
3 years ago[docs] Correct typos in SSLContext.sni_callback (GH-30623) (GH-31421)
Miss Islington (bot) [Mon, 21 Feb 2022 00:17:56 +0000 (16:17 -0800)] 
[docs] Correct typos in SSLContext.sni_callback (GH-30623) (GH-31421)

Co-authored-by: Jörn Heissler <nosuchaddress@joern-heissler.de>
(cherry picked from commit f80a97b492f41afd3c42bb2bd6da7b2828dca215)

Co-authored-by: Jörn Heissler <joernheissler@users.noreply.github.com>
3 years ago[3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)
Erlend Egeberg Aasland [Mon, 21 Feb 2022 00:13:04 +0000 (01:13 +0100)] 
[3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)

* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642).
(cherry picked from commit 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Fix test_func_return_too_large_int

GH-27613 (bpo 44839) was not backported, so exceptions differ between
main (3.11) and older versions.

3 years agobpo-46672: fix `NameError` in `asyncio.gather` if type check fails (GH-31187) (GH...
Miss Islington (bot) [Sun, 20 Feb 2022 15:28:42 +0000 (07:28 -0800)] 
bpo-46672: fix `NameError` in `asyncio.gather` if type check fails (GH-31187) (GH-31440)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 4ab8167b9c60d1a04b2e3116d0c52db254b68cda)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.10] replace `self` param with more appropriate `cls` in classmethods (GH-31402...
Andrew Svetlov [Sun, 20 Feb 2022 13:45:13 +0000 (15:45 +0200)] 
[3.10] replace `self` param with more appropriate `cls` in classmethods (GH-31402) (GH-31446)

(cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa)

Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
3 years ago[3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based methods...
Andrew Svetlov [Sun, 20 Feb 2022 12:45:02 +0000 (14:45 +0200)] 
[3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based methods (GH-31442). (GH-31443)

(cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years agoImprove discussion about how __getattr__ is invoked. (GH-31435) (GH-31437)
Miss Islington (bot) [Sun, 20 Feb 2022 05:25:57 +0000 (21:25 -0800)] 
Improve discussion about how __getattr__ is invoked. (GH-31435) (GH-31437)

3 years agoCounter doc mentions three methods, but lists four (GH-30706)
Miss Islington (bot) [Sat, 19 Feb 2022 02:45:56 +0000 (18:45 -0800)] 
Counter doc mentions three methods, but lists four (GH-30706)

Was probably caused by the addition of the `total()` method
(cherry picked from commit 99331fcf175b03b6b82451ac9aa953b476ab48e0)

Co-authored-by: Charles Brunet <charles.brunet@optelgroup.com>
3 years agobpo-46603: improve coverage of `typing._strip_annotations` (GH-31063)
Miss Islington (bot) [Sat, 19 Feb 2022 02:15:56 +0000 (18:15 -0800)] 
bpo-46603: improve coverage of `typing._strip_annotations` (GH-31063)

(cherry picked from commit 25c0b9d243b64ccd2eeab483089eaf7e4b4d5834)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.10] bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) ...
Gregory P. Smith [Sat, 19 Feb 2022 00:53:49 +0000 (16:53 -0800)] 
[3.10] bpo-46784: Add newly exported expat symbols to the namespace. (GH-31397) (GH-31420)

The libexpat 2.4.1 upgrade from  introduced the following new exported symbols:

* `testingAccountingGetCountBytesDirect`
* `testingAccountingGetCountBytesIndirect`
* `unsignedCharToPrintable`
* `XML_SetBillionLaughsAttackProtectionActivationThreshold`
* `XML_SetBillionLaughsAttackProtectionMaximumAmplification`

We need to adjust [Modules/expat/pyexpatns.h](https://github.com/python/cpython/blob/master/Modules/expat/pyexpatns.h)

(The newer libexpat upgrade  has no new symbols).

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 6312c1052c0186b4596fc45c42fd3ade9f8f5911)

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
3 years agobpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388)
Miss Islington (bot) [Fri, 18 Feb 2022 09:30:36 +0000 (01:30 -0800)] 
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388)

(cherry picked from commit 2923d87ca258b9d421e8147b12f0d98295ee3f8e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agodocs: Link `match` statement in tutorial (GH-31396)
Miss Islington (bot) [Fri, 18 Feb 2022 04:15:00 +0000 (20:15 -0800)] 
docs: Link `match` statement in tutorial (GH-31396)

Add a link to the `match` statement from its section in the tutorial.

Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 35f55cc5c690a97853f1b544aac53574ab755b54)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
3 years agoFix mistake in barry_as_FLUFL test (GH-31392)
Miss Islington (bot) [Fri, 18 Feb 2022 02:11:34 +0000 (18:11 -0800)] 
Fix mistake in barry_as_FLUFL test (GH-31392)

Use assertEqual(), not assertTrue(lineno, 2)
(cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66)

Co-authored-by: Patrick Reader <_@pxeger.com>
3 years agobpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296)
Dong-hee Na [Thu, 17 Feb 2022 21:58:02 +0000 (06:58 +0900)] 
bpo-46400: Update libexpat from 2.4.1 to 2.4.4 (GH-31022) (GH-31296)

Co-authored-by: Cyril Jouve <jv.cyril@gmail.com>
3 years ago[3.10] Update html.parser.rst (GH-30678) (GH-31385)
Miss Islington (bot) [Thu, 17 Feb 2022 12:41:07 +0000 (04:41 -0800)] 
[3.10] Update html.parser.rst (GH-30678) (GH-31385)

This PR for the documentation of the [html.parser](https://docs.python.org/3/library/html.parser.html) module will

- fix a terminology mistake (‘start of a tag’ -> ‘start tag of an element’);
- mention the parameter names of the `HTMLParser.handle_*` methods where missing.
(cherry picked from commit 2945f5a7c51200bfc5c493ccb626fc414e1385b1)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Automerge-Triggered-By: GH:merwok
3 years ago[3.10] Become a CODEOWNER for typing (GH-31374) (GH-31382)
Miss Islington (bot) [Thu, 17 Feb 2022 04:09:06 +0000 (20:09 -0800)] 
[3.10] Become a CODEOWNER for typing (GH-31374) (GH-31382)

(cherry picked from commit 6f1efd19a70839d480e4b1fcd9fecd3a8725824b)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Automerge-Triggered-By: GH:JelleZijlstra
3 years ago[3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)
Miss Islington (bot) [Thu, 17 Feb 2022 03:53:03 +0000 (19:53 -0800)] 
[3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)

The `module` parameter carries semantic information about the forward ref.
Forward refs are different if they refer to different module even if they
have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods.

Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a)

Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com>
Automerge-Triggered-By: GH:JelleZijlstra
3 years ago[3.10] bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326) (GH-31354)
Mark Shannon [Wed, 16 Feb 2022 11:26:02 +0000 (11:26 +0000)] 
[3.10] bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326) (GH-31354)

3 years agobpo-46762: Fix an assert failure in f-strings where > or < is the last character...
Miss Islington (bot) [Wed, 16 Feb 2022 11:16:05 +0000 (03:16 -0800)] 
bpo-46762: Fix an assert failure in f-strings where > or < is the last character if the f-string is missing a trailing right brace. (GH-31365)

(cherry picked from commit ffd9f8ff84ed53c956b16d027f7d2926ea631051)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
3 years agoUpdate the OMG link (GH-30383)
Miss Islington (bot) [Tue, 15 Feb 2022 17:17:00 +0000 (09:17 -0800)] 
Update the OMG link (GH-30383)

(cherry picked from commit 04215a427232e55efdc1adcda50a15197f518ca9)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years agobpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (GH-31327) (GH-31362)
Miss Islington (bot) [Tue, 15 Feb 2022 17:14:09 +0000 (09:14 -0800)] 
bpo-46741: Update `asyncio.protocols.BufferedProtocol` docstring (GH-31327) (GH-31362)

The docstring for `BufferedProtocol` states that the class is still an "experimental API", but it has been considered stable since 3.8.
(cherry picked from commit 1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years ago[3.10] bpo-46728: fix docstring of combinations_with_replacement for consistency...
DongGeon Lee [Tue, 15 Feb 2022 10:24:04 +0000 (19:24 +0900)] 
[3.10] bpo-46728: fix docstring of combinations_with_replacement for consistency (GH-31293) (GH-31350)

3 years agobpo-46436: Fix command-line option -d/--directory in module http.server (GH-30701)
Miss Islington (bot) [Mon, 14 Feb 2022 20:12:30 +0000 (12:12 -0800)] 
bpo-46436: Fix command-line option -d/--directory in module http.server (GH-30701)

Fix command-line option -d/--directory in http.server main
function that was ignored when combined with --cgi.

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 2d080347d74078a55c47715d232d1ab8dc8cd603)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years agoFix the signature of multiprocessing.set_executable (GH-31276)
Miss Islington (bot) [Mon, 14 Feb 2022 20:11:02 +0000 (12:11 -0800)] 
Fix the signature of multiprocessing.set_executable (GH-31276)

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4f9386661d51b78348395e78710f3bfbee9fd1de)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years agoUpdate __main__.rst (GH-30896)
Miss Islington (bot) [Mon, 14 Feb 2022 20:10:34 +0000 (12:10 -0800)] 
Update __main__.rst (GH-30896)

The reference to `venv` appears in the paragraph below, instead of above.
Fixed the documentation.
(cherry picked from commit 4e4e7c2684b80350e82d82e4feeda5de24d362b9)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years agodoc: use colon for all color's rangs (GH-28998) (#31336)
Miss Islington (bot) [Mon, 14 Feb 2022 20:10:05 +0000 (12:10 -0800)] 
doc: use colon for all color's rangs (GH-28998) (#31336)

(cherry picked from commit 6b9f27dd0b5da53b1fd648494879d857572bec80)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
3 years agobpo-38619: Update the documentation for UUID.hex (GH-29830)
Miss Islington (bot) [Mon, 14 Feb 2022 19:20:48 +0000 (11:20 -0800)] 
bpo-38619: Update the documentation for UUID.hex (GH-29830)

Explicitly state that it is lowercase.

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 5d53cf30f9cb3758849e859db5d4602cb7c521f7)

Co-authored-by: 180909 <wjh180909@gmail.com>
3 years agoFix minor grammar error (GH-31325)
Miss Islington (bot) [Mon, 14 Feb 2022 19:09:57 +0000 (11:09 -0800)] 
Fix minor grammar error (GH-31325)

"an" followed by consonant should be "a"
(cherry picked from commit 0d29e7a06f98e8312b699d4531d27b76add1249f)

Co-authored-by: Scott Noyes <snoyes@gmail.com>
3 years agoFix a typo in Doc/faq/programming.rst (GH-31243)
Miss Islington (bot) [Mon, 14 Feb 2022 19:08:39 +0000 (11:08 -0800)] 
Fix a typo in Doc/faq/programming.rst (GH-31243)

is not longer used -> is no longer used
(cherry picked from commit ff5a16759744ee0a43c5d1c209f47e256abc7718)

Co-authored-by: Cooper Lees <me@cooperlees.com>
3 years ago[3.10] bpo-46747: Add missing key parameters in the bisect docs (GH-31323) (GH-31329)
Dennis Sweeney [Mon, 14 Feb 2022 16:51:16 +0000 (11:51 -0500)] 
[3.10] bpo-46747: Add missing key parameters in the bisect docs (GH-31323) (GH-31329)

Added *key* parameter to `bisect.bisect()` and `bisect.insort()` in bisect module docs.
(cherry picked from commit 96084f4256d2d523b0a4d7d900322b032326e3ed)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
3 years agoCorrections to format precision description. (GH-31291)
Miss Islington (bot) [Mon, 14 Feb 2022 00:21:32 +0000 (16:21 -0800)] 
Corrections to format precision description. (GH-31291)

* `precision` field is a decimal integer
  * clarify that stated limitations are on presentation type
    rather than input value type.  Especially misleading is
    "precision is not allowed for integer values", since integer
    value input to a format like `.1f` is fine.
  * regarding max field size, replace "non-number" with "string",
    which is the only non-numeric presentation type

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 1d6ce67c29aa2166ef326952cb605b908fb4f987)

Co-authored-by: John Belmonte <john@neggie.net>
3 years agobpo-45447: Add entry to What's new 3.10 (GH-31304)
Miss Islington (bot) [Sun, 13 Feb 2022 06:31:03 +0000 (22:31 -0800)] 
bpo-45447: Add entry to What's new 3.10 (GH-31304)

(cherry picked from commit 2d98433549be358d1c192e30e51b8d345d618cc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45447: Add entry to What's new 3.9 (GH-31305)
Miss Islington (bot) [Sun, 13 Feb 2022 06:30:25 +0000 (22:30 -0800)] 
bpo-45447: Add entry to What's new 3.9 (GH-31305)

(cherry picked from commit cef91ca80c41749824eca1d4b2c99731e3d5f64c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)
Terry Jan Reedy [Sun, 13 Feb 2022 00:52:37 +0000 (19:52 -0500)] 
bpo-45447: Add syntax highlighting for `.pyi` files in IDLE (GH-28950)

Also add .pyi to the python extensions in the "File-open" and "File-save" dialogues.
Add util.py to contain objects that are used in multiple idlelib modules
and have no dependencies on any of them.

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 50cf4991c49e19f917305dd7b9c71085c11edddb)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agobpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser ...
Miss Islington (bot) [Sat, 12 Feb 2022 08:50:11 +0000 (00:50 -0800)] 
bpo-45948: Remove constructor discrepancy in C version of ElementTree.XMLParser (GH-31152)

Both implementations accept target=None now.
(cherry picked from commit 168fd6453b5de15236116f9261d64601d92571ac)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
3 years agobpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)
Miss Islington (bot) [Fri, 11 Feb 2022 21:04:01 +0000 (13:04 -0800)] 
bpo-46483: [doc] pathlib classes no longer support parameterized generics (GH-31281)

Remove pathlib classes from the list in stdtypes.rst of classes
that can be parameterized at runtime.
(cherry picked from commit e0bc8ee945af96f9395659bbe3cc30b082e7a361)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agobpo-46615: Don't crash when set operations mutate the sets (GH-31120)
Miss Islington (bot) [Fri, 11 Feb 2022 20:44:17 +0000 (12:44 -0800)] 
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)

Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.
(cherry picked from commit 4a66615ba736f84eadf9456bfd5d32a94cccf117)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
3 years ago[3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) ...
Petr Viktorin [Fri, 11 Feb 2022 11:25:25 +0000 (12:25 +0100)] 
[3.10] bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696) (GH-31262)

(cherry picked from commit 0ef08530124c5ca13a9394f4ac18bee8e6c66409)

3 years agobpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452)
Miss Islington (bot) [Fri, 11 Feb 2022 01:18:23 +0000 (17:18 -0800)] 
bpo-46246: add missing __slots__ to importlib.metadata.DeprecatedList (GH-30452)

Confirmed with @jaraco that this indeed needs a fix.

A question that came up while I was digging into the code: I think `SelectableGroups` could similarly use `__slots__ = ()`, since its purpose seems only for convenience around `dict`, not to have attributes of its own.

Automerge-Triggered-By: GH:jaraco
(cherry picked from commit dd76b3f7d332dd6eced5cbc2ad2adfc397700b3d)

Co-authored-by: Arie Bovenberg <a.c.bovenberg@gmail.com>
3 years ago[3.10] Allow the parser to avoid nested processing of invalid rules (GH-31252). ...
Pablo Galindo Salgado [Thu, 10 Feb 2022 14:38:31 +0000 (14:38 +0000)] 
[3.10] Allow the parser to avoid nested processing of invalid rules (GH-31252). (GH-31257)

(cherry picked from commit 390459de6db1e68b79c0897cc88c0d562693ec5c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years ago[3.10] Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio...
Andrew Svetlov [Thu, 10 Feb 2022 13:27:15 +0000 (15:27 +0200)] 
[3.10] Fix warning: asyncio.events._event_loop_policy was modified by test_asyncio (GH-31253) (GH-31255)

(cherry picked from commit 012e77eb5c3ba3d411f5967a7f368ebdb42ab88c)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
3 years ago[3.10] bpo-46707: Avoid potential exponential backtracking in some syntax errors...
Pablo Galindo Salgado [Thu, 10 Feb 2022 03:54:47 +0000 (03:54 +0000)] 
[3.10] bpo-46707: Avoid potential exponential backtracking in some syntax errors (GH-31241). (GH-31242)

(cherry picked from commit b71dc71905ab674ccaa4a56230d17a28f61c325c)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 years agobpo-43532: add version added to KW_ONLY (GH-31235)
Miss Islington (bot) [Wed, 9 Feb 2022 21:18:52 +0000 (13:18 -0800)] 
bpo-43532: add version added to KW_ONLY (GH-31235)

Minor missing version note mentioned at the end of  (and affected me independently before reading that note).

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 5a3f97291eea96037cceee097ebc00bba44bc9ed)

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
3 years agobpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)
Miss Islington (bot) [Wed, 9 Feb 2022 17:31:12 +0000 (09:31 -0800)] 
bpo-45863: tarfile: don't zero out header fields unnecessarily (GH-29693)

Numeric fields of type float, notably mtime, can't be represented
exactly in the ustar header, so the pax header is used. But it is
helpful to set them to the nearest int (i.e. second rather than
nanosecond precision mtimes) in the ustar header as well, for the
benefit of unarchivers that don't understand the pax header.

Add test for tarfile.TarInfo.create_pax_header to confirm correct
behaviour.
(cherry picked from commit bf2d44ffb06e8f49aacc6b1c140a6717df5cf897)

Co-authored-by: Joshua Root <jmr@macports.org>
3 years agobpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)
Miss Islington (bot) [Wed, 9 Feb 2022 15:12:17 +0000 (07:12 -0800)] 
bpo-46685: cover `TypeError` of `ForwardRef(1)` in `test_typing` (GH-31223)

(cherry picked from commit d2d1d49eaccaa83eb8873ba15f2fc9562143bc56)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agobpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH...
Miss Islington (bot) [Tue, 8 Feb 2022 21:04:05 +0000 (13:04 -0800)] 
bpo-46678: Fix Invalid cross device link in Lib/test/support/import_helper.py (GH-31204) (GH-31207)

In `Lib/test/support/import_helper.py`, the function `make_legacy_pyc` makes a call to `os.rename` which can fail when the source and target live on different devices. This happens (for example) when `PYTHONPYCACHEPREFIX` is set to a directory anywhere on disk, while a ramdisk is mounted on `/tmp` (the latter of which is the default on various Linux distros). Replacing `os.rename` with `shutil.move` fixes this.

Automerge-Triggered-By: GH:brettcannon
(cherry picked from commit da576e08296490e94924421af71001bcfbccb317)

Co-authored-by: Jason Wilkes <notarealdeveloper@gmail.com>