]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-44385: Remove unused grammar rules (GH-26655)
Miss Islington (bot) [Thu, 10 Jun 2021 22:31:09 +0000 (15:31 -0700)] 
bpo-44385: Remove unused grammar rules (GH-26655)

Automerge-Triggered-By: GH:lysnikolaou
(cherry picked from commit e7b4644607789848f9752a3bd20ff216e25b4156)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 years agobpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649...
Miss Islington (bot) [Thu, 10 Jun 2021 22:01:03 +0000 (15:01 -0700)] 
bpo-44356: [Enum] allow multiple data-type mixins if they are all the same (GH-26649) (GH-26653)

This enables, for example, two base Enums to both inherit from `str`, and then both be mixed into the same final Enum:

    class Str1Enum(str, Enum):
        GH- some behavior here

    class Str2Enum(str, Enum):
        GH- some more behavior here

    class FinalStrEnum(Str1Enum, Str2Enum):
        GH- this now works
(cherry picked from commit 8a4f0850d75747af8c96ca0e7eef1f5c1abfba25)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr ...
Miss Islington (bot) [Thu, 10 Jun 2021 20:56:57 +0000 (13:56 -0700)] 
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26650)

(cherry picked from commit 6544b2532df82d137b71323445a07a6e29bcdec0)

Co-authored-by: Daniel Hahler <git@thequod.de>
4 years agobpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)
Miss Islington (bot) [Thu, 10 Jun 2021 20:16:38 +0000 (13:16 -0700)] 
bpo-33962: Use ttk spinbox for IDLE indent space config (GH-22954)

If ttk.Spinbox is not available (Tk < 8.5.9) use readonly ttk.Combobox.

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

Co-authored-by: Mark Roseman <mark@markroseman.com>
4 years ago[3.10] bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) ...
Ethan Furman [Thu, 10 Jun 2021 14:24:20 +0000 (07:24 -0700)] 
[3.10] bpo-44242: [Enum] remove missing bits test from Flag creation (GH-26586) (GH-26635)

Move the check for missing named flags in flag aliases from Flag creation
to a new *verify* decorator..

(cherry picked from commit eea8148b7dff5ffc7b84433859ac819b1d92a74d)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
4 years agobpo-44363: Get test_capi passing with address sanitizer (GH-26639)
Miss Islington (bot) [Thu, 10 Jun 2021 12:02:22 +0000 (05:02 -0700)] 
bpo-44363: Get test_capi passing with address sanitizer (GH-26639)

(cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b)

Co-authored-by: Mark Shannon <mark@hotpy.org>
4 years agobpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords...
Miss Islington (bot) [Wed, 9 Jun 2021 21:45:43 +0000 (14:45 -0700)] 
bpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords (GH-26630)

(cherry picked from commit 457ce60fc70f1c9290023f46fb82b6a490dff32e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-40468: Split IDLE settings General tab (GH-26621)
Miss Islington (bot) [Wed, 9 Jun 2021 20:37:56 +0000 (13:37 -0700)] 
bpo-40468: Split IDLE settings General tab (GH-26621)

Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.

Create room for more options and make dialog shorter,
to better fit small windows.
(cherry picked from commit 275d5f7957dbb56a6d5e1248addff210ee2e7270)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
Miss Islington (bot) [Wed, 9 Jun 2021 02:11:26 +0000 (19:11 -0700)] 
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)

(cherry picked from commit 5571cabf1b3385087aba2c7c10289bba77494e08)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44349: Fix edge case when displaying text from files with encoding in syntax...
Miss Islington (bot) [Wed, 9 Jun 2021 00:29:21 +0000 (17:29 -0700)] 
bpo-44349: Fix edge case when displaying text from files with encoding in syntax errors (GH-26611) (GH-26616)

(cherry picked from commit 9fd21f649d66dcb10108ee395fd68ed32c8239cd)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)
Miss Islington (bot) [Tue, 8 Jun 2021 23:52:23 +0000 (16:52 -0700)] 
bpo-43833: Emit warnings for numeric literals followed by keyword (GH-25466)

Emit a deprecation warning if the numeric literal is immediately followed by
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
more informative message if it is immediately followed by other keyword or
identifier.

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 2ea6d890281c415e0a2f00e63526e592da8ce3d9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)
Miss Islington (bot) [Tue, 8 Jun 2021 20:01:23 +0000 (13:01 -0700)] 
bpo-40468: Move IDLE helplist settings to extensions page of dialog. (GH-26593)

These are the settings that extend the help menu.  Moving them shortens the dialog and will help with it being too tall for small screens.
(cherry picked from commit ab36b9f83424a020fbd672f218612e6f19257a32)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608)
Miss Islington (bot) [Tue, 8 Jun 2021 19:25:17 +0000 (12:25 -0700)] 
bpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608)

