Commit Graph

24221 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) 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
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) 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
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) 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) 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) 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
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) 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) 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) 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) 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) 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
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) 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
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) 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) 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) 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) 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) 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) 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
Miss Islington (bot) 2442b342bc
Point to recent link to PyFLTK (GH-26315) (GH-26366)
(cherry picked from commit ee3d78ef73)

Co-authored-by: Mark <mark@qtrac.eu>

Co-authored-by: Mark <mark@qtrac.eu>
2021-05-25 18:04:26 -03:00
Miss Islington (bot) 05f8ad0c74
bpo-20408: Fix memoryview() signature in docs (GH-24431)
(cherry picked from commit d18e5dae91)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-25 17:30:00 +03:00
Miss Islington (bot) 68b9c20a98
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 d16856960e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-05-25 12:59:10 +01:00
Miss Islington (bot) ddc503c8d2
bpo-43109: configure doc: LTO requires "ar" on macOS (GH-26349)
(cherry picked from commit 63f17c252a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2021-05-25 03:56:37 -07:00
Miss Islington (bot) a6825197e9
bpo-44151: Various grammar, word order, and markup fixes (GH-26344) (GH-26345) 2021-05-24 23:23:10 -07:00
Miss Islington (bot) 86779878df
bpo-44151: linear_regression() minor API improvements (GH-26199) (GH-26338) 2021-05-24 18:11:12 -07:00
Miss Islington (bot) d309bcc9e3
bpo-44195: Use 'TraversableResources' in the docs to match the implementation. (GH-26317)
(cherry picked from commit 7148293d96)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-05-24 10:30:05 -07:00
Miss Islington (bot) 04a4934a84
Fix typo in whatsnew/3.10.rst (GH-26310) (GH-26323)
(cherry picked from commit 3ad101b317)

Co-authored-by: Tushar Sadhwani <tushar.sadhwani000@gmail.com>
2021-05-23 23:12:13 +01:00
Miss Islington (bot) 069bc4f5b4
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 8b9310d902)

Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
2021-05-23 12:37:16 -07:00
Miss Islington (bot) 413df57968
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 2a1e6698b1)

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

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-22 23:23:03 +01:00
Miss Islington (bot) 37da1f09a2
Remove duplicate words in docs. (GH-26167) (GH-26296)
(cherry picked from commit b06ed1d883)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-05-22 21:55:17 +01:00
Miss Islington (bot) 856958d0e7
Specify Python Cookbook edition for reference (GH-26301) (#26302)
(cherry picked from commit 604cd71e50)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 23:48:56 +01:00
Miss Islington (bot) 150bc1f4aa
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 2f47d8dcc7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-05-21 11:15:36 -07:00
Miss Islington (bot) 1886b8496b
[doc] Fix indentation in inspect documentation (GH-24846) (GH-26287)
(cherry picked from commit 642fdfdc04)

Co-authored-by: Numerlor <25886452+Numerlor@users.noreply.github.com>
2021-05-21 18:06:41 +01:00
Senthil Kumaran f14015adf5
[3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26275)
* [3.10] bpo-43882 - Mention urllib.parse changes in Whats new section.

* escape the \n chars, ReSTify :rfc:, urllib.parse is a :mod:

* minor formatting.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-05-21 05:29:24 -07:00
Miss Islington (bot) 9d16b1ae58
[doc] Fix typo in asyncio-eventloop documentation (GH-22311) (GH-26256)
(cherry picked from commit b66a03a491)

Co-authored-by: Bruno <brunogeninatti@gmail.com>
2021-05-19 22:19:53 +01:00
Miss Islington (bot) 65dede60fa
bpo-40975: [doc] Identify AsyncExitStack.enter_async_context()/aclose() as coroutine methods (GH-20870) (GH-26254)
(cherry picked from commit c054e8f78f)

Co-authored-by: naglis <naglis@users.noreply.github.com>
2021-05-19 21:37:32 +01:00
Miss Islington (bot) 3357604db9
bpo-44010: IDLE: colorize pattern-matching soft keywords (GH-25851)
(cherry picked from commit 60d343a816)

Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
2021-05-19 02:44:14 -07:00
Miss Islington (bot) 5f2afff1dd
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26218)
(cherry picked from commit 4fdcc39f71)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-05-19 09:59:23 +01:00
Miss Islington (bot) e57bef1b73
bpo-44106: Purge unused sqlite3 doc includes (GH-26234)
(cherry picked from commit d798acc873)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-05-19 11:17:19 +03:00