]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
12 months ago[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-… (#125596)
Kirill Podoprigora [Wed, 16 Oct 2024 15:31:00 +0000 (18:31 +0300)] 
[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-… (#125596)

[3.13] CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (GH-125592)

(cherry picked from commit d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c)

12 months ago[3.13] gh-125444: Fix illegal instruction for older Arm architectures (GH-125574...
Miss Islington (bot) [Wed, 16 Oct 2024 14:48:40 +0000 (16:48 +0200)] 
[3.13] gh-125444: Fix illegal instruction for older Arm architectures (GH-125574) (GH-125595)

On Arm v5 it is not possible to get the thread ID via c13 register
hence the illegal instruction. The c13 register started to provide
thread ID since Arm v6K architecture variant. Other variants of
Arm v6 (T2, Z and base) don’t provide the thread ID via c13.
For the sake of simplicity we group v5 and v6 together and
consider that instructions for Arm v7 only.
(cherry picked from commit feda9aa73ab95d17a291db22c416146f8e70edeb)

Co-authored-by: Diego Russo <diego.russo@arm.com>
12 months ago[3.13] gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compre...
Miss Islington (bot) [Wed, 16 Oct 2024 11:33:47 +0000 (13:33 +0200)] 
[3.13] gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes (GH-125042) (#125527)

(cherry picked from commit cc5a225cdc2a5d4e035dd08d59cef39182c10a6c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.13] gh-125243: Fix ZoneInfo data race in free threading build (GH-125281) (gh...
Miss Islington (bot) [Tue, 15 Oct 2024 21:02:32 +0000 (23:02 +0200)] 
[3.13] gh-125243: Fix ZoneInfo data race in free threading build (GH-125281) (gh-125414)

Lock `ZoneInfoType` to protect accesses to `ZONEINFO_STRONG_CACHE`.
Refactor the `tp_new` handler to use Argument Clinic so that we can just
use `@critical_section` annotations on the relevant functions.

Also use `PyDict_SetDefaultRef` instead of `PyDict_SetDefault` when
inserting into the `TIMEDELTA_CACHE`.
(cherry picked from commit f1d33dbddd3496b062e1fbe024fb6d7b023a35f5)

Co-authored-by: Sam Gross <colesbury@gmail.com>
12 months ago[3.13] gh-58956: Set f_trace on frames with breakpoints after setting a new breakpoin...
Miss Islington (bot) [Tue, 15 Oct 2024 20:20:16 +0000 (22:20 +0200)] 
[3.13] gh-58956: Set f_trace on frames with breakpoints after setting a new breakpoint (GH-124454) (#125548)

gh-58956: Set f_trace on frames with breakpoints after setting a new breakpoint (GH-124454)
(cherry picked from commit 12eaadc0ad33411bb02945d700b6ed7e758bb188)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
12 months ago[3.13] gh-125115: Pass unknown pdb command line args to script instead of fail (GH...
Miss Islington (bot) [Tue, 15 Oct 2024 19:55:38 +0000 (21:55 +0200)] 
[3.13] gh-125115: Pass unknown pdb command line args to script instead of fail (GH-125424) (#125547)

gh-125115: Pass unknown pdb command line args to script instead of fail (GH-125424)
(cherry picked from commit 9c2bb7d551a695f35db953a671a2ddca89426bef)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
12 months ago[3.13] gh-124375: Avoid calling `_PyMem_ProcessDelayed` on other thread states (GH...
Miss Islington (bot) [Tue, 15 Oct 2024 17:35:28 +0000 (19:35 +0200)] 
[3.13] gh-124375: Avoid calling `_PyMem_ProcessDelayed` on other thread states (GH-124459) (#125540)

This fixes a crash when running the PyO3 test suite on the free-threaded
build. The `qsbr` field is initialized after the `PyThreadState` is
added to the interpreter's linked list -- it might still be NULL.

Instead, we "steal" the queue of to-be-freed memory blocks. This is
always initialized (possibly empty) and protected by the stop the world
pause.
(cherry picked from commit 54c6fcbefd33a8d8bf8c004cf1aad3be3d37b933)

Co-authored-by: Sam Gross <colesbury@gmail.com>
12 months ago[3.13] gh-100141: Allow pdb to deal with empty file (GH-125425) (#125536)
Miss Islington (bot) [Tue, 15 Oct 2024 16:28:57 +0000 (18:28 +0200)] 
[3.13] gh-100141: Allow pdb to deal with empty file (GH-125425) (#125536)

gh-100141: Allow pdb to deal with empty file (GH-125425)
(cherry picked from commit bb9604b62ae7f043594ffea9287f9213067cc7fb)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
12 months ago[3.13] gh-89819: Add argument_default and conflict_handler to add_argument_group...
Miss Islington (bot) [Tue, 15 Oct 2024 16:09:50 +0000 (18:09 +0200)] 
[3.13] gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379) (GH-125538)

(cherry picked from commit c9826c11db25e81b1a90c837f84074879f1b1126)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
12 months ago[3.13] gh-125422: Don't set the caller's f_trace if it's botframe (GH-125427) (#125530)
Miss Islington (bot) [Tue, 15 Oct 2024 15:26:46 +0000 (17:26 +0200)] 
[3.13] gh-125422: Don't set the caller's f_trace if it's botframe (GH-125427) (#125530)

gh-125422: Don't set the caller's f_trace if it's botframe (GH-125427)
(cherry picked from commit 703227dd021491ceb9343f69fa48f4b6a05adbb3)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
12 months ago[3.13] gh-125514: fix bug in test_traceback utility. Specify exception types in excep...
Miss Islington (bot) [Tue, 15 Oct 2024 14:36:14 +0000 (16:36 +0200)] 
[3.13] gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516) (#125524)

gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516)
(cherry picked from commit 55c4f4c30b49734ce35dc88139b8b4fdc94c66fd)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
12 months ago[3.13] gh-124594: Create and reuse the same context for the entire asyncio REPL sessi...
Miss Islington (bot) [Tue, 15 Oct 2024 11:37:59 +0000 (13:37 +0200)] 
[3.13] gh-124594: Create and reuse the same context for the entire asyncio REPL session (GH-124595) (#124848)

gh-124594: Create and reuse the same context for the entire asyncio REPL session (GH-124595)
(cherry picked from commit 67e01a430f4ecfcb540d6a29b347966ff4e53454)

Co-authored-by: Bartosz Sławecki <bartoszpiotrslawecki@gmail.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
12 months ago[3.13] gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416...
Miss Islington (bot) [Tue, 15 Oct 2024 09:29:03 +0000 (11:29 +0200)] 
[3.13] gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416) (#125493)

gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416)

We previously used `AC_RUN_IF_ELSE` with a short test program to detect
if `-latomic` is needed, but that requires choosing a specific default
value when cross-compiling because the test program is not run.
Some cross compilation targets like `wasm32-emscripten` do not support
`-latomic`, while other cross compilation targets, like
`arm-linux-gnueabi` require it.
(cherry picked from commit 8d42e2d915c3096e7eac1c649751d1da567bb7c3)

Co-authored-by: Sam Gross <colesbury@gmail.com>
12 months ago[3.13] Doc: Update CVE URL (GH-125489) (#125503)
Miss Islington (bot) [Tue, 15 Oct 2024 07:34:15 +0000 (09:34 +0200)] 
[3.13] Doc: Update CVE URL (GH-125489) (#125503)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
12 months ago[3.13] gh-85453: Improve variable mark up for datetime.rst (GH-120702) (#125490)
Miss Islington (bot) [Mon, 14 Oct 2024 22:08:30 +0000 (00:08 +0200)] 
[3.13] gh-85453: Improve variable mark up for datetime.rst (GH-120702) (#125490)

Variables and literals are marked up using backticks.
(cherry picked from commit 2a5cdb251674ce8d9a824c102f7cd846d944cfa4)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
12 months ago[3.13] Fix idlelib typos (GH-125484) (#125487)
Miss Islington (bot) [Mon, 14 Oct 2024 21:38:40 +0000 (23:38 +0200)] 
[3.13] Fix idlelib typos (GH-125484) (#125487)

Fix idlelib typos (GH-125484)

Propagate fixes in Doc/library/idle.rst to help.html.
Change 'interruptable' to 'interruptible' in run.py.
The latter was reported by ember91 in PR 125473.
(cherry picked from commit 3fea1d000ef0a74062fd3fe218ad94618b08d9f2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
12 months ago[3.13] gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (...
Nice Zombies [Mon, 14 Oct 2024 18:00:45 +0000 (20:00 +0200)] 
[3.13] gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999) (#125475)

gh-124960: Fixed `barry_as_FLUFL` future flag does not work in new REPL (#124999)

Co-authored-by: Wulian <xiguawulian@gmail.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 6a08a753b702ac63c9b6ac58dd204d1fe9662e9d)

12 months ago[3.13] gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406...
Miss Islington (bot) [Mon, 14 Oct 2024 17:45:26 +0000 (19:45 +0200)] 
[3.13] gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406) (GH-125454)

Fixed most locales that use non-ASCII digits, like Persian, Burmese,
Odia and Shan.
(cherry picked from commit 5f4e5b598cab86d5fd5727d423c9728221889ed0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-125461: Remove Python 2 from identifiers in doc (GH-125462) (GH-125464)
Miss Islington (bot) [Mon, 14 Oct 2024 15:49:35 +0000 (17:49 +0200)] 
[3.13] gh-125461: Remove Python 2 from identifiers in doc (GH-125462) (GH-125464)

gh-125461: Remove Python 2 from identifiers in doc (GH-125462)

Remove Python 2 from identifiers in doc
(cherry picked from commit 5dac0dceda9097d46a0b5a6ad7c927e002c6c7a5)

Co-authored-by: Paul Hoffman <phoffman@proper.com>
12 months ago[3.13] gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (GH-124959) (#125463)
Miss Islington (bot) [Mon, 14 Oct 2024 15:45:49 +0000 (17:45 +0200)] 
[3.13] gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (GH-124959) (#125463)

gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (GH-124959)
(cherry picked from commit d5dbbf4372cd3dbf3eead1cc70ddc4261c061fd9)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
12 months ago[3.13] gh-112088: aclocal version is updated to 1.16.5 in docs (GH-125457) (#125459)
Miss Islington (bot) [Mon, 14 Oct 2024 15:02:06 +0000 (17:02 +0200)] 
[3.13] gh-112088: aclocal version is updated to 1.16.5 in docs (GH-125457) (#125459)

gh-112088: aclocal version is updated to 1.16.5 in docs (GH-125457)
(cherry picked from commit 45df264f3ffbc0893cbfd257131d3abe21043786)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
12 months ago[3.13] gh-86357: argparse: use str() consistently and explicitly to print choices...
Serhiy Storchaka [Mon, 14 Oct 2024 07:09:06 +0000 (10:09 +0300)] 
[3.13] gh-86357: argparse: use str() consistently and explicitly to print choices (GH-117766) (GH-125431)

(cherry picked from commit 66b3922b97388c328c9bd8df050eef11c0261fae)

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
Co-authored-by: rindeal <dev.rindeal@gmail.com>
12 months ago[3.13] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) ...
Miss Islington (bot) [Mon, 14 Oct 2024 04:50:06 +0000 (06:50 +0200)] 
[3.13] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125428)

gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426)
(cherry picked from commit cfc27bc50fe165330f2295f9ac0ad56ca5b0f31c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled...
Miss Islington (bot) [Sun, 13 Oct 2024 18:47:38 +0000 (20:47 +0200)] 
[3.13] gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by default (GH-123859) (#125163)

(cherry picked from commit 14b44c58e195c4cdee6594a4aacf8bf95b19fcd7)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
12 months ago[3.13] GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` (GH-12515...
Miss Islington (bot) [Sun, 13 Oct 2024 18:12:57 +0000 (20:12 +0200)] 
[3.13] GH-125069: Fix inconsistent joining in `WindowsPath(PosixPath(...))` (GH-125156) (#125409)

`PurePath.__init__()` incorrectly uses the `_raw_paths` of a given
`PurePath` object with a different flavour, even though the procedure to
join path segments can differ between flavours.

This change makes the `_raw_paths`-enabled deferred joining apply _only_
when the path flavours match.

(cherry picked from commit cb8e5995d89d9b90e83cf43310ec50e177484e70)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) ...
Miss Islington (bot) [Sun, 13 Oct 2024 17:44:50 +0000 (19:44 +0200)] 
[3.13] gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) (#125407)

gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384)
(cherry picked from commit c6d7b644c2425b397cfb641f336bea70eb8a329a)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
12 months ago[3.13] gh-125383: Update `fib` function comment for accuracy (GH-125386) (#125395)
Miss Islington (bot) [Sun, 13 Oct 2024 11:16:23 +0000 (13:16 +0200)] 
[3.13] gh-125383: Update `fib` function comment for accuracy (GH-125386) (#125395)

gh-125383: Update `fib` function comment for accuracy (GH-125386)

`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
(cherry picked from commit 283ea5f3b2b6a18605b8598a979afe263b0f21ce)

Co-authored-by: Wulian <xiguawulian@gmail.com>
12 months ago[3.13] gh-61698: Use launchctl to detect macOS window manager in tests (GH-118390...
Miss Islington (bot) [Sun, 13 Oct 2024 08:46:35 +0000 (10:46 +0200)] 
[3.13] gh-61698: Use launchctl to detect macOS window manager in tests (GH-118390) (#125392)

(cherry picked from commit ce740d46246b28bb675ba9d62214b59be9b8411e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
12 months ago[3.13] gh-86673: Loosen test_ttk.test_identify() requirements (GH-125335) (#125390)
Miss Islington (bot) [Sun, 13 Oct 2024 08:04:22 +0000 (10:04 +0200)] 
[3.13] gh-86673: Loosen test_ttk.test_identify() requirements (GH-125335) (#125390)

In aeca373b3 (PR gh-12011, issue gh-71500), test_identify() was changed to expect different results on Darwin. Ned's fix was later adjusted by e52f9bee8. This workaround is only needed for some variants of Tk/Tcl on macOS, so we now allow both the workaround and the generic results for these tests.
(cherry picked from commit 4197a796ecf3a751ad7245b8d4f980d6d444b614)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
12 months ago[3.13] Trivial change: Update comments in activate about what running hash -r does...
Miss Islington (bot) [Sun, 13 Oct 2024 07:56:09 +0000 (09:56 +0200)] 
[3.13] Trivial change: Update comments in activate about what running hash -r does (GH-125385) (GH-125387)

(cherry picked from commit 82bcaf15890cf85b76b4f62d2dd1710bb49c3ed1)

12 months ago[3.13] Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) (#125382)
Miss Islington (bot) [Sun, 13 Oct 2024 00:59:05 +0000 (02:59 +0200)] 
[3.13] Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366) (#125382)

Doc: Fix suggested usage of `-X gil=0` in the glossary (GH-125366)

Currently, the "global interpreter lock" entry in the glossary mentions
that `-X gil 0` can be used to disable the GIL [1]. However, this is
invalid; the correct usage should be `-X gil=0`.

    $ python -X gil 0 -c 'print("Hello, world")'
    Fatal Python error: config_read_gil: PYTHON_GIL / -X gil must be "0" or "1"
    Python runtime state: preinitialized

    $ python -X gil=0 -c 'print("Hello, world")'
    Hello, world

[1]: https://docs.python.org/3/using/cmdline.htmlGH-cmdoption-X

(cherry picked from commit a8fa4ad9e9f7aa0cba8b23af2c583d17bb1d1847)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
13 months ago[3.13] gh-125289: Update sample code in asyncio-task.rst (GH-125292) (GH-125374)
Miss Islington (bot) [Sat, 12 Oct 2024 20:43:30 +0000 (22:43 +0200)] 
[3.13] gh-125289: Update sample code in asyncio-task.rst (GH-125292) (GH-125374)

gh-125289: Update sample code in asyncio-task.rst (GH-125292)

* Update sample code in asyncio-task.rst

This will change **coroutines** sample code in the **Awaitables** section and make the example clearer.

* Update Doc/library/asyncio-task.rst

Revert the added print

* Update Doc/library/asyncio-task.rst

---------

(cherry picked from commit fa52b82c91a8e1a0971bd5fef656473ec93f41e3)

Co-authored-by: Ghorban M. Tavakoly <58617996+galmyk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
13 months ago[3.13] gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946...
Miss Islington (bot) [Sat, 12 Oct 2024 18:11:48 +0000 (20:11 +0200)] 
[3.13] gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946) (GH-125369)

In some locales (like French or Hebrew) the full or abbreviated names of
the default month and weekday used in __calc_date_time can be part of
other name or constant part of the %c format. The month name can also
match %m with constant suffix (like in Japanese). So the code failed to
correctly distinguish formats %a, %A, %b, %B and %m.

Cycle all month and all days of the week to find the variable part
and distinguish %a from %A and %b from %B or %m.

Fixed locales for the following languges:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.

(cherry picked from commit c05f9dde8a12dfd63d3ade93da616042df2dc925)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Eli Bendersky <eliben@gmail.com>
13 months ago[3.13] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH...
Miss Islington (bot) [Sat, 12 Oct 2024 13:02:26 +0000 (15:02 +0200)] 
[3.13] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125357)

(cherry picked from commit 07c2d15977738165e9dc4248e7edda7c75ecc14b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-125254: Fix error report about ambiguous option in argparse (GH-125273...
Miss Islington (bot) [Sat, 12 Oct 2024 13:00:41 +0000 (15:00 +0200)] 
[3.13] gh-125254: Fix error report about ambiguous option in argparse (GH-125273) (GH-125359)

This was a regression introduced in gh-58573. It was only tested for the
case when the ambiguous option is the last argument in the command line.
(cherry picked from commit 63cf4e914f879ee28a75c02e867baa7c6047ea2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-124309: fix staggered race on eager tasks (GH-124847) (#125339)
Miss Islington (bot) [Sat, 12 Oct 2024 03:11:53 +0000 (05:11 +0200)] 
[3.13] gh-124309: fix staggered race on eager tasks (GH-124847) (#125339)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
13 months ago[3.13] Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338...
Miss Islington (bot) [Sat, 12 Oct 2024 00:45:50 +0000 (02:45 +0200)] 
[3.13] Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338) (#125341)

Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338)
(cherry picked from commit 5a074aab845f82f4a150c27b905dae05c337d381)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
13 months ago[3.13] gh-116938: Clarify documentation of `dict` and `dict.update` regarding the...
Miss Islington (bot) [Fri, 11 Oct 2024 23:29:01 +0000 (01:29 +0200)] 
[3.13] gh-116938: Clarify documentation of `dict` and `dict.update` regarding the positional argument they accept (GH-125213) (#125336)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months ago[3.13] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918...
Jelle Zijlstra [Fri, 11 Oct 2024 22:18:33 +0000 (15:18 -0700)] 
[3.13] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918) (#125332)

(cherry picked from commit cc2938a18967c9d462ebb18bc09f73e4364aa7d2)

13 months ago[3.13] Fix typo in ``Doc/library/functions.rst`` (GH-125327) (#125333)
Miss Islington (bot) [Fri, 11 Oct 2024 20:06:19 +0000 (22:06 +0200)] 
[3.13] Fix typo in ``Doc/library/functions.rst`` (GH-125327) (#125333)

Fix typo in ``Doclibrary/functions.rst`` (GH-125327)
(cherry picked from commit 76b29d271b3132bf8e13bc724f10be8c630057ba)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
13 months ago[3.13] gh-116738: Make `_csv` module thread-safe (GH-118344) (#125328)
Miss Islington (bot) [Fri, 11 Oct 2024 18:22:56 +0000 (20:22 +0200)] 
[3.13] gh-116738: Make `_csv` module thread-safe (GH-118344) (#125328)

gh-116738: Make `_csv` module thread-safe (GH-118344)
(cherry picked from commit a00221e5a70e54a281ba0e2cff8d85cd37ae305f)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
13 months ago[3.13] Add some doctest cleanups for `configparser` (GH-125288) (#125290)
Miss Islington (bot) [Fri, 11 Oct 2024 09:48:32 +0000 (11:48 +0200)] 
[3.13] Add some doctest cleanups for `configparser` (GH-125288) (#125290)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.13] gh-125235: Keep `_tkinter` TCL paths pointing to base installation on Windows...
Miss Islington (bot) [Fri, 11 Oct 2024 09:34:04 +0000 (11:34 +0200)] 
[3.13] gh-125235: Keep `_tkinter` TCL paths pointing to base installation on Windows (GH-125250) (#125312)

gh-125235: Keep `_tkinter` TCL paths pointing to base installation on Windows (GH-125250)
(cherry picked from commit b3aa1b5fe260382788a2df416599325ad680a5ee)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
13 months ago[3.13] gh-61011: Fix inheritance of nested mutually exclusive groups in argparse...
Miss Islington (bot) [Fri, 11 Oct 2024 09:14:04 +0000 (11:14 +0200)] 
[3.13] gh-61011: Fix inheritance of nested mutually exclusive groups in argparse (GH-125210) (GH-125308)

Previously, all nested mutually exclusive groups lost their connection
to the group containing them and were displayed as belonging directly
to the parser.

(cherry picked from commit 18c74497681e0107d7cde53e63ea42feb38f2176)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Danica J. Sutherland <djsutherland@users.noreply.github.com>
13 months ago[3.13] gh-125221: Fix free-threading data race in `object.__reduce_ex__` (GH-125267...
Miss Islington (bot) [Fri, 11 Oct 2024 08:26:23 +0000 (10:26 +0200)] 
[3.13] gh-125221: Fix free-threading data race in `object.__reduce_ex__` (GH-125267) (#125305)

gh-125221: Fix free-threading data race in `object.__reduce_ex__` (GH-125267)
(cherry picked from commit b12e99261e656585ffbaa395af7c5dbaee5ad1ad)

Co-authored-by: Sam Gross <colesbury@gmail.com>
13 months ago[3.13] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire...
Miss Islington (bot) [Fri, 11 Oct 2024 08:20:46 +0000 (10:20 +0200)] 
[3.13] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141) (#125306)

gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141)
(cherry picked from commit 0135848059162ad81478a7776fec622d68a36524)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
13 months ago[3.13] gh-125296: Fix strange fragment identifier for `name or flags` in argparse...
Miss Islington (bot) [Fri, 11 Oct 2024 06:35:49 +0000 (08:35 +0200)] 
[3.13] gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297) (#125299)

gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297)
(cherry picked from commit c1913effeed4e4da4d5310a40ab518945001ffba)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
13 months ago[3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (#125232)
Serhiy Storchaka [Thu, 10 Oct 2024 21:56:22 +0000 (00:56 +0300)] 
[3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (#125232)

Returns a tuple of up to 100 strings for ALT_DIGITS lookup (an empty tuple on most locales).
Previously it returned the first item of that tuple or an empty string.
(cherry picked from commit 21c04e1a972bd1b6285e0ea41fa107d635bbe43a)

13 months ago[3.13] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125278)
Miss Islington (bot) [Thu, 10 Oct 2024 20:31:40 +0000 (22:31 +0200)] 
[3.13] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125278)

Doc: Upgrade Sphinx to 8.1 (GH-125276)
(cherry picked from commit dd0ee201da34d1d4a631d77b420728f9233f53f9)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)
Miss Islington (bot) [Thu, 10 Oct 2024 18:18:17 +0000 (20:18 +0200)] 
[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)

(cherry picked from commit 3b87fb74c907510402678bf1b7c4a94df0e5e65a)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
13 months ago[3.13] GH-122578: update to WASI SDK 24 (GH-122960) (GH-122961)
Miss Islington (bot) [Thu, 10 Oct 2024 17:46:01 +0000 (19:46 +0200)] 
[3.13] GH-122578: update to WASI SDK 24 (GH-122960) (GH-122961)

GH-122578: update to WASI SDK 24 (GH-122960)
(cherry picked from commit 0e207f3e7adc6a0fdbe1482ce01163ff04d5ddcb)

Co-authored-by: Brett Cannon <brett@python.org>
13 months ago[3.13] GH-121634: have `wasi.py` accept the host target triple as an argument (GH...
Miss Islington (bot) [Thu, 10 Oct 2024 17:44:31 +0000 (19:44 +0200)] 
[3.13] GH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030) (GH-123042)

GH-121634: have `wasi.py` accept the host target triple as an argument (GH-123030)
(cherry picked from commit b15b81ed4f58196b35e3dd13b484f4c7a73e5bb8)

Co-authored-by: Brett Cannon <brett@python.org>
13 months ago[3.13] gh-122765: make prompt in activate.csh robust against unbalanced quotes and...
Miss Islington (bot) [Thu, 10 Oct 2024 17:39:39 +0000 (19:39 +0200)] 
[3.13] gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751) (GH-124185)

gh-122765: make prompt in activate.csh robust against unbalanced quotes and newlines (GH-123751)
(cherry picked from commit a15a584bf3f94ea11ab9363548c8872251364000)

Co-authored-by: Jacek <jacek.duszenko@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
13 months ago[3.13] gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-12516...
Sergey B Kirpichev [Thu, 10 Oct 2024 14:58:57 +0000 (17:58 +0300)] 
[3.13] gh-125118: don't copy arbitrary values to _Bool in the struct module (GH-125169) (#125263)

memcopy'ing arbitrary values to _Bool variable triggers undefined
behaviour. Avoid this.
We assume that `false` is represented by all zero bytes.

Credits to Alex Gaynor.

(cherry picked from commit 87d7315ac57250046372b0d9ae4619ba619c8c87)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
13 months ago[3.13] gh-124471: Set name for unnamed reusable workflow (GH-124475) (gh-125256)
Miss Islington (bot) [Thu, 10 Oct 2024 13:03:45 +0000 (15:03 +0200)] 
[3.13] gh-124471: Set name for unnamed reusable workflow (GH-124475) (gh-125256)

gh-124471: Set name for unnamed reusable workflow (GH-124475)
(cherry picked from commit e4cab488d4445e8444932f3bed1c329c0d9e5038)

Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
13 months ago[3.13] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189...
Miss Islington (bot) [Thu, 10 Oct 2024 10:46:31 +0000 (12:46 +0200)] 
[3.13] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189) (#125247)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months ago[3.13] GH-121970: Extract ``availability`` into a new extension (GH-125082) (#125237)
Adam Turner [Thu, 10 Oct 2024 10:43:43 +0000 (11:43 +0100)] 
[3.13] GH-121970: Extract ``availability`` into a new extension (GH-125082) (#125237)

(cherry picked from commit cbfd39247983309a9ef0ae6da6c61cc71665b967)

13 months ago[3.13] Pin the doctest workflow to Ubuntu 22.04 (GH-125236) (#125240)
Miss Islington (bot) [Thu, 10 Oct 2024 10:27:48 +0000 (12:27 +0200)] 
[3.13] Pin the doctest workflow to Ubuntu 22.04 (GH-125236) (#125240)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.13] gh-125140: Remove the current directory from sys.path when using pyrepl (GH...
Miss Islington (bot) [Thu, 10 Oct 2024 09:35:47 +0000 (11:35 +0200)] 
[3.13] gh-125140: Remove the current directory from sys.path when using pyrepl (GH-125212) (#125224)

13 months ago[3.13] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709)...
Alex Waygood [Wed, 9 Oct 2024 19:03:30 +0000 (20:03 +0100)] 
[3.13] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709) (#125208)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
13 months ago[3.13] docs: in venv table use executable name (GH-124315) (GH-125172)
Miss Islington (bot) [Wed, 9 Oct 2024 16:54:15 +0000 (18:54 +0200)] 
[3.13] docs: in venv table use executable name (GH-124315) (GH-125172)

(cherry picked from commit 7f93dbf6fec152888727a0f25a3aa030d1fe27ca)

13 months ago[3.13] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106)...
Miss Islington (bot) [Wed, 9 Oct 2024 14:13:23 +0000 (16:13 +0200)] 
[3.13] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106) (#125190)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 months ago[3.13] Fix importlib.resources issue reference in 3.13 What's New (GH-125175) (#125184)
Miss Islington (bot) [Wed, 9 Oct 2024 12:45:03 +0000 (14:45 +0200)] 
[3.13] Fix importlib.resources issue reference in 3.13 What's New (GH-125175) (#125184)

Previous link was to the PR that removed the
mentioned importlib.resources APIs, rather than
the issue that added back their improved forms.

(cherry picked from commit 7a303fc78a6dbd1b4c01f8a2b14ddcae29f4271b)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
13 months ago[3.13] gh-125150: Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementat...
Miss Islington (bot) [Wed, 9 Oct 2024 09:05:57 +0000 (11:05 +0200)] 
[3.13] gh-125150: Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues (GH-125151) (#125173)

gh-125150: Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues (GH-125151)

Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
(cherry picked from commit 92760bd85b8f48b88df5b81100a757048979de83)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
13 months ago[3.13] GH-124478: Cleanup argparse documentation (GH-124877) (#125162)
Savannah Ostrowski [Tue, 8 Oct 2024 23:20:01 +0000 (17:20 -0600)] 
[3.13] GH-124478: Cleanup argparse documentation (GH-124877) (#125162)

(cherry picked from commit 37228bd16e3ef97d32da08848552f7ef016d68ab)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
13 months ago[3.13] Misc improvements to the itertools docs (gh-125147) (gh-125149)
Miss Islington (bot) [Tue, 8 Oct 2024 19:37:13 +0000 (21:37 +0200)] 
[3.13] Misc improvements to the itertools docs (gh-125147) (gh-125149)

13 months ago[3.13] Itertool docs: Minor clarifications, wording tweaks, spacing, and active voice...
Raymond Hettinger [Tue, 8 Oct 2024 19:29:15 +0000 (14:29 -0500)] 
[3.13] Itertool docs: Minor clarifications, wording tweaks, spacing, and active voice. (gh-124690) (gh-125148)

Minor clarifications, wording tweaks, spacing, and active voice.

13 months ago[3.13] Tee of tee was not producing n independent iterators (gh-123884) (gh-125081)
Raymond Hettinger [Tue, 8 Oct 2024 19:11:43 +0000 (14:11 -0500)] 
[3.13] Tee of tee was not producing n independent iterators (gh-123884) (gh-125081)

13 months ago[3.13] gh-124832: Add a note to indicate that `datetime.now` may return the same...
Miss Islington (bot) [Tue, 8 Oct 2024 18:26:07 +0000 (20:26 +0200)] 
[3.13] gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834) (#125145)

gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834)

* Update datetime.rst

* Update datetime.rst

replace warning with note

* Update Doc/library/datetime.rst

* Update Doc/library/datetime.rst

---------

(cherry picked from commit 760b1e103a0aa696cdf448e0d500cd1bac2213fa)

Co-authored-by: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.13] gh-117721: use PyMutex in `_thread.lock` (#125110) (#125116)
Kumar Aditya [Tue, 8 Oct 2024 15:46:48 +0000 (21:16 +0530)] 
[3.13] gh-117721: use PyMutex in `_thread.lock` (#125110) (#125116)

* gh-117721: use PyMutex in `_thread.lock` (#125110)

(cherry picked from commit fca552993da32044165223eec2297b6aaaac60ad)

13 months ago[3.13] gh-112433 add versionadded for `ctypes.Structure._align_` (GH-125087) (#125113)
Jelle Zijlstra [Tue, 8 Oct 2024 14:24:27 +0000 (07:24 -0700)] 
[3.13] gh-112433 add versionadded for `ctypes.Structure._align_` (GH-125087) (#125113)

(cherry picked from commit 5967dd8a4de60a418de84d1d1d9efc063ad12c47)

Co-authored-by: monkeyman192 <monkey_man_192@yahoo.com.au>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
13 months ago[3.13] gh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (#125097) (#125111)
Victor Stinner [Tue, 8 Oct 2024 14:20:05 +0000 (16:20 +0200)] 
[3.13] gh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (#125097) (#125111)

gh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (#125097)

If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.

(cherry picked from commit 65ce228d63878d8b6d0005f682e89ad9d5289c4b)

13 months ago[3.13] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125102)
Miss Islington (bot) [Tue, 8 Oct 2024 12:30:52 +0000 (14:30 +0200)] 
[3.13] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125102)

Doc: Improve description of ``GET_LEN`` opcode (GH-114583)
(cherry picked from commit e8773e59a835d23b9648271e0eb79c1651581564)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
13 months ago[3.13] gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (#125099)
Miss Islington (bot) [Tue, 8 Oct 2024 12:06:57 +0000 (14:06 +0200)] 
[3.13] gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (#125099)

gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935)
(cherry picked from commit ba14dfafd97d1fd03938ac8ddec4ca5b2f12985d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.13] gh-118658: Modify cert generation script to extract cert3.pem (GH-124598)...
Felix Fontein [Tue, 8 Oct 2024 11:37:30 +0000 (13:37 +0200)] 
[3.13] gh-118658: Modify cert generation script to extract cert3.pem (GH-124598) (GH-124972)

(cherry picked from commit 480354dc236af9ae9d47b2520aa85fb7293c7b68)

13 months ago[3.13] bpo-34206: Improve docs and test coverage for pre-init functions (GH-8023...
Alyssa Coghlan [Tue, 8 Oct 2024 09:30:06 +0000 (19:30 +1000)] 
[3.13] bpo-34206: Improve docs and test coverage for pre-init functions (GH-8023) (#125092)

- move the Py_Main documentation from the very high level API section
  to the initialization and finalization section
- make it clear that it encapsulates a full Py_Initialize/Finalize
  cycle of its own
- point out that exactly which settings will be read and applied
  correctly when Py_Main is called after a separate runtime
  initialization call is version dependent
- be explicit that Py_IsInitialized can be called prior to
  initialization
- actually test that Py_IsInitialized can be called prior to
  initialization
- flush stdout in the embedding tests that run code so it appears
  in the expected order when running with "-vv"
- make "-vv" on the subinterpreter embedding tests less spammy

---------

(cherry picked from commit 7c4b6a68f263320a2dd19cd5ff63b35c964b1fa8)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
13 months ago[3.13] gh-53203: Improve tests for strptime() (GH-125090) (GH-125091)
Miss Islington (bot) [Tue, 8 Oct 2024 09:12:15 +0000 (11:12 +0200)] 
[3.13] gh-53203: Improve tests for strptime() (GH-125090) (GH-125091)

Run them with different locales and different date and time.

Add the @run_with_locales() decorator to run the test with multiple
locales.

Improve the run_with_locale() context manager/decorator -- it now
catches only expected exceptions and reports the test as skipped if no
appropriate locale is available.
(cherry picked from commit 19984fe024bfd90649f1c36b78c9abf3ed72b27d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-85935: Improve tests for invalid arguments in test_argparse (GH-124891...
Serhiy Storchaka [Tue, 8 Oct 2024 08:19:30 +0000 (11:19 +0300)] 
[3.13] gh-85935: Improve tests for invalid arguments in test_argparse (GH-124891) (GH-124901)

Check also specific error messages.
(cherry picked from commit 2c050d4bc28bffd2990b5a0bd03fb6fc56b13656)

13 months ago[3.13] gh-70870: Clarify dual usage of 'free variable' (GH-122545) (#125088)
Miss Islington (bot) [Tue, 8 Oct 2024 07:58:47 +0000 (09:58 +0200)] 
[3.13] gh-70870: Clarify dual usage of 'free variable' (GH-122545) (#125088)

The term "free variable" has unfortunately become genuinely
ambiguous over the years (presumably due to the names of
some relevant code object instance attributes).

While we can't eliminate that ambiguity at this late date, we can
at least alert people to the potential ambiguity by describing
both the formal meaning of the term and the common
alternative use as a direct synonym for "closure variable".

---------

(cherry picked from commit 27390990fa9306e2a797a4eb2bd83c5bfc7cb186)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
13 months ago[3.13] gh-58282: Fix support of tuple metavar for positional arguments in argparse...
Serhiy Storchaka [Tue, 8 Oct 2024 06:36:38 +0000 (09:36 +0300)] 
[3.13] gh-58282: Fix support of tuple metavar for positional arguments in argparse (GH-124782) (GH-124882)

Previously, formatting help output or error message for positional argument
with a tuple metavar raised exception.

(cherry picked from commit 9b31a2d83fa7cb0fe4d75ce7cf6a2c9ea2ce0728)

Co-authored-by: Cyker Way <cykerway@gmail.com>
13 months ago[3.13] gh-124653: Relax (again) detection of queue API for logging handlers (GH...
Miss Islington (bot) [Tue, 8 Oct 2024 06:23:40 +0000 (08:23 +0200)] 
[3.13] gh-124653: Relax (again) detection of queue API for logging handlers  (GH-124897) (GH-125059)

(cherry picked from commit 7ffe94fb242fd51bb07c7f0d31e94efeea3619d4)

13 months ago[3.13] gh-102511: Change the `os.path.splitroot` param name from `path` back to ...
Jelle Zijlstra [Tue, 8 Oct 2024 01:42:49 +0000 (18:42 -0700)] 
[3.13] gh-102511: Change the `os.path.splitroot` param name from `path` back to `p` (GH-124097) (#124919)

(cherry picked from commit 3b6bfa77aa4da2ce1f3a15e39831f8b85882698c)

Co-authored-by: sobolevn <mail@sobolevn.me>
13 months ago[3.13] gh-125018: Fix role syntax (GH-125050) (#125080)
Miss Islington (bot) [Tue, 8 Oct 2024 01:23:19 +0000 (03:23 +0200)] 
[3.13] gh-125018: Fix role syntax (GH-125050) (#125080)

gh-125018: Fix role syntax (GH-125050)
(cherry picked from commit 10094a533a947b72d01ed8195dcf540f2e7820ea)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.13] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125047)
Alyssa Coghlan [Tue, 8 Oct 2024 01:16:10 +0000 (11:16 +1000)] 
[3.13] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125047)

gh-125018: Add importlib.metadata semantic link targets (#125027)

This allows direct intersphinx references to APIs via references
like `` :func:`importlib.metadata.version` ``.

(cherry picked from commit cda3b5a576412a8671bbe4c68bb792ec14f1a4b1)

---------

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months ago[3.13] Docs: make a tutorial example more precise (GH-125066) (#125078)
Miss Islington (bot) [Tue, 8 Oct 2024 01:15:42 +0000 (03:15 +0200)] 
[3.13] Docs: make a tutorial example more precise (GH-125066) (#125078)

(cherry picked from commit 6e3c70c61bf961e55e9912a31ca11f61c8e2cd0c)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
13 months ago[3.13] gh-125072: Add label for assignment expressions; update tracked section for...
Emily Morehouse [Tue, 8 Oct 2024 01:14:34 +0000 (19:14 -0600)] 
[3.13] gh-125072: Add label for assignment expressions; update tracked section for assignment expression topic (GH-125074) (#125077)

(cherry picked from commit 447a15190d6d766004b77619ba43e44256e348e2)

13 months ago[3.13] Small improvements to the itertools docs (GH-123885) (#125075)
Raymond Hettinger [Mon, 7 Oct 2024 23:08:09 +0000 (18:08 -0500)] 
[3.13] Small improvements to the itertools docs (GH-123885) (#125075)

13 months ago[3.13] gh-58573: Fix conflicts between abbreviated long options in the parent parser...
Serhiy Storchaka [Mon, 7 Oct 2024 22:55:27 +0000 (01:55 +0300)] 
[3.13] gh-58573: Fix conflicts between abbreviated long options in the parent parser and subparsers in argparse (GH-124631) (GH-124760)

Check for ambiguous options if the option is consumed, not when it is
parsed.
(cherry picked from commit 3f27153e077d7e9448e2f081275931968b40cc74)

13 months ago[3.13] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required...
Miss Islington (bot) [Mon, 7 Oct 2024 22:51:35 +0000 (00:51 +0200)] 
[3.13] gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH-124306) (#124421)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.
(cherry picked from commit 3c83f9958c14cd62ad8951c53536f7788745b0ba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-53780: Ignore the first "--" (double dash) between an option and command...
Miss Islington (bot) [Mon, 7 Oct 2024 22:51:07 +0000 (00:51 +0200)] 
[3.13] gh-53780: Ignore the first "--" (double dash) between an option and command in argparse (GH-124275) (GH-125073)

(cherry picked from commit c578271366176a1d1b0941897efefb6e4d6508b4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-124130: Increase test coverage for \b and \B in regular expressions (GH...
Miss Islington (bot) [Mon, 7 Oct 2024 21:58:17 +0000 (23:58 +0200)] 
[3.13] gh-124130: Increase test coverage for \b and \B in regular expressions (GH-124330) (GH-124413)

(cherry picked from commit b82f07653e1e15a48ebaf8de324f52559e470254)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-124182: Explain naming rules for struct sequence types (GH-124335) (#125057)
Miss Islington (bot) [Mon, 7 Oct 2024 21:47:30 +0000 (23:47 +0200)] 
[3.13] gh-124182: Explain naming rules for struct sequence types (GH-124335) (#125057)

gh-124182: Explain naming rules for struct sequence types (GH-124335)
(cherry picked from commit 3287c834e5370294e310450115290979aac06efa)

Co-authored-by: ffelixg <142172984+ffelixg@users.noreply.github.com>
13 months ago[3.13] gh-120378: Fix crash caused by integer overflow in `curses` (GH-124555) (...
Miss Islington (bot) [Mon, 7 Oct 2024 21:46:57 +0000 (23:46 +0200)] 
[3.13] gh-120378: Fix crash caused by integer overflow in `curses` (GH-124555) (#124905)

gh-120378: Fix crash caused by integer overflow in `curses` (GH-124555)

This is actually an upstream problem in curses, and has been reported
to them already:
https://lists.gnu.org/archive/html/bug-ncurses/2024-09/msg00101.html

This is a nice workaround in the meantime to prevent the segfault.

(cherry picked from commit c2ba931318280796a6dcc33d1a5c5c02ad4d035b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months ago[3.13] gh-116810: fix memory leak in ssl module (GH-123249) (#124800)
Miss Islington (bot) [Mon, 7 Oct 2024 21:46:29 +0000 (23:46 +0200)] 
[3.13] gh-116810: fix memory leak in ssl module (GH-123249) (#124800)

gh-116810: fix memory leak in ssl module (GH-123249)

Resolve a memory leak introduced in CPython 3.10's :mod:`ssl` when the :attr:`ssl.SSLSocket.session` property was accessed. Speeds up read and write access to said property by no longer unnecessarily cloning session objects via serialization.

(cherry picked from commit 7e7223e18f58ec48fb36a68fb75b5c5b7a45042a)

Co-authored-by: Jeffrey R. Van Voorst <jeff.vanvoorst@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Antoine Pitrou <antoine@python.org>
13 months ago[3.13] gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (GH-124240...
Miss Islington (bot) [Mon, 7 Oct 2024 21:45:59 +0000 (23:45 +0200)] 
[3.13] gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (GH-124240) (#124282)

gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (GH-124240)
(cherry picked from commit db6eb3640a7d98db6fea17cf9da4cb14504e5571)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
13 months ago[3.13] Support the "pager" binary in _pyrepl (GH-122878) (#124242)
Miss Islington (bot) [Mon, 7 Oct 2024 21:45:43 +0000 (23:45 +0200)] 
[3.13] Support the "pager" binary in _pyrepl (GH-122878) (#124242)

Support the "pager" binary in _pyrepl (GH-122878)

Debian (and derivatives) provide a /usr/bin/pager binary, managed by the
alternatives system, that always points to an available pager utility.
Allow _pyrepl to use it, to follow system policy.

This is a very trivial change, from a patch that Debian has been
carrying since 2.7 era. Seems appropriate to upstream.
https://bugs.debian.org/799555
(cherry picked from commit 426569eb8ca1edaa68026aa2bab6b8d1c9105f93)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
Co-authored-by: T. Wouters <thomas@python.org>
13 months ago[3.13] Fix typos (#123775) (#123866)
Victor Stinner [Mon, 7 Oct 2024 21:44:31 +0000 (23:44 +0200)] 
[3.13] Fix typos (#123775) (#123866)

Fix typos (#123775)

(cherry picked from commit 9017b95ff2dcff16bcb0b0a609ed2b0daa845943)

Co-authored-by: algonell <algonell@gmail.com>
13 months ago[3.13] gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274...
Miss Islington (bot) [Mon, 7 Oct 2024 21:40:47 +0000 (23:40 +0200)] 
[3.13] gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274) (GH-125068)

(cherry picked from commit baa3550bc3a119f41cc4eaed5373f9d695208e8e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) (GH...
Miss Islington (bot) [Mon, 7 Oct 2024 21:29:54 +0000 (23:29 +0200)] 
[3.13] gh-124842: Fix test.support.import_helper.make_legacy_pyc() (GH-124843) (GH-124853)

For source file "path/to/file.py" it created file with incorrect path
"/absolute/path/to/path/to/file.pyc" instead of "path/to/file.pyc".
(cherry picked from commit 60ff67d010078eca15a74b1429caf779ac4f9c74)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 months ago[3.13] gh-61181: Fix support of choices with string value in argparse (GH-124578...
Miss Islington (bot) [Mon, 7 Oct 2024 21:28:17 +0000 (23:28 +0200)] 
[3.13] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124755)

Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e2993e584610851ac004c8b0599b323)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>