(cherry picked from commit bafe0aade5741ab0d13143ee261711fdd65e8a1f)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years ago[3.10] bpo-11105: reduce the recursion limit for tests. (GH-26607)
Batuhan Taskaya [Tue, 8 Jun 2021 17:39:30 +0000 (20:39 +0300)] 
[3.10] bpo-11105: reduce the recursion limit for tests. (GH-26607)

(cherry picked from commit e58d762c1fb4ad5e021d016c80c2bc4513632d2f)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
4 years agobpo-43795: Note Stable ABI PEP in What's New (GH-26479) (GH-26603)
Miss Islington (bot) [Tue, 8 Jun 2021 16:00:10 +0000 (09:00 -0700)] 
bpo-43795: Note Stable ABI PEP in What's New (GH-26479) (GH-26603)

(cherry picked from commit 257e400a19b34c7da6e2aa500d80b54e4c4dbf6f)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years agobpo-44335: Fix a regression when identifying invalid characters in syntax errors...
Miss Islington (bot) [Tue, 8 Jun 2021 11:46:56 +0000 (04:46 -0700)] 
bpo-44335: Fix a regression when identifying invalid characters in syntax errors (GH-26589)

(cherry picked from commit d334c73b56756e90c33ce06e3a6ec23271aa099d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agofix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)
Miss Islington (bot) [Tue, 8 Jun 2021 00:36:19 +0000 (17:36 -0700)] 
fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)

(cherry picked from commit ffd87b7093109c279caf8e3ca060f408a102388a)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
4 years agoUse absolute imports in IDLE tests (GH-26581)
Miss Islington (bot) [Mon, 7 Jun 2021 22:15:31 +0000 (15:15 -0700)] 
Use absolute imports in IDLE tests (GH-26581)

Relative imports do not work when running test_x as main.
(cherry picked from commit e915db3e9e512249a6f494c0b331db2d021e1f56)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44322: Document more SyntaxError details. (GH-26562)
Miss Islington (bot) [Mon, 7 Jun 2021 02:09:34 +0000 (19:09 -0700)] 
bpo-44322: Document more SyntaxError details. (GH-26562)

1. SyntaxError args have a tuple of other attributes.
2. Attributes are adjusted for errors in f-string field expressions.
3. Compile() can raise SyntaxErrors.
(cherry picked from commit 67dfa6f2a508c325715625fe442f2ce20270a8b3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44227: Update bisect docstrings (GH-26548) (GH-26563)
Miss Islington (bot) [Sun, 6 Jun 2021 19:52:42 +0000 (12:52 -0700)] 
bpo-44227: Update bisect docstrings (GH-26548) (GH-26563)

4 years agobpo-44320: Fix markup for W3C C14N test suite (GH-26556)
Miss Islington (bot) [Sun, 6 Jun 2021 02:56:47 +0000 (19:56 -0700)] 
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)

(cherry picked from commit 71be46170490d08743c714b9fa4484038aa7a23e)

Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
4 years agobpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held...
Miss Islington (bot) [Sat, 5 Jun 2021 23:13:27 +0000 (16:13 -0700)] 
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551) (GH_26552)

(cherry picked from commit 6e3b7cf3af3ed7758b2c2193c1d393feb8ab8f72)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects ...
Miss Islington (bot) [Sat, 5 Jun 2021 03:09:40 +0000 (20:09 -0700)] 
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects (GH-26545)

(cherry picked from commit fa106a685c1f199aca5be5c2d0277a14cc9057bd)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agoUpdate nonstandard variable names (GH-26540) (GH-26546)
Miss Islington (bot) [Sat, 5 Jun 2021 02:38:30 +0000 (19:38 -0700)] 
Update nonstandard variable names (GH-26540) (GH-26546)

4 years agoImprove speed and accuracy for correlation() (GH-26135) (GH-26151)
Miss Islington (bot) [Sat, 5 Jun 2021 01:49:29 +0000 (18:49 -0700)] 
Improve speed and accuracy for correlation() (GH-26135) (GH-26151)

4 years agobpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH...
Miss Islington (bot) [Sat, 5 Jun 2021 00:05:54 +0000 (17:05 -0700)] 
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542) (GH-26544)

(cherry picked from commit f171877ebe276749f31386baed5841ce37cbee2e)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) ...
Miss Islington (bot) [Fri, 4 Jun 2021 22:10:07 +0000 (15:10 -0700)] 
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) (GH-26538)

(cherry picked from commit dda9ecbfece28aad7b8ba7eaf7951dd9816f78b1)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
4 years agobpo-43853: Handle sqlite3_value_text() errors (GH-25422)
Miss Islington (bot) [Fri, 4 Jun 2021 18:54:39 +0000 (11:54 -0700)] 
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)

