Commit Graph

110104 Commits

Author SHA1 Message Date
Miss Islington (bot) eeefa7f6c0
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 2ea6d89028)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-08 16:52:23 -07:00
Miss Islington (bot) 2cfe0e7061
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 ab36b9f834)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-08 13:01:23 -07:00
Miss Islington (bot) 2a8d7122e0
bpo-44335: Ensure the tokenizer doesn't go into Python with the error set (GH-26608)
(cherry picked from commit bafe0aade5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-08 12:25:17 -07:00
Batuhan Taskaya bd6f0d3ead
[3.10] bpo-11105: reduce the recursion limit for tests. (GH-26607)
(cherry picked from commit e58d762c1f)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
2021-06-08 20:39:30 +03:00
Miss Islington (bot) 75185561a9
bpo-43795: Note Stable ABI PEP in What's New (GH-26479) (GH-26603)
(cherry picked from commit 257e400a19)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-08 18:00:10 +02:00
Miss Islington (bot) 933b5b6359
bpo-44335: Fix a regression when identifying invalid characters in syntax errors (GH-26589)
(cherry picked from commit d334c73b56)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-08 04:46:56 -07:00
Miss Islington (bot) d80f4265db
fix: use unambiguous punction in 'invalid escape sequence' message (GH-26582)
(cherry picked from commit ffd87b7093)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2021-06-07 17:36:19 -07:00
Miss Islington (bot) 8524e32d77
Use absolute imports in IDLE tests (GH-26581)
Relative imports do not work when running test_x as main.
(cherry picked from commit e915db3e9e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-07 15:15:31 -07:00
Miss Islington (bot) 2af690fdb2
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 67dfa6f2a5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-06 22:09:34 -04:00
Miss Islington (bot) b5cedd0980
bpo-44227: Update bisect docstrings (GH-26548) (GH-26563) 2021-06-06 12:52:42 -07:00
Miss Islington (bot) 3b87137176
bpo-44320: Fix markup for W3C C14N test suite (GH-26556)
(cherry picked from commit 71be461704)

Co-authored-by: NAKAMURA Osamu <osamu0329nakamura@users.noreply.github.com>
2021-06-05 19:56:47 -07:00
Miss Islington (bot) 317e9ed436
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551) (GH_26552)
(cherry picked from commit 6e3b7cf3af)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-06 00:13:27 +01:00
Miss Islington (bot) ad2f3b74b5
bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement objects (GH-26545)
(cherry picked from commit fa106a685c)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-04 20:09:40 -07:00
Miss Islington (bot) 4642caf232
Update nonstandard variable names (GH-26540) (GH-26546) 2021-06-04 19:38:30 -07:00
Miss Islington (bot) 5442cfa67b
Improve speed and accuracy for correlation() (GH-26135) (GH-26151) 2021-06-04 18:49:29 -07:00
Miss Islington (bot) 0d441d2e70
bpo-38323: Skip SubprocessMultiLoopWatcherTest as they can hang the test suite (GH-26542) (GH-26544)
(cherry picked from commit f171877ebe)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-05 01:05:54 +01:00
Miss Islington (bot) 1065ba66b5
bpo-44279: revert 'exceptions are raised' back to 'exceptions occur' (GH-26492) (GH-26538)
(cherry picked from commit dda9ecbfec)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-06-04 23:10:07 +01:00
Miss Islington (bot) 067d6d4657
bpo-43853: Handle sqlite3_value_text() errors (GH-25422)
(cherry picked from commit 006fd869e4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-04 11:54:39 -07:00
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