Commit graph

110136 commits

Author SHA1 Message Date
Miss Islington (bot)
3f4d801bf9
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 a46c220edc)

Co-authored-by: stratakis <cstratak@redhat.com>

Co-authored-by: stratakis <cstratak@redhat.com>
2021-06-04 19:38:02 +01:00
Pablo Galindo
e53f72a1b4
[3.10] bpo-44305: Improve syntax error for try blocks without except or finally (GH-26523) (GH-26524)
(cherry picked from commit b250f89bb7)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-04 00:11:43 +01:00
Pablo Galindo
3283bf4519
[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>
2021-06-03 22:22:28 +01:00
Miss Islington (bot)
976598d36b
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 f3491242e4)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
2021-06-03 13:27:00 -07:00
Miss Islington (bot)
d2ab15f537
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 ea0210fa8c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-03 22:15:15 +02:00
Mark Shannon
cea0585b79
[3.10] bpo-44298: Backport #26513 to 3.10 (#26516)
* Backport 937cebc93 to 3.10

* Update importlib
2021-06-03 19:57:31 +01:00
Erlend Egeberg Aasland
84d80f5f30
[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 fffa0f92ad)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-03 18:38:09 +02:00
Miss Islington (bot)
41317801a9
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 4846ea95d1)

Co-authored-by: Wm. Keith van der Meulen <keith@wkeithvan.com>
2021-06-02 21:05:41 -07:00
Miss Islington (bot)
98e5a7975d
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 e60ab843cb)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-06-02 21:04:20 -07:00
Miss Islington (bot)
9c89d62073
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 adef445dc3)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-06-03 02:14:41 +02:00
Miss Islington (bot)
0e9af8cae3
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 bdb56902a3)

Co-authored-by: stratakis <cstratak@redhat.com>
2021-06-02 16:50:38 -07:00
Miss Islington (bot)
e5e93e6145
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 320eaa7f42)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-02 16:48:40 -07:00
Irit Katriel
6563ea5c60
[3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480)
(cherry picked from commit 87272b70f1)

Co-authored-by: MapleCCC <littlelittlemaple@gmail.com>
2021-06-01 22:58:06 +01:00
Miss Islington (bot)
d0991e2db3
bpo-44246: Remove note about access by index now that a compatibility shim is offered. (GH-26472) (#26473)
(cherry picked from commit 78d9a9b190)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-31 18:29:08 -04:00
Miss Islington (bot)
7207203e1d
[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 c34ed08d97)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-31 09:41:55 -07:00
Miss Islington (bot)
d1480ad2f5
bpo-44246: Entry points performance improvements. (GH-26467)
From importlib_metadata 4.3.1.
(cherry picked from commit 410b70d39d)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-31 09:12:32 -07:00
Pablo Galindo
3f592c3665
Post 3.10.0b2 2021-05-31 12:58:35 +01:00
Pablo Galindo
317314165a
Python 3.10.0b2 2021-05-31 12:30:34 +01:00
Miss Islington (bot)
7fe9cad606
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 142e5c5445)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-31 12:25:47 +01:00
Miss Islington (bot)
f097d2302b
bpo-42972: Fully implement GC protocol for xxlimited (GH-26451) (GH-26460)
(cherry picked from commit 4b20f2574d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2021-05-31 12:23:13 +01:00
Miss Islington (bot)
ff359d735f
bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)
(cherry picked from commit d1124b09e8)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-31 11:12:27 +02:00
Miss Islington (bot)
d338ce0796
bpo-42085: [docs] Add versionadded for am_send in type object documentation (GH-25465) (GH-26453)
(cherry picked from commit 0b11c429c7)

Co-authored-by: Martmists <mail@martmists.com>
2021-05-29 21:38:00 +01:00
Miss Islington (bot)
d8ce746e7c
bpo-44263: Mention PyType_Ready in the gc protocol warning (GH-26445) (#26446)
(cherry picked from commit 43cf7c864a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-29 18:49:16 +01:00
Miss Islington (bot)
addd32986f
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 af5a324843)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-29 03:34:57 -04:00
Miss Islington (bot)
11049bece1
bpo-44263: Better explain the GC contract for PyType_FromSpecWithBases (GH-26442) (GH-26443)
(cherry picked from commit 8b55bc3f93)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-29 04:21:26 +01:00
Miss Islington (bot)
1757ddd227
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26436)
(cherry picked from commit 7e6f237569)

Co-authored-by: Sean Grady <vedicmonk@gmail.com>