(cherry picked from commit 006fd869e4798b68e266f5de89c83ddb531a756b)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) (GH-26531)
Miss Islington (bot) [Fri, 4 Jun 2021 18:38:02 +0000 (11:38 -0700)] 
bpo-44048: Fix two hashlib test cases under FIPS mode (GH-26470) (GH-26531)

test_disallow_instantiation and test_readonly_types try to test all the available
digests, however under FIPS mode, while the algorithms are available, trying to use
them will fail with a ValueError.
(cherry picked from commit a46c220edc5cf716d0b71eb80ac29ecdb4ebb430)

Co-authored-by: stratakis <cstratak@redhat.com>
Co-authored-by: stratakis <cstratak@redhat.com>
4 years ago[3.10] bpo-44305: Improve syntax error for try blocks without except or finally ...
Pablo Galindo [Thu, 3 Jun 2021 23:11:43 +0000 (00:11 +0100)] 
[3.10] bpo-44305: Improve syntax error for try blocks without except or finally (GH-26523) (GH-26524)

(cherry picked from commit b250f89bb7e05e72a4641d44b988866b919575db)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years ago[3.10] bpo-44273: Improve syntax error message for assigning to "..." (GH-26477)...
Pablo Galindo [Thu, 3 Jun 2021 21:22:28 +0000 (22:22 +0100)] 
[3.10] bpo-44273: Improve syntax error message for assigning to "..." (GH-26477) (GH-26478)

Use "ellipsis" instead of "Ellipsis" in syntax error messages to eliminate confusion with built-in variable Ellipsis.
(cherry picked from commit 39dd141)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 years agobpo-11105: Do not crash when compiling recursive ASTs (GH-20594)
Miss Islington (bot) [Thu, 3 Jun 2021 20:27:00 +0000 (13:27 -0700)] 
bpo-11105: Do not crash when compiling recursive ASTs (GH-20594)

When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError.
(cherry picked from commit f3491242e41933aa9529add7102edb68b80a25e9)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
4 years agobpo-43921: Fix test_ssl.test_wrong_cert_tls13() on Windows (GH-26502) (GH-26518)
Miss Islington (bot) [Thu, 3 Jun 2021 20:15:15 +0000 (13:15 -0700)] 
bpo-43921: Fix test_ssl.test_wrong_cert_tls13() on Windows (GH-26502) (GH-26518)

Fix test_ssl.test_wrong_cert_tls13(): use suppress_ragged_eofs=False,
since read() can raise ssl.SSLEOFError on Windows.
(cherry picked from commit ea0210fa8ccca769896847f25fc6fadfe9a717bc)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years ago[3.10] bpo-44298: Backport #26513 to 3.10 (#26516)
Mark Shannon [Thu, 3 Jun 2021 18:57:31 +0000 (19:57 +0100)] 
[3.10] bpo-44298: Backport #26513 to 3.10 (#26516)

* Backport 937cebc93 to 3.10

* Update importlib

4 years ago[3.10] bpo-42972: Track sqlite3 statement objects (GH-26475) (GH-26515)
Erlend Egeberg Aasland [Thu, 3 Jun 2021 16:38:09 +0000 (18:38 +0200)] 
[3.10] bpo-42972: Track sqlite3 statement objects (GH-26475) (GH-26515)

Allocate and track statement objects in pysqlite_statement_create.

By allocating and tracking creation of statement object in
pysqlite_statement_create(), the caller does not need to worry about GC
syncronization, and eliminates the possibility of getting a badly
created object. All related fault handling is moved to
pysqlite_statement_create().

Co-authored-by: Victor Stinner <vstinner@python.org>.
(cherry picked from commit fffa0f92adaaed0bcb3907d982506f78925e9052)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agoAdd bpo-42914 to What's New (GH-25124)
Miss Islington (bot) [Thu, 3 Jun 2021 04:05:41 +0000 (21:05 -0700)] 
Add bpo-42914 to What's New (GH-25124)

BPO-42914 was not added to the What's New in GH-24864. This includes it in the "Improved Modules" section.

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

Co-authored-by: Wm. Keith van der Meulen <keith@wkeithvan.com>
4 years agobpo-44022: Improve the regression test. (GH-26503)
Miss Islington (bot) [Thu, 3 Jun 2021 04:04:20 +0000 (21:04 -0700)] 
bpo-44022: Improve the regression test. (GH-26503)

