| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
if inside parentheses. (GH-29767)
Backport of GH-29757
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit f9de97aae5fe9dafb58a8099171f4a09c449f4e8)
Co-authored-by: Zachary Ware <zach@python.org>
|
|
|
|
|
| |
(cherry picked from commit 457e6a6e96b5afad403a0bc892508a77beef4d33)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
|
|
|
|
|
|
|
|
| |
inconsistently required by CPython (GH-29170) (GH-29650)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
(cherry picked from commit be36e0634060c7d5dee8e8876fb888bbb53d992a)
Co-authored-by: Brett Cannon <brett@python.org>
|
|
|
|
|
|
|
|
| |
init=False (GH-29692)
Special handling is needed, because for non-slots dataclasses the instance attributes are not set: reading from a field just references the class's attribute of the same name, which contains the default value. But this doesn't work for classes using __slots__: they don't read the class's attribute. So in that case (and that case only), initialize the instance attribute. Handle this for both normal defaults, and for fields using default_factory.
(cherry picked from commit d3062f672c92855b7e9e962ad4bf1a67abd4589b)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit f7638dd0f90b2afd9295ee179119f4a29859953a)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-29646) (GH-29661)
(cherry picked from commit fdcc46d9554094994f78bedf6dc9220e5d5ee668)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
... To the Installation paths section of the sysconfig doc.
(cherry picked from commit 4575c01b750cd26377e803247c38d65dad15e26a)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 32959108f9c543e3cb9f2b68bbc782bddded6f42)
Co-authored-by: Arthur Milchior <arthur@milchior.fr>
|
|
|
|
|
|
|
| |
(GH-27857) (GH-29152)
(cherry picked from commit 2396fa6537d79554ac694dbd2b0b30eeb3476c80)
Co-authored-by: Florin Spătar <florin.spatar@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).
This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.
(cherry picked from commit df3e53d86b2ad67da9ac2b5a3f56257d1f394982)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
|
|
|
|
| |
None` (GH-29590) (GH-29602)
(cherry picked from commit 5d90c467c02ffefdb13c1abc83a171db1a99ffad)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(GH-29580)
(cherry picked from commit df4ae55e66e34ea8de6a34f0b104871ddaf35d53)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
flags are not provided (GH-29582) (GH-29586)
(cherry picked from commit da20d7401de97b425897d3069f71f77b039eb16f)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-29598)
If the string is ASCII only and doesn't need to escape characters,
write the whole string with a single write() syscall.
(cherry picked from commit b919d8105c4d77f00509b6d3ab2073f09db640de)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
|
|
|
|
|
|
|
|
|
| |
(GH-29564)
Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.
(cherry picked from commit 736684b1bb67369a2e95a9f621752deead44e7ef)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
|
|
|
|
|
|
| |
keywords in a call (GH-29413). (GH-29428)
(cherry picked from commit e2d65630f36712dbdbf7711520c985c526a5cc25)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
| |
test code (#26497)
|
|
|
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit ad43dc0b54994e7e7d06e3d4896ade188b36ee12)
|
|
|
|
|
|
| |
characters in the parser
(cherry picked from commit 25835c518aa7446f3680b62c1fb43827e0f190d9)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(cherry picked from commit 6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-23960) (GH-29542)
* [bpo-45772](): socket.socket should be a class instead of a function
Currently `socket.socket` is documented as a function, but it is really
a class (and thus has function-like usage to construct an object). This
correction would ensure that Python projects that are interlinking
Python's documentation can properly locate `socket.socket` as a type.
(cherry picked from commit 4c792f39e688b11c7c19e411ed4f76a7baa44638)
Co-authored-by: Hong Xu <hong@topbug.net>
Automerge-Triggered-By: GH:asvetlov
|
|
|
|
| |
(GH-29530)
|
| |
|
|
|
|
| |
EXTENDED_ARG before a no-arg opcode (GH-29480) (GH-29506)
|
| |
|
|
|
|
|
| |
(cherry picked from commit 91275207296c39e495fe118019a757c4ddefede8)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-29445)
so that
$ python -m json.tool foo.json foo.json
doesn't result in an empty foo.json.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 815dad42d53fc40a6dc057e067f4a8a885c3b858)
Co-authored-by: Chris Wesseling <chris.wesseling@protonmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-29426) (GH-29431)
(cherry picked from commit 71e8a3e76a32f5eabe20e7fa984f384ca9af6ec6)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
In order to fix a bug in the 3.9 branch in GH-29394, more tests were added to
``test_functools.py`` to ensure that ``singledispatchmethod`` still correctly
wrapped a target method, even if the target method had already been wrapped by
multiple other decorators. This PR brings the new tests into the 3.11 and 3.10
branches as well.
(cherry picked from commit 32f55d1a5de66f9a86964fc0655d7a006a9d90b9)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
| |
|
|
|
|
|
|
|
| |
``GenericAlias``/``__class_getitem__`` (GH-29387)
(cherry picked from commit e03e50377d6f8f212af60fed4ae405ebeb73237d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5a14929a6e4fab672e2f83a86773618e973b22a6)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e346f196819aeb02a8a94205ce3e1536c4c2f105)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
FileNotFoundError (GH-28824)
(cherry picked from commit a459a81530de700b3d3faeb827b22ed1c9985812)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
| |
(GH-29353) (GH-29362)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
| |
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-45516: add protocol description to the Traversable documentation
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Doc/library/importlib.rst
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* Update Lib/importlib/abc.py
* Update Doc/library/importlib.rst
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
(cherry picked from commit 4d03de3329ed8daa9c1107b1aedbb0fa280bddb6)
Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
|
|
|
|
|
|
| |
Literal[True, 2] is no longer equal to Literal[1, 2].
(cherry picked from commit 634984d7dbdd91e0a51a793eed4d870e139ae1e0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
memory error (GH-29171) (GH-29323)
(cherry picked from commit e2e62b3808691e15fa44b883270023e42dcad958)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
|
|
|
|
|
| |
The list of PEPs at the top of the documentation for the ``typing`` module has
become too long to be readable. This PR proposes presenting this
information in a more structured and readable way by adding a new "relevant
PEPs" section to the ``typing`` docs.
(cherry picked from commit 03db1bbfd2d3f5a343c293b2f0e09a1e962df7ea)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
| |
(cherry picked from commit 66e6b3dcd3bbab06feeff2cbaf8aade7b6223d6c)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
(GH-29226) (GH-29283)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 1fb968c07a76fb2d1ec8c14a0026f1d15828f4a5)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
| |
when using the Tk 8.6.11 provided by python.org macOS installers.
Patch by Marc Culler of the Tk project.
(cherry picked from commit be8318be05e1a874215fa75b8845ede74b2c69b6)
Co-authored-by: Ned Deily <nad@python.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The doctest module raised an error if a docstring contained an example that
attempted to access a classmethod property. (Stacking '@classmethod' on top of
`@property` has been supported since Python 3.9; see
https://docs.python.org/3/howto/descriptor.htmlGH-class-methods.)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit b1302abcc8a4be5f39b4d60a1ce28032b77655b3)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Use types.GenericAlias in inspect.formatannotation to correctly add
type arguments of builtin types to the string representation of
Signatures.
Co-authored-by: Martin Rückl <martin.rueckl@codecentric.de>
(cherry picked from commit d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899)
Co-authored-by: Martin Rueckl <enigma@nbubu.de>
|
|
|
|
|
|
|
|
| |
Refs https://github.com/python/cpython/pull/29147
Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit 07236d562e59c6650227be18fa6ffc66b18d4741)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It used to be like this:
<img width="1232" alt="Снимок экрана 2021-10-22 в 23 07 40" src="https://user-images.githubusercontent.com/4660275/138516608-fef6ec01-a96a-40f4-81ef-52265b0f536b.png">
Quick `grep` tells that it is just used in one place under `Py_DEBUG`: https://github.com/python/cpython/blame/f6e8b80d20159596cf641305bad3a833bedd2f4f/Parser/tokenizer.cGH-L1047-L1051
<img width="752" alt="Снимок экрана 2021-10-22 в 23 08 09" src="https://user-images.githubusercontent.com/4660275/138516684-ea503136-1e92-48a5-95bb-419e190d5866.png">
I am not sure, but it also looks like a private thing, it should not affect other users.
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 4bc5473a42c5eae0928430930b897209492e849d)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
|
|
|
|
| |
* Use Py_EnterRecursiveCall() in issubclass()
Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
(cherry picked from commit 423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|