Commit graph

119897 commits

Author SHA1 Message Date
Miss Islington (bot)
2746ec4ce2
[3.12] gh-125660: Reject invalid unicode escapes for Python implementation of JSON decoder (GH-125683) (GH-125695)
(cherry picked from commit df751363e3)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-10-21 16:08:10 +03:00
Miss Islington (bot)
18196fea89
[3.12] gh-125682: Reject non-ASCII digits in the Python implementation of JSON decoder (GH-125687) (GH-125693)
(cherry picked from commit d358425e69)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-10-21 16:06:02 +03:00
Erlend E. Aasland
2bc2aae386
[3.12] gh-125741: Update check_generated_files CI to use our published container image (gh-125744) (#125760)
(cherry picked from commit ed24702bd0)

Co-authored-by: Donghee Na <donghee.na@python.org>
2024-10-21 12:23:41 +02:00
Miss Islington (bot)
8cc8d7d61f
[3.12] gh-125519: Improve traceback if importlib.reload() is called with a non-module object (GH-125520) (#125769)
gh-125519: Improve traceback if `importlib.reload()` is called with a non-module object (GH-125520)
(cherry picked from commit c5c21fee7a)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-21 08:20:42 +00:00
Miss Islington (bot)
9a22ec735f
[3.12] gh-99030: Added documentation links for types and exceptions (GH-123857) (GH-125765)
gh-99030: Added documentation links for types and exceptions (GH-123857)

* Added documentation links for types and exceptions

* Shortened description sentences

* Change content

* Change documentation

* Move seealso

* Add a spaces
(cherry picked from commit 9256be7ff0)

Co-authored-by: RUANG (Roy James) <longjinyii@outlook.com>
2024-10-21 00:43:26 +00:00
Miss Islington (bot)
5f6e1120e3
[3.12] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#125727)
gh-125522: Fix bare except in test_math.testTan (GH-125544)
(cherry picked from commit 4b421e8aca)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-10-19 12:07:16 +00:00
Miss Islington (bot)
2ce10b1729
[3.12] GH-125277: Increase minimum supported Sphinx to 7.2.6 (GH-125368) (#125721) 2024-10-19 04:27:44 +00:00
Miss Islington (bot)
93933782d9
[3.12] Add tests for time.strftime() with invalid format string (GH-125696) (GH-125701)
(cherry picked from commit 2e950e3419)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-18 14:13:31 +00:00
Miss Islington (bot)
aa9faee686
[3.12] gh-125620: Skip check_resource_tracker_death on NetBSD due to long wait for SIGKILL process termination (GH-125621) (#125673)
gh-125620: Skip check_resource_tracker_death on NetBSD due to long wait for SIGKILL process termination (GH-125621)

* Skip test_resource_tracker_sigkill on NetBSD
(cherry picked from commit a0f5c8e627)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-10-18 02:25:00 +00:00
Miss Islington (bot)
232b303e4c
[3.12] gh-52551: Fix encoding issues in strftime() (GH-125193) (GH-125657) (GH-125661)
Fix time.strftime(), the strftime() method and formatting of the
datetime classes datetime, date and time.

* Characters not encodable in the current locale are now acceptable in
  the format string.
* Surrogate pairs and sequence of surrogatescape-encoded bytes are no
  longer recombinated.
* Embedded null character no longer terminates the format string.

This fixes also gh-78662 and gh-124531.

(cherry picked from commit 08ccbb9b3f)
(cherry picked from commit ad3eac1963)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-17 20:04:48 +00:00
Miss Islington (bot)
5e62d9bd54
[3.12] [3.13] gh-123370: Fix the canvas not clearing after running turtledemo.clock (gh-123457) (GH-125653) (#125656)
Rewriting the day and date every tick somehow prevented them from being removed either by clicking STOP or loading another example.  The solution is to rewrite them only when they change.
(cherry picked from commit c124577ebe)

(cherry picked from commit 30d7e9e721)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Wulian <xiguawulian@gmail.com>
2024-10-17 17:09:05 +00:00
Miss Islington (bot)
dc0a176321
[3.12] gh-113570: reprlib.repr does not use builtin __repr__ for reshadowed builtins (GH-113577) (GH-125655)
(cherry picked from commit 04d6dd23e2)

Co-authored-by: George Pittock <66332098+georgepittock@users.noreply.github.com>
2024-10-17 16:59:01 +00:00
Miss Islington (bot)
8f72f33d69
[3.12] gh-125625: Check for py -3.13 in PCbuild/find_python.bat (GH-125649)
(cherry picked from commit 0cb20f2e7e)

Co-authored-by: Wulian <xiguawulian@gmail.com>
2024-10-17 16:01:55 +00:00
Miss Islington (bot)
fb1b92b327
[3.12] gh-95836: Add custom type converter examples to argparse tutorial (GH-125376) (GH-125642)
(cherry picked from commit dbcc5ac470)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-17 15:42:55 +03:00
Thomas Grainger
32d457941e
[3.12] gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959) (#125466)
gh-124958: fix asyncio.TaskGroup and _PyFuture refcycles (#124959)
2024-10-16 21:45:59 -07:00
Miss Islington (bot)
42b8e52de4
gh-125550: Enable py.exe to detect Store installs of 3.14 (GH-125551)
(cherry picked from commit 8e7b2a1161)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-10-16 22:25:16 +00:00
Sam Gross
4256847190
[3.12] gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (GH-125492) (#125599)
There was a deadlock when `ProcessPoolExecutor` shuts down at the same
time that a queueing thread handles an error processing a task.

Don't use `_shutdown_lock` to protect the `_ThreadWakeup` pipes -- use
an internal lock instead. This fixes the ordering deadlock where the
`ExecutorManagerThread` holds the `_shutdown_lock` and joins the
queueing thread, while the queueing thread is attempting to acquire the
`_shutdown_lock` while closing the `_ThreadWakeup`.
(cherry picked from commit 760872efec)
2024-10-16 14:03:32 -04:00
Miss Islington (bot)
cbd50a4bdc
[3.12] gh-125041: test_zlib: For s390x HW acceleration, only skip checking the compressed bytes (GH-125042) (GH-125526)
(cherry picked from commit cc5a225cdc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-10-16 14:44:37 +02:00
Miss Islington (bot)
90b1406b88
[3.12] gh-100141: Allow pdb to deal with empty file (GH-125425) (#125537)
gh-100141: Allow pdb to deal with empty file (GH-125425)
(cherry picked from commit bb9604b62a)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-10-15 16:29:05 +00:00
Miss Islington (bot)
1cab726622
[3.12] gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379) (GH-125539)
(cherry picked from commit c9826c11db)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-15 16:09:55 +00:00
Miss Islington (bot)
0a82c4cbd8
[3.12] gh-125422: Don't set the caller's f_trace if it's botframe (GH-125427) (#125531)
gh-125422: Don't set the caller's f_trace if it's botframe (GH-125427)
(cherry picked from commit 703227dd02)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2024-10-15 15:26:41 +00:00
Miss Islington (bot)
26725d1756
[3.12] gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516) (#125525)
gh-125514: fix bug in test_traceback utility. Specify exception types in except: clauses (GH-125516)
(cherry picked from commit 55c4f4c30b)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-10-15 14:28:23 +00:00
Miss Islington (bot)
79422bc13b
[3.12] Doc: Update CVE URL (GH-125489) (#125504)
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-10-15 07:36:17 +00:00
Miss Islington (bot)
449f2c98bd
[3.12] gh-85453: Improve variable mark up for datetime.rst (GH-120702) (#125491)
Variables and literals are marked up using backticks.
(cherry picked from commit 2a5cdb2516)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-10-14 22:09:23 +00:00
Miss Islington (bot)
86296bbc17
[3.12] Fix idlelib typos (GH-125484) (#125488)
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 3fea1d000e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-10-14 21:34:38 +00:00
Serhiy Storchaka
9290868155
[3.12] gh-53203: Fix strptime() for %c, %x and %X formats on many locales (GH-125406) (GH-125454) (GH-125483)
Fixed most locales that use non-ASCII digits, like Persian, Burmese,
Odia and Shan.
(cherry picked from commit 5f4e5b598c)

(cherry picked from commit cbcdf34a4b)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
2024-10-14 20:59:01 +00:00
Miss Islington (bot)
f1a6f68777
[3.12] gh-125461: Remove Python 2 from identifiers in doc (GH-125462) (#125465)
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:56 -07:00
Serhiy Storchaka
21524eec48
[3.12] gh-86357: argparse: use str() consistently and explicitly to print choices (GH-117766) (GH-125432)
(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:04:44 +00:00
Miss Islington (bot)
20323bf733
[3.12] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125429)
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:51:59 +00:00
Barney Gale
f49221af46
[3.12] GH-125069: Fix inconsistent joining in WindowsPath(PosixPath(...)) (GH-125156) (#125410)
`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: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-13 18:18:41 +00:00
Miss Islington (bot)
243a8a9d68
[3.12] gh-101291: Add versionadded directives for PyUnstable_Long_* (GH-125384) (#125408)
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:45:59 +00:00
Miss Islington (bot)
00c596d8ad
[3.12] gh-125383: Update fib function comment for accuracy (GH-125386) (#125396)
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:17:55 +00:00
Miss Islington (bot)
a144037ac3
[3.12] gh-61698: Use launchctl to detect macOS window manager in tests (GH-118390) (#125393)
(cherry picked from commit ce740d4624)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-13 08:39:05 +00:00
Miss Islington (bot)
afddaeb769
[3.12] gh-86673: Loosen test_ttk.test_identify() requirements (GH-125335) (#125391)
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 07:56:04 +00:00
Miss Islington (bot)
77020dae34
[3.12] Trivial change: Update comments in activate about what running hash -r does (GH-125385) (#125388)
(cherry picked from commit 82bcaf1589)
2024-10-13 08:55:37 +01:00
Miss Islington (bot)
1d45fae26d
[3.12] gh-125289: Update sample code in asyncio-task.rst (GH-125292) (GH-125375)
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:44:41 +00:00
Miss Islington (bot)
331fc017ce
[3.12] gh-53203: Fix strptime() for %c and %x formats on many locales (GH-124946) (GH-125370)
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:02:52 +00:00
Miss Islington (bot)
e01a1784db
[3.12] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125358)
(cherry picked from commit 07c2d15977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-12 16:02:14 +03:00
Miss Islington (bot)
aa0cdeb93c
[3.12] gh-125254: Fix error report about ambiguous option in argparse (GH-125273) (GH-125360)
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:24 +03:00
Miss Islington (bot)
affffc7dda
[3.12] gh-124309: fix staggered race on eager tasks (GH-124847) (#125340)
gh-124309: fix staggered race on eager tasks (GH-124847)

This patch is entirely by Thomas and Peter

(cherry picked from commit 979c0df7c0)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-10-11 20:12:11 -07:00
Miss Islington (bot)
2264c097e0
[3.12] Doc: Fix a typo in "Function Examples" in the control-flow tutorial (GH-125338) (#125342)
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:47:23 +00:00
Miss Islington (bot)
3f38ea11c0
[3.12] gh-116938: Clarify documentation of dict and dict.update regarding the positional argument they accept (GH-125213) (#125337)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-11 23:23:54 +00:00
Jelle Zijlstra
4ab19f912d
[3.12] gh-124917: Allow keyword args to os.path.exists/lexists on Windows (GH-124918) (#125334)
(cherry picked from commit cc2938a189)
2024-10-11 15:18:46 -07:00
Serhiy Storchaka
59036318bf
[3.12] gh-125301: Backport some test support helpers (is_apple_mobile, is_apple) (GH-125311)
(cherry picked from commit 391659b3da)
2024-10-11 14:22:27 +03:00
Miss Islington (bot)
7c48c63021
[3.12] Add some doctest cleanups for configparser (GH-125288) (#125291)
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:52:15 +00:00
Miss Islington (bot)
23cefd9f4c
[3.12] gh-61011: Fix inheritance of nested mutually exclusive groups in argparse (GH-125210) (GH-125309)
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:07:03 +00:00
Miss Islington (bot)
4c40381023
[3.12] gh-125058: update _thread docs regarding interruptibility of lock.acquire() (GH-125141) (#125307)
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:22:34 +00:00
Miss Islington (bot)
ee1257cb9c
[3.12] gh-125296: Fix strange fragment identifier for name or flags in argparse docs (GH-125297) (#125300)
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:39:54 +00:00
Miss Islington (bot)
171ebcd4df
[3.12] [3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (GH-125232) (GH-125284)
(cherry picked from commit 26a93189e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-11 09:37:55 +03:00
Miss Islington (bot)
91c7a2cb89
[3.12] Doc: Upgrade Sphinx to 8.1 (GH-125276) (#125279)
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:32:40 +00:00