It wasn't actually detecting the regression due to the
assertion being too lenient.
(cherry picked from commit e60ab843cbb016fb6ff8b4f418641ac05a9b2fcc)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 years agobpo-44282: Fix occasional test_incremental_editing failures on buildbots (GH-26491...
Miss Islington (bot) [Thu, 3 Jun 2021 00:14:41 +0000 (17:14 -0700)] 
bpo-44282: Fix occasional test_incremental_editing failures on buildbots (GH-26491) (GH-26499)

Signed-off-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit adef445dc34685648bd0ea1c125df2ef143912ed)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
4 years agobpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486)
Miss Islington (bot) [Wed, 2 Jun 2021 23:50:38 +0000 (16:50 -0700)] 
bpo-44285: getpath.c: Assert that env_file is NULL during an error check (GH-26486)

This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well.
(cherry picked from commit bdb56902a3bfe12b10f85a941d5dd0eae739f1a8)

Co-authored-by: stratakis <cstratak@redhat.com>
4 years agobpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)
Miss Islington (bot) [Wed, 2 Jun 2021 23:48:40 +0000 (16:48 -0700)] 
bpo-43921: Fix test_ssl.test_pha_required_nocert() (GH-26489)

Fix test_pha_required_nocert() of test_ssl: catch two more EOF cases
(when the recv() method returns an empty string).
(cherry picked from commit 320eaa7f42b413cd5e5436ec92d4dc5ba150395f)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years ago[3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480)
Irit Katriel [Tue, 1 Jun 2021 21:58:06 +0000 (22:58 +0100)] 
[3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480)

(cherry picked from commit 87272b70f157af76cb14ff90d73dfc5d9bfb945a)

Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
4 years agobpo-44246: Remove note about access by index now that a compatibility shim is offered...
Miss Islington (bot) [Mon, 31 May 2021 22:29:08 +0000 (15:29 -0700)] 
bpo-44246: Remove note about access by index now that a compatibility shim is offered. (GH-26472) (#26473)

(cherry picked from commit 78d9a9b1904f0e1d9db1e941c19782f4f5a881d4)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years ago[3.10] bpo-44246: Restore compatibility in entry_points (GH-26468) (GH-26471)
Miss Islington (bot) [Mon, 31 May 2021 16:41:55 +0000 (09:41 -0700)] 
[3.10] bpo-44246: Restore compatibility in entry_points (GH-26468) (GH-26471)

* [bpo-44246](): Entry points performance improvements.

From importlib_metadata 4.3.1.

* [bpo-44246](): Sync with importlib_metadata 4.4
(cherry picked from commit c34ed08d975fb7daa7b329f7c631647782290393)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
4 years agobpo-44246: Entry points performance improvements. (GH-26467)
Miss Islington (bot) [Mon, 31 May 2021 16:12:32 +0000 (09:12 -0700)] 
bpo-44246: Entry points performance improvements. (GH-26467)

From importlib_metadata 4.3.1.
(cherry picked from commit 410b70d39d9d77384f8b8597560f6731530149ca)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agoPost 3.10.0b2
Pablo Galindo [Mon, 31 May 2021 11:58:35 +0000 (12:58 +0100)] 
Post 3.10.0b2

4 years agoPython 3.10.0b2 v3.10.0b2
Pablo Galindo [Mon, 31 May 2021 11:29:21 +0000 (12:29 +0100)] 
Python 3.10.0b2

4 years agobpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464) (GH-26465)
Miss Islington (bot) [Mon, 31 May 2021 11:25:47 +0000 (04:25 -0700)] 
bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464) (GH-26465)

* _testcapi.heapgctype: implement a traverse function since the type
  is defined with Py_TPFLAGS_HAVE_GC.
* _decimal: PyDecSignalDictMixin_Type is no longer defined with
  Py_TPFLAGS_HAVE_GC since it has no traverse function.
(cherry picked from commit 142e5c5445c019542246d93fe2f9e195d3131686)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-42972: Fully implement GC protocol for xxlimited (GH-26451) (GH-26460)
Miss Islington (bot) [Mon, 31 May 2021 11:23:13 +0000 (04:23 -0700)] 
bpo-42972: Fully implement GC protocol for xxlimited (GH-26451) (GH-26460)

(cherry picked from commit 4b20f2574d412f4c4a5b1ab799d8e71a5dd3b766)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Co-authored-by: Hai Shi <shihai1992@gmail.com>
4 years agobpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)
Miss Islington (bot) [Mon, 31 May 2021 09:12:27 +0000 (02:12 -0700)] 
bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)

