Commit Graph

110104 Commits

Author SHA1 Message Date
Miss Islington (bot) 139c5778c2
bpo-44426: Fix use of the C keyword 'default' as a variable name (GH-26798) (GH-26804)
(cherry picked from commit 291848195f)
2021-06-19 16:16:13 +01:00
Miss Islington (bot) c6cd2ecdb6
[3.10] bpo-38820: Test with OpenSSL 3.0.0-beta1 (GH-26769) (GH-26799)
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 44fb551499)


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

Automerge-Triggered-By: GH:tiran
2021-06-19 03:44:37 -07:00
Miss Islington (bot) 3cb70ab2fb
Remove dubious suggestion (GH-26789) (#26797) 2021-06-18 23:27:47 -05:00
Ethan Furman 1b4addf3cb
[3.10] bpo-43945: [Enum] reduce scope of new format() behavior (GH-26752)
* [Enum] reduce scope of new format behavior

Instead of treating all Enums the same for format(), only user mixed-in
enums will be affected.  In other words, IntEnum and IntFlag will not be
changing the format() behavior, due to the requirement that they be
drop-in replacements of existing integer constants.

If a user creates their own integer-based enum, then the new behavior
will apply:

    class Grades(int, Enum):
        A = 5
        B = 4
        C = 3
        D = 2
        F = 0

Now:  format(Grades.B)  -> DeprecationWarning and '4'
3.12:                   -> no warning, and 'B'.

(cherry picked from commit f60b07ab6c)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-18 14:25:42 -07:00
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) bba726710b
[3.10] Reorganize the pattern matching suite (GH-26661) (GH-26787)
(cherry picked from commit c106cf31f8)


Co-authored-by: Brandt Bucher <brandt@python.org>

Automerge-Triggered-By: GH:brandtbucher
2021-06-18 10:48:07 -07:00
Miss Islington (bot) 77eaf14d27
bpo-44310: Add a FAQ entry for caching method calls (GH-26731) (GH-26777) 2021-06-17 16:14:36 -05: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 4f71b0199b
Post 3.10.0b3 2021-06-17 13:20:47 +01:00
Pablo Galindo 865714a117
Python 3.10.0b3 2021-06-17 11:29:18 +01:00
Miss Islington (bot) 7297d74251
bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)
* Make functools types immutable

* Multibyte codec types are now immutable

* pyexpat.xmlparser is now immutable

* array.arrayiterator is now immutable

* _thread types are now immutable

* _csv types are now immutable

* _queue.SimpleQueue is now immutable

* mmap.mmap is now immutable

* unicodedata.UCD is now immutable

* sqlite3 types are now immutable

* _lsprof.Profiler is now immutable

* _overlapped.Overlapped is now immutable

* _operator types are now immutable

* winapi__overlapped.Overlapped is now immutable

* _lzma types are now immutable

* _bz2 types are now immutable

* _dbm.dbm and _gdbm.gdbm are now immutable
(cherry picked from commit 00710e6346)

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

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-17 11:19:44 +01:00
Miss Islington (bot) 08f2b9dede
bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)
`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
(cherry picked from commit c544393b89)

Co-authored-by: Joe <nigelchiang@outlook.com>
2021-06-17 03:00:56 -07:00
Miss Islington (bot) c689e0a7e2
bpo-44426: Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'. (GH-26744) (GH-26760)
(cherry picked from commit 7247f6f433)
2021-06-16 20:13:37 +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) 0f99324f61
bpo-44342: [Enum] fix data type search (GH-26667)
In an inheritance chain of

  int -> my_int -> final_int

the data type is now final_int (not my_int)
(cherry picked from commit 3a7cccfd6c)

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

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-15 14:07:37 -07:00
Mark Dickinson 8d0b2ca493
[3.10] bpo-43475: Add what's new entry for NaN hash changes (GH-26725) (GH-26743)
(cherry picked from commit 1d10bf0bb9)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-06-15 20:13:10 +01:00
Miss Islington (bot) f6cf38c8e2
Fix a typo in _make_class_unpicklable() docstring (GH-26729)
(cherry picked from commit 689a84475e)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-06-15 11:25:07 -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) 809c3faa03
bpo-44310: Note that lru_cache keep references to both arguments and results (GH-26715) (GH-26716) 2021-06-14 08:43:48 -05:00
Miss Islington (bot) 2b57ad3f53
bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)
(cherry picked from commit 736ed6f7a9)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-06-13 17:24:11 -07:00
Miss Islington (bot) 128899d8b8
bpo-43475: Fix the Python implementation of hash of Decimal NaN (GH-26679)
(cherry picked from commit 9f1c5f6e8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-13 07:05:28 -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) f30f484e96
bpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)
(cherry picked from commit cb7230c7a7)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-06-13 03:29:33 -07:00
Mark Dickinson 929dd817b3
[3.10] Fix a potential reference-counting bug in long_pow (GH-26690) (GH-26703)
(cherry picked from commit 5924243199)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
2021-06-13 08:58:32 +01: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
Serhiy Storchaka c43317d41e
[3.10] Add more const modifiers. (GH-26691). (GH-26692)
(cherry picked from commit be8b631b7a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-06-12 18:44:32 +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) 0a186b1ec1
bpo-44242: [Enum] improve error messages (GH-26669)
(cherry picked from commit c956734d7a)

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

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2021-06-11 02:58:57 -07: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) 3e137426de
bpo-44385: Remove unused grammar rules (GH-26655)
Automerge-Triggered-By: GH:lysnikolaou
(cherry picked from commit e7b4644607)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2021-06-10 15:31:09 -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) f807a4fad4
bpo-44368: Ensure we don't raise incorrect custom syntax errors with soft keywords (GH-26630)
(cherry picked from commit 457ce60fc7)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2021-06-09 14:45:43 -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) 33a7a24288
bpo-40468: Factor out class ExtPage in idlelib.configdialog (GH-26618)
(cherry picked from commit 5571cabf1b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-06-08 19:11:26 -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