Commit graph

123248 commits

Author SHA1 Message Date
Nice Zombies
d54dbd62cc
[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 6a08a753b7)
2024-10-14 20:00:45 +02:00
Miss Islington (bot)
cbcdf34a4b
[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 5f4e5b598c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-14 17:45:26 +00:00
Miss Islington (bot)
7966c7d69e
[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 5dac0dceda)

Co-authored-by: Paul Hoffman <phoffman@proper.com>
2024-10-14 08:49:35 -07:00
Miss Islington (bot)
4e08c98292
[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 d5dbbf4372)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2024-10-14 15:45:49 +00:00
Miss Islington (bot)
6c81928ba7
[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 45df264f3f)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2024-10-14 15:02:06 +00:00
Serhiy Storchaka
d3d306a9d6
[3.13] gh-86357: argparse: use str() consistently and explicitly to print choices (GH-117766) (GH-125431)
(cherry picked from commit 66b3922b97)

Signed-off-by: Jan Chren ~rindeal <dev.rindeal@gmail.com>
Co-authored-by: rindeal <dev.rindeal@gmail.com>
2024-10-14 07:09:06 +00:00
Miss Islington (bot)
1279be610d
[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 cfc27bc50f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-14 04:50:06 +00:00
Miss Islington (bot)
98655cec0e
[3.13] gh-123849: Fix test_sqlite3.test_table_dump when foreign keys are enabled by default (GH-123859) (#125163)
(cherry picked from commit 14b44c58e1)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-10-13 20:47:38 +02:00
Miss Islington (bot)
094d95f62c
[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 cb8e5995d8)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-13 18:12:57 +00:00
Miss Islington (bot)
cff627a27d
[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 c6d7b644c2)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-10-13 17:44:50 +00:00
Miss Islington (bot)
c9ead96249
[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 283ea5f3b2)

Co-authored-by: Wulian <xiguawulian@gmail.com>
2024-10-13 11:16:23 +00:00
Miss Islington (bot)
b7dff85638
[3.13] gh-61698: Use launchctl to detect macOS window manager in tests (GH-118390) (#125392)
(cherry picked from commit ce740d4624)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-13 08:46:35 +00:00
Miss Islington (bot)
bcadaf2321
[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 4197a796ec)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-13 08:04:22 +00:00
Miss Islington (bot)
801ef7de08
[3.13] Trivial change: Update comments in activate about what running hash -r does (GH-125385) (GH-125387)
(cherry picked from commit 82bcaf1589)
2024-10-13 08:56:09 +01:00
Miss Islington (bot)
e47dd93262
[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 a8fa4ad9e9)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
Co-authored-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2024-10-13 00:59:05 +00:00
Miss Islington (bot)
6afdb09859
[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 fa52b82c91)

Co-authored-by: Ghorban M. Tavakoly <58617996+galmyk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-12 20:43:30 +00:00
Miss Islington (bot)
06285be22b
[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 c05f9dde8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Eli Bendersky <eliben@gmail.com>
2024-10-12 18:11:48 +00:00
Miss Islington (bot)
0542645354
[3.13] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125357)
(cherry picked from commit 07c2d15977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-12 16:02:26 +03:00
Miss Islington (bot)
33c41360c8
[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 63cf4e914f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-12 16:00:41 +03:00
Miss Islington (bot)
b4c504d76f
[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>
2024-10-11 20:11:53 -07:00
Miss Islington (bot)
a314026cfe
[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 5a074aab84)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-10-12 00:45:50 +00:00
Miss Islington (bot)
21764ec5ab
[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>
2024-10-11 23:29:01 +00:00
Jelle Zijlstra
e646cc369e
[3.13] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918) (#125332)
(cherry picked from commit cc2938a189)
2024-10-11 15:18:33 -07:00
Miss Islington (bot)
488807a52a
[3.13] Fix typo in `Doc/library/functions.rst` (GH-125327) (#125333)
Fix typo in ``Doclibrary/functions.rst`` (GH-125327)
(cherry picked from commit 76b29d271b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-10-11 20:06:19 +00:00
Miss Islington (bot)
f589513334
[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 a00221e5a7)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-10-11 18:22:56 +00:00
Miss Islington (bot)
73c152b346
[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>
2024-10-11 09:48:32 +00:00
Miss Islington (bot)
66b8cb1142
[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 b3aa1b5fe2)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Y5 <124019959+y5c4l3@users.noreply.github.com>
2024-10-11 09:34:04 +00:00
Miss Islington (bot)
079bf1c31c
[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 18c7449768)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Danica J. Sutherland <djsutherland@users.noreply.github.com>
2024-10-11 09:14:04 +00:00
Miss Islington (bot)
b3badabcd9
[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 b12e99261e)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-10-11 08:26:23 +00:00
Miss Islington (bot)
49f171d9ea
[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 0135848059)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-10-11 08:20:46 +00:00
Miss Islington (bot)
1fe27103e0
[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 c1913effee)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-11 06:35:49 +00:00
Serhiy Storchaka
26a93189e4
[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 21c04e1a97)
2024-10-11 05:56:22 +08:00
Miss Islington (bot)
2019362d95
[3.13] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125278)
Doc: Upgrade Sphinx to 8.1 (GH-125276)
(cherry picked from commit dd0ee201da)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-10 20:31:40 +00:00
Miss Islington (bot)
319305c0bf
[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)
(cherry picked from commit 3b87fb74c9)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-10 21:18:17 +03:00
Miss Islington (bot)
2f87976926
[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 0e207f3e7a)

Co-authored-by: Brett Cannon <brett@python.org>
2024-10-10 17:46:01 +00:00
Miss Islington (bot)
cc1892d3cf
[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 b15b81ed4f)

Co-authored-by: Brett Cannon <brett@python.org>
2024-10-10 17:44:31 +00:00
Miss Islington (bot)
9aa85f524f
[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 a15a584bf3)

Co-authored-by: Jacek <jacek.duszenko@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
2024-10-10 17:39:39 +00:00
Sergey B Kirpichev
c2cb1a89b7
[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 87d7315ac5)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-10-10 14:58:57 +00:00
Miss Islington (bot)
0c43d60e7d
[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 e4cab488d4)

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>
2024-10-10 13:03:45 +00:00
Miss Islington (bot)
47ad32d158
[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>
2024-10-10 10:46:31 +00:00
Adam Turner
abb01fd938
[3.13] GH-121970: Extract `availability` into a new extension (GH-125082) (#125237)
(cherry picked from commit cbfd392479)
2024-10-10 10:43:43 +00:00
Miss Islington (bot)
288a0692ed
[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>
2024-10-10 10:27:48 +00:00
Miss Islington (bot)
85cf3a9dbe
[3.13] gh-125140: Remove the current directory from sys.path when using pyrepl (GH-125212) (#125224) 2024-10-10 10:35:47 +01:00
Alex Waygood
aa4da1e468
[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>
2024-10-09 20:03:30 +01:00
Miss Islington (bot)
47fa3f44ef
[3.13] docs: in venv table use executable name (GH-124315) (GH-125172)
(cherry picked from commit 7f93dbf6fe)
2024-10-09 17:54:15 +01:00
Miss Islington (bot)
ab5f1790d0
[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>
2024-10-09 14:13:23 +00:00
Miss Islington (bot)
b6c17eb76f
[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 7a303fc78a)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-10-09 22:45:03 +10:00
Miss Islington (bot)
dde8805d51
[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 92760bd85b)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-10-09 09:05:57 +00:00
Savannah Ostrowski
5f2a5ac9dc
[3.13] GH-124478: Cleanup argparse documentation (GH-124877) (#125162)
(cherry picked from commit 37228bd16e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-10-08 16:20:01 -07:00
Miss Islington (bot)
21a99add45
[3.13] Misc improvements to the itertools docs (gh-125147) (gh-125149) 2024-10-08 14:37:13 -05:00