(cherry picked from commit d1124b09e8251061dc040cbd396f35ae57783f4a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42085: [docs] Add versionadded for am_send in type object documentation (GH-25465...
Miss Islington (bot) [Sat, 29 May 2021 20:38:00 +0000 (13:38 -0700)] 
bpo-42085: [docs] Add versionadded for am_send in type object documentation (GH-25465) (GH-26453)

(cherry picked from commit 0b11c429c7f1721d9ffb9ae19e3e8e2e7bd6444d)

Co-authored-by: Martmists <mail@martmists.com>
4 years agobpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445) (#26446)
Miss Islington (bot) [Sat, 29 May 2021 17:49:16 +0000 (10:49 -0700)] 
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445) (#26446)

(cherry picked from commit 43cf7c864a2941b3f8f823e5928721dd286b7778)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44254: On Mac, remove disfunctional colors from turtledemo buttons (GH-26448)
Miss Islington (bot) [Sat, 29 May 2021 07:34:57 +0000 (00:34 -0700)] 
bpo-44254: On Mac, remove disfunctional colors from turtledemo buttons (GH-26448)

On macOS, tk defers to system setting for button background when in normal state.
Give turtledemo button text a color that works on either light or dark background.
(cherry picked from commit af5a324843de395cecc562cb0c757b3768f2077f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442...
Miss Islington (bot) [Sat, 29 May 2021 03:21:26 +0000 (20:21 -0700)] 
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442) (GH-26443)

(cherry picked from commit 8b55bc3f93a655bc803bff79725d5fe3f124e2f0)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agoFix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26436)
Miss Islington (bot) [Sat, 29 May 2021 01:07:27 +0000 (18:07 -0700)] 
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26436)

(cherry picked from commit 7e6f2375698036d62464c238059ef2073755fdaf)

Co-authored-by: Sean Grady <vedicmonk@gmail.com>
Co-authored-by: Sean Grady <vedicmonk@gmail.com>
4 years agobpo-44252: Correctly implement gc support for SSLError objects (GH-26439) (GH-26441)
Miss Islington (bot) [Fri, 28 May 2021 23:47:36 +0000 (16:47 -0700)] 
bpo-44252: Correctly implement gc support for SSLError objects (GH-26439) (GH-26441)

(cherry picked from commit 8b4312b909abff3100c1f18fb3efa5c25617fee3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-44249: Fix 3 README.rst typos (GH-26385)
Miss Islington (bot) [Fri, 28 May 2021 20:03:10 +0000 (13:03 -0700)] 
bpo-44249: Fix 3 README.rst typos (GH-26385)

(cherry picked from commit acac6c71ff370413374c6aca1df808c426e8a30c)

Co-authored-by: Ayush Parikh <ayushparikh332@gmail.com>
4 years ago[3.10] bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381) (#26430)
Ken Jin [Fri, 28 May 2021 17:47:15 +0000 (01:47 +0800)] 
[3.10] bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)  (#26430)

* bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)

* untrack earlier

4 years agobpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)
Miss Islington (bot) [Fri, 28 May 2021 14:26:07 +0000 (07:26 -0700)] 
bpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)

(cherry picked from commit 3f8d33252722750e6c019d3df7ce0fabf7bdd45e)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42972: Fully implement GC protocol for functools keywrapper and partial types...
Miss Islington (bot) [Fri, 28 May 2021 09:08:01 +0000 (02:08 -0700)] 
bpo-42972: Fully implement GC protocol for functools keywrapper and partial types (GH-26363) (GH-26424)

(cherry picked from commit 8994e9c2cd775ddf7b0723824da53fe0d7c039ac)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-44256: Do not expose _functools._list_elem_type (GH-26416)
Miss Islington (bot) [Fri, 28 May 2021 07:10:45 +0000 (00:10 -0700)] 
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)

It is internal use only type.
(cherry picked from commit 28be3191a9db2769ed05e55c6bcbccdd029656dd)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
4 years agobpo-41611: IDLE: Catch TclError exceptions in AutoCompleteWindow.winconfig_event...
Miss Islington (bot) [Fri, 28 May 2021 06:39:36 +0000 (23:39 -0700)] 
bpo-41611: IDLE: Catch TclError exceptions in AutoCompleteWindow.winconfig_event() (GH-26404)

Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.

(cherry picked from commit 4e2e5c1c4f792b4011e4c78d011baea2aee39f1b)

4 years agobpo-42972: Fully implement GC protocol for re types (GH-26368) (GH-26414)
Miss Islington (bot) [Fri, 28 May 2021 00:23:37 +0000 (17:23 -0700)] 
bpo-42972: Fully implement GC protocol for re types (GH-26368) (GH-26414)

(cherry picked from commit fba42d11880f444bb94d9891e3949f082a57b9a9)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years ago[3.10] bpo-44246: Update What's New for importlib.metadata. (GH-26408) (GH-26415)
Miss Islington (bot) [Thu, 27 May 2021 23:57:04 +0000 (16:57 -0700)] 
[3.10] bpo-44246: Update What's New for importlib.metadata. (GH-26408) (GH-26415)

* [bpo-44246](): Update What's New for importlib.metadata.

Bump version of importlib_metadata included.
Add note about compatibility notice and fix link to entry_points documentation.
Add note about removal of access by index on Distribution.entry_points.

* Fix syntax mistake in issue reference.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Fix broken reference in entry-points.

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 28f12c9f4f39d283d823d81e311d863526dfdb54)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
4 years agobpo-42972: Fully support GC protocol for _operator heap types (GH-26371) (GH-26413)
Miss Islington (bot) [Thu, 27 May 2021 21:49:43 +0000 (14:49 -0700)] 
bpo-42972: Fully support GC protocol for _operator heap types (GH-26371) (GH-26413)

(cherry picked from commit f4b70c22c8e37dd7a06702e30b121a6651683421)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26409)
Miss Islington (bot) [Thu, 27 May 2021 17:23:43 +0000 (10:23 -0700)] 
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26409)

(cherry picked from commit 164a4f46d1606e21d82babc010e397a9116e6730)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
4 years agobpo-42972: Fully support GC for mmap heap types (GH-26373)
Miss Islington (bot) [Thu, 27 May 2021 16:43:56 +0000 (09:43 -0700)] 
bpo-42972: Fully support GC for mmap heap types (GH-26373)

(cherry picked from commit 318adeba780851c416505e48a3454cacca831419)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372) (GH-26406)
Miss Islington (bot) [Thu, 27 May 2021 16:25:50 +0000 (09:25 -0700)] 
bpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372) (GH-26406)

(cherry picked from commit 4d7f8f9f7fb09ea8eb4e43409a16a91b0bf18571)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42972: Fully implement GC protocol for ssl heap types (GH-26370) (GH-26399)
Miss Islington (bot) [Thu, 27 May 2021 16:25:22 +0000 (09:25 -0700)] 
bpo-42972: Fully implement GC protocol for ssl heap types (GH-26370) (GH-26399)

(cherry picked from commit dcb8786a9848516e823e090bb36079678913d8d3)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH...
Miss Islington (bot) [Thu, 27 May 2021 15:26:15 +0000 (08:26 -0700)] 
bpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap types (GH-26376)

* bpo-42972: pyexpat
* bpo-42972: unicodedata
* bpo-42972: dbm/gdbm
(cherry picked from commit 59af59c2dfa52dcd5605185263f266a49ced934c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
Miss Islington (bot) [Thu, 27 May 2021 14:53:53 +0000 (07:53 -0700)] 
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)

(cherry picked from commit abc4bd5db91c86b6b74289241378a13bd3a0a5e2)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
4 years ago[3.10] bpo-38908: [docs] Add changes to 3.10 whatsnew and fix some minor inaccuracies...
Miss Islington (bot) [Thu, 27 May 2021 13:50:58 +0000 (06:50 -0700)] 
[3.10] bpo-38908: [docs] Add changes to 3.10 whatsnew and fix some minor inaccuracies in news (GH-26096) (GH-26337)

The fix only applies to ``isinstance``. ``issubclass`` isn't affected (because it was always working to begin with). So I also fixed the news to reflect that.
(cherry picked from commit 8450e8a81f6d54f45e1fc5c13a03878c9978750d)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
4 years ago[3.10] bpo-42972: Fully support GC for hashlib heap types (GH-26374) (GH-26398)
Miss Islington (bot) [Thu, 27 May 2021 08:10:39 +0000 (01:10 -0700)] 
[3.10] bpo-42972: Fully support GC for hashlib heap types (GH-26374) (GH-26398)

(cherry picked from commit 6ef5ba391d700bde7ec3ffd5fb7132a30dd309c4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:tiran
4 years ago[3.10] bpo-44241: Incorporate changes from importlib_metadata 4.1. (GH-26382) (GH...
Miss Islington (bot) [Thu, 27 May 2021 01:22:25 +0000 (18:22 -0700)] 
[3.10] bpo-44241: Incorporate changes from importlib_metadata 4.1. (GH-26382) (GH-26395)

(cherry picked from commit 06ac3a4742228b0230981720060248a7425b2486)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
4 years agobpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391) (GH-26393)
Miss Islington (bot) [Wed, 26 May 2021 23:13:17 +0000 (16:13 -0700)] 
bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391) (GH-26393)

Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside
loops in functions:

* math.comb()
* math.gcd()
* math.lcm()
* math.perm()
(cherry picked from commit 3e7ee02327db13e4337374597cdc4458ecb9e3ad)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years ago[3.10] bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357...
Miss Islington (bot) [Wed, 26 May 2021 22:19:42 +0000 (15:19 -0700)] 
[3.10] bpo-42392: [docs] Add deprecated-removed loop labels for asyncio (GH-26357) (GH-26390)

* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio
(cherry picked from commit d8fd8c8568cbc2f53c1abeda3596a89a46f0e3d7)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Automerge-Triggered-By: GH:gpshead
4 years agobpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). ...
Miss Islington (bot) [Wed, 26 May 2021 21:09:27 +0000 (14:09 -0700)] 
bpo-38693: Prefer f-strings in importlib.resources (importlib_resources 5.0.6). (GH-26387) (#26389)

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-38693: importlib.metadata f-strings (GH-26383)
Miss Islington (bot) [Wed, 26 May 2021 19:11:41 +0000 (12:11 -0700)] 
bpo-38693: importlib.metadata f-strings (GH-26383)

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

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agobpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context...
Miss Islington (bot) [Wed, 26 May 2021 14:34:22 +0000 (07:34 -0700)] 
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26379)

(cherry picked from commit 46db39d7bd67fb9fea133cd4f18cdf7eacb0f6d9)

Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
4 years agobpo-44232: Fix type_new() error reporting (GH-26359) (GH-26365)
Miss Islington (bot) [Wed, 26 May 2021 09:30:55 +0000 (02:30 -0700)] 
bpo-44232: Fix type_new() error reporting (GH-26359) (GH-26365)

Fix a regression in type() when a metaclass raises an exception. The
C function type_new() must properly report the exception when a
metaclass constructor raises an exception and the winner class is not
the metaclass.
(cherry picked from commit bd199e72fb60a8ff001a023f23925092a290be91)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoPoint to recent link to PyFLTK (GH-26315) (GH-26366)
Miss Islington (bot) [Tue, 25 May 2021 21:04:26 +0000 (14:04 -0700)] 
Point to recent link to PyFLTK (GH-26315) (GH-26366)

(cherry picked from commit ee3d78ef730116f2c43afc248d207ca1d47eee08)

Co-authored-by: Mark <mark@qtrac.eu>
Co-authored-by: Mark <mark@qtrac.eu>
4 years agobpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)
Miss Islington (bot) [Tue, 25 May 2021 18:49:19 +0000 (11:49 -0700)] 
bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)

(cherry picked from commit bd404ccac0d3e8358995ac0cbeec9373bb6c4d96)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)
Miss Islington (bot) [Tue, 25 May 2021 18:08:39 +0000 (11:08 -0700)] 
bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)

(cherry picked from commit d3c277a59c3d93fb92f7026f63678083d1d49fc5)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agobpo-20408: Fix memoryview() signature in docs (GH-24431)
Miss Islington (bot) [Tue, 25 May 2021 14:30:00 +0000 (07:30 -0700)] 
bpo-20408: Fix memoryview() signature in docs (GH-24431)

(cherry picked from commit d18e5dae914b1db49b25ed7729c07a535d1f0c52)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
4 years agobpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI (GH-26241) (GH...
Miss Islington (bot) [Tue, 25 May 2021 11:59:10 +0000 (04:59 -0700)] 
bpo-43795: Remove Py_FrozenMain from the Limited API & Stable ABI  (GH-26241) (GH-26353)

Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.

The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.

Note that this does not affect Python's regular C API.
(cherry picked from commit d16856960e33bc5f64fc5b842f132058becafa37)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 years agobpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
Miss Islington (bot) [Tue, 25 May 2021 10:56:37 +0000 (03:56 -0700)] 
bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)

(cherry picked from commit 63f17c252ab1b9357c5f022296213c42d9629458)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agobpo-44151: Various grammar, word order, and markup fixes (GH-26344) (GH-26345)
Miss Islington (bot) [Tue, 25 May 2021 06:23:10 +0000 (23:23 -0700)] 
bpo-44151: Various grammar, word order, and markup fixes (GH-26344) (GH-26345)

4 years agobpo-43109: Fix --with-lto configure option on macOS (GH-26341)
Miss Islington (bot) [Tue, 25 May 2021 04:18:53 +0000 (21:18 -0700)] 
bpo-43109: Fix --with-lto configure option on macOS (GH-26341)

Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.
(cherry picked from commit 59acfd4a09df1c141dac7845eed008af8970fce7)

Co-authored-by: Ned Deily <nad@python.org>
4 years agobpo-44151: linear_regression() minor API improvements (GH-26199) (GH-26338)
Miss Islington (bot) [Tue, 25 May 2021 01:11:12 +0000 (18:11 -0700)] 
bpo-44151: linear_regression() minor API improvements (GH-26199) (GH-26338)

4 years agobpo-41282: Fix broken `make install` (GH-26329)
Miss Islington (bot) [Mon, 24 May 2021 23:13:19 +0000 (16:13 -0700)] 
bpo-41282: Fix broken `make install` (GH-26329)

A previous commit broke a check in sysconfig when building cpython itself.
This caused builds of the standard library modules to search a wrong
location (the installed location rather than the source directory) for
header files with the net effect that a ``make install``
incorrectly caused all extension modules to be rebuilt again and
with incorrect include file paths.

When building Python, we need two distinct "include" directories:
- source .h files
- install target for .h files

Note that this doesn't matter except when building Python from source.

