Commit Graph

24695 Commits

Author SHA1 Message Date
Pablo Galindo a8c418d5ed
[3.10] bpo-44368: Improve syntax errors with invalid as pattern targets (GH-26632) (GH-26792)
(cherry picked from commit 05073036dc)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-18 22:15:57 +01:00
Miss Islington (bot) bf55a799e0
bpo-44451: Reset DeprecationWarning filters in test_importlib.test_entry_points_by_index (GH-26784)
This avoids the following error if DeprecationWarnings are ignored.

    ======================================================================
    ERROR: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests)
    Prior versions of Distribution.entry_points would return a
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index
        expected = next(iter(caught))
    StopIteration
    ----------------------------------------------------------------------
    Ran 1402 tests in 2.125s
    FAILED (errors=1, skipped=18, expected failures=1)
(cherry picked from commit df1502e47f)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2021-06-18 13:30:53 -07:00
Miss Islington (bot) eb0a6801be
bpo-43024: improve signature (in help, etc) for functions taking sent… (GH-24331) (GH-26773)
…inel defaults
(cherry picked from commit f73377d57c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2021-06-17 17:41:46 +01:00
Pablo Galindo 865714a117
Python 3.10.0b3 2021-06-17 11:29:18 +01:00
Miss Islington (bot) 84ce737f73
bpo-44392: Add Py_GenericAlias to C API docs (GH-26724)
Also fix stable ABI type definitions
(cherry picked from commit 6773c3eaa7)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-06-16 07:34:45 -07:00
Miss Islington (bot) 7fd40101b7
bpo-43795: Don't list private names in the limited API (GH-26740)
* Remove struct _node from the stable ABI list

This struct was removed along with the old parser in Python 3.9 (PEP 617)

* Stable ABI list: Use the public name "PyFrameObject" rather than "_frame"

* Ensure limited API doesn't contain private names

Names prefixed by an underscore are private by definition.

* Add a blurb
(cherry picked from commit 7cad9cb51b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-06-16 02:53:12 -07:00
Ethan Furman 41c2a4a727
[3.10] bpo-44342: [Enum] improve test, add andrei kulakov to ACKS (GH-26726)
* [3.10] [Enum] improve test, add andrei kulakov to ACKS (GH-26726).
(cherry picked from commit cb2014f207)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-15 18:50:59 -07:00
Miss Islington (bot) c3b776f83b
bpo-44422: Fix threading.enumerate() reentrant call (GH-26727)
The threading.enumerate() function now uses a reentrant lock to
prevent a hang on reentrant call.
(cherry picked from commit 243fd01047)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-15 07:34:42 -07:00
Miss Islington (bot) e30fe27dab
bpo-42972: _thread.RLock implements the GH protocol (GH-26734)
The _thread.RLock type now fully implement the GC protocol: add a
traverse function and the Py_TPFLAGS_HAVE_GC flag.
(cherry picked from commit 1cd3d859a4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-15 06:29:44 -07:00
Miss Islington (bot) 2f2ea96c44
bpo-44351: Restore back parse_makefile in distutils.sysconfig (GH-26637) (GH-26673)
The function uses distutils.text_file.TextFile and therefore
behaves differently than _parse_makefile in sysconfig.
(cherry picked from commit fc98266ff6)

Co-authored-by: Lumír 'Frenzy' Balhar <lbalhar@redhat.com>
2021-06-15 14:36:45 +02:00
Miss Islington (bot) 133cddf76e
bpo-44409: Fix error location in tokenizer errors that happen during initialization (GH-26712)
(cherry picked from commit 507ed6fa1d)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-14 10:07:52 -07:00
Miss Islington (bot) fc310cb862
bpo-38291: Remove mention of typing.io and typing.re again (GH-26113)
They were originally removed in GH-10173 per bpo-35089, but then
readded in GH-21574. Cf. bpo-38291 for decision to remove.
(cherry picked from commit 8a76683cfb)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-06-14 08:06:33 -07:00
Miss Islington (bot) 4becc569a6
[3.10] bpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700) (GH-26705)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit bf527277d4)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2021-06-13 05:07:00 -07:00
Miss Islington (bot) d03f342a83
bpo-44396: Update multi-line-start location when reallocating tokenizer buffers (GH-26676) (GH-26695)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit a342cc5891)
2021-06-12 21:27:02 +01:00
Miss Islington (bot) b441e99d89
bpo-40128: Fix IDLE autocomplete on macOS (GH-26672)
In particular, when running with tk8.6.8, as in PSF 3.9.

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

Co-authored-by: Kaustubh J <kaustubhkj@gmail.com>
2021-06-11 19:24:16 -04:00
Miss Islington (bot) 42612db107
bpo-44381: Windows build now allows enabling control flow guard (GH-26645)
(cherry picked from commit 5af56c6f2a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2021-06-11 14:21:12 -07:00
Miss Islington (bot) 9c0180ae77
bpo-43318: Fix a bug where pdb does not always echo cleared breakpoints (GH-24646) (GH-26674)
(cherry picked from commit 4cb6ba1432)

Co-authored-by: huzhaojie <hu.zj@foxmail.com>
2021-06-11 17:18:19 +01:00
Miss Islington (bot) e6d28a1a6a
bpo-44378: Fix a compiler warning in Py_IS_TYPE() (GH-26644)
Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
(cherry picked from commit 304dfec8d3)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-06-11 01:57:16 -07:00
Miss Islington (bot) d7930fb720
bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e26014f1c4)

Co-authored-by: Christian Heimes <christian@python.org>
2021-06-11 00:36:17 -07:00
Miss Islington (bot) b613132861
bpo-44342: [Enum] changed pickling from by-value to by-name (GH-26658) (GH-26660)
by-value lookups could fail on complex enums, necessitating a check for
__reduce__ and possibly sabotaging the final enum;

by-name lookups should never fail, and sabotaging is no longer necessary
for class-based enum creation.
(cherry picked from commit 62f1d2b3d7)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 16:37:27 -07:00
Miss Islington (bot) 01286017c3
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 8a4f0850d7)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 15:01:03 -07:00
Miss Islington (bot) e3bc32fc1a
bpo-37022: Fix bug where pdb's do_p/do_pp commands swallow exceptions from repr (GH-18180) (GH-26650)
(cherry picked from commit 6544b2532d)

Co-authored-by: Daniel Hahler <git@thequod.de>
2021-06-10 21:56:57 +01:00
Miss Islington (bot) 540ebc4a88
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 42d5a4fc3b)

Co-authored-by: Mark Roseman <mark@markroseman.com>
2021-06-10 16:16:38 -04:00
Ethan Furman 749648609d
[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 eea8148b7d)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-10 07:24:20 -07:00
Miss Islington (bot) 0895e62c9b
bpo-44363: Get test_capi passing with address sanitizer (GH-26639)
(cherry picked from commit 31aa0dbff4)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2021-06-10 05:02:22 -07:00
Miss Islington (bot) 664ae29e6f
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 275d5f7957)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-09 13:37:56 -07:00
Miss Islington (bot) c0496093e5
bpo-44349: Fix edge case when displaying text from files with encoding in syntax errors (GH-26611) (GH-26616)
(cherry picked from commit 9fd21f649d)

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

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-09 01:29:21 +01:00
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) 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) 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) 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) 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
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
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
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) 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
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 317314165a
Python 3.10.0b2 2021-05-31 12:30:34 +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) 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) 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) 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) 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) 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