Co-authored-by: Sean Grady <vedicmonk@gmail.com>
2021-05-28 21:07:27 -04:00
Miss Islington (bot)
a7aa105702
bpo-44252: Correctly implement gc support for SSLError objects (GH-26439) (GH-26441)
(cherry picked from commit 8b4312b909)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-05-29 00:47:36 +01:00
Miss Islington (bot)
7261b29fa9
bpo-44249: Fix 3 README.rst typos (GH-26385)
(cherry picked from commit acac6c71ff)

Co-authored-by: Ayush Parikh <ayushparikh332@gmail.com>
2021-05-28 16:03:10 -04:00
Ken Jin
0d39951632
[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
2021-05-28 18:47:15 +01:00
Miss Islington (bot)
1c0106ca8c
bpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)
(cherry picked from commit 3f8d332527)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-28 07:26:07 -07:00
Miss Islington (bot)
eb8ab04dd7
bpo-42972: Fully implement GC protocol for functools keywrapper and partial types (GH-26363) (GH-26424)
(cherry picked from commit 8994e9c2cd)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-28 11:08:01 +02:00
Miss Islington (bot)
35be1f3602
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
It is internal use only type.
(cherry picked from commit 28be3191a9)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2021-05-28 16:10:45 +09:00
Miss Islington (bot)
448abe8d8b
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 4e2e5c1c4f)
2021-05-28 09:39:36 +03:00
Miss Islington (bot)
da9e0cb4de
bpo-42972: Fully implement GC protocol for re types (GH-26368) (GH-26414)
(cherry picked from commit fba42d1188)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-28 02:23:37 +02:00
Miss Islington (bot)
59f9594f90
[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 28f12c9f4f)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-27 16:57:04 -07:00
Miss Islington (bot)
d1c732912e
bpo-42972: Fully support GC protocol for _operator heap types (GH-26371) (GH-26413)
(cherry picked from commit f4b70c22c8)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 23:49:43 +02:00
Miss Islington (bot)
0574b0686d
bpo-43667: Add news fragment for Solaris changes (GH-26405) (GH-26409)
(cherry picked from commit 164a4f46d1)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-05-27 19:23:43 +02:00
Miss Islington (bot)
da8097aaf5
bpo-42972: Fully support GC for mmap heap types (GH-26373)
(cherry picked from commit 318adeba78)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 09:43:56 -07:00
Miss Islington (bot)
e73b3b1cd4
bpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372) (GH-26406)
(cherry picked from commit 4d7f8f9f7f)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 18:25:50 +02:00
Miss Islington (bot)
ea47a8a71a
bpo-42972: Fully implement GC protocol for ssl heap types (GH-26370) (GH-26399)
(cherry picked from commit dcb8786a98)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 18:25:22 +02:00
Miss Islington (bot)
0bf0500baa
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 59af59c2df)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-27 08:26:15 -07:00
Miss Islington (bot)
5e6219b8fa
bpo-41611: IDLE: fix freezing on completion on macOS (GH-26400)
(cherry picked from commit abc4bd5db9)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-27 07:53:53 -07:00
Miss Islington (bot)
09696a3e21
[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 8450e8a81f)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-05-27 06:50:58 -07:00
Miss Islington (bot)
4431922f92
[3.10] bpo-42972: Fully support GC for hashlib heap types (GH-26374) (GH-26398)
(cherry picked from commit 6ef5ba391d)


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

Automerge-Triggered-By: GH:tiran
2021-05-27 01:10:39 -07:00
Miss Islington (bot)
5d569ef9dd
[3.10] bpo-44241: Incorporate changes from importlib_metadata 4.1. (GH-26382) (GH-26395)
(cherry picked from commit 06ac3a4742)


Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Automerge-Triggered-By: GH:jaraco
2021-05-26 18:22:25 -07:00
Miss Islington (bot)
4115996342
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 3e7ee02327)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-27 01:13:17 +02:00
Miss Islington (bot)
150a8e8a3e
[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 d8fd8c8568)


Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

Automerge-Triggered-By: GH:gpshead
2021-05-26 15:19:42 -07:00
Miss Islington (bot)
97b4576f65
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 f6fbdb90ee)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-26 17:09:27 -04:00
Miss Islington (bot)
78a8428548
bpo-38693: importlib.metadata f-strings (GH-26383)
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit e6c815d2e3)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-26 12:11:41 -07:00
Miss Islington (bot)
1261941e02
bpo-41147: [doc] contextlib.redirect_stdout() provides the new stream as context var (GH-21199) (GH-26379)
(cherry picked from commit 46db39d7bd)

Co-authored-by: Peter Law <PeterJCLaw@gmail.com>
2021-05-26 15:34:22 +01:00