Historically:
- source .h files were in the distutils scheme under 'include'
- the install directory was in the distutils.command.install scheme
    under 'headers'

GH-24549 merged these; sysconfig is now the single source of truth and
distutils is derived from it.

This commit introduces a "secret" scheme path, 'headers', which contains
the install target. It is only present when building Python.
The distutils code uses it if present, and falls back to 'include'.

Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit 563bd5a4dcc6a26e47966cb66db64859902bce76)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 years agobpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH...
Miss Islington (bot) [Mon, 24 May 2021 17:30:05 +0000 (10:30 -0700)] 
bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317)

(cherry picked from commit 7148293d96843ca868961313b00361504ec0c242)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
4 years agoFix typo in whatsnew/3.10.rst (GH-26310) (GH-26323)
Miss Islington (bot) [Sun, 23 May 2021 22:12:13 +0000 (15:12 -0700)] 
Fix typo in whatsnew/3.10.rst (GH-26310) (GH-26323)

(cherry picked from commit 3ad101b3175c102e252161a1b8b928e694de8c94)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
4 years agobpo-43207: InspectLoader.is_package is not an abstract method (GH-24517)
Miss Islington (bot) [Sun, 23 May 2021 19:37:16 +0000 (12:37 -0700)] 
bpo-43207: InspectLoader.is_package is not an abstract method (GH-24517)

Making the description of `InspectLoader.is_package` aligned with the current implementation.

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

Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
4 years agobpo-44210: make importlib.metadata._meta.PackageMetadata public (GH-26299)
Miss Islington (bot) [Sun, 23 May 2021 19:29:17 +0000 (12:29 -0700)] 
bpo-44210: make importlib.metadata._meta.PackageMetadata public (GH-26299)

Signed-off-by: Filipe Laíns <lains@riseup.net>
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit df7eeacd83f531dd67cec7bc483dec6dce17ddbd)

Co-authored-by: Filipe Laíns <lains@riseup.net>
4 years agobpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298) (GH-26313)
Miss Islington (bot) [Sat, 22 May 2021 22:23:26 +0000 (15:23 -0700)] 
bpo-44201: Avoid side effects of "invalid_*" rules in the REPL (GH-26298) (GH-26313)

When the parser does a second pass to check for errors, these rules can
have some small side-effects as they may advance the parser more than
the point reached in the first pass. This can cause the tokenizer to ask
for extra tokens in interactive mode causing the tokenizer to show the
prompt instead of failing instantly.

To avoid this, add a new mode to the tokenizer that is activated in the
second pass and deactivates asking for new tokens when the interactive
line is finished. As the parsing should have reached the last line in
the first pass, the second pass should not need to ask for more tokens.

(cherry picked from commit bd7476dae337e905e7b1bbf33ddb96cc270fdc84)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309) (GH-26311)
Miss Islington (bot) [Sat, 22 May 2021 22:23:03 +0000 (15:23 -0700)] 
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309) (GH-26311)

Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 2a1e6698b10a7b58c6ac66429de0f51cb739da35)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
4 years agoRemove duplicate words in docs. (GH-26167) (GH-26296)
Miss Islington (bot) [Sat, 22 May 2021 20:55:17 +0000 (13:55 -0700)] 
Remove duplicate words in docs. (GH-26167) (GH-26296)

(cherry picked from commit b06ed1d883cd79c920c514d8a1f4643cf93dc5e0)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
4 years agobpo-44184: Fix subtype_dealloc() for freed type (GH-26274) (GH-26290)
Miss Islington (bot) [Fri, 21 May 2021 22:50:11 +0000 (15:50 -0700)] 
bpo-44184: Fix subtype_dealloc() for freed type (GH-26274) (GH-26290)

Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.

Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.

_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069eb08494d089bf24e43547fbc482ed699b8)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoSpecify Python Cookbook edition for reference (GH-26301) (#26302)
Miss Islington (bot) [Fri, 21 May 2021 22:48:56 +0000 (15:48 -0700)] 
Specify Python Cookbook edition for reference (GH-26301) (#26302)

(cherry picked from commit 604cd71e501b3bb1ede2b8abc797643fc2e9129c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 years agobpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)
Miss Islington (bot) [Fri, 21 May 2021 18:20:43 +0000 (11:20 -0700)] 
bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283)

The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).

We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.
(cherry picked from commit c878a9796841c1f4726e6dd5ac49a478af4c8504)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
4 years agobpo-43927: Change 'IOError' to 'OSError' (GH-26289)
Miss Islington (bot) [Fri, 21 May 2021 18:15:36 +0000 (11:15 -0700)] 
bpo-43927: Change 'IOError' to 'OSError' (GH-26289)

This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
(cherry picked from commit 2f47d8dcc735234bf9c7f92fbdacd8c5a6ee7761)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>