Commit Graph

124358 Commits

Author SHA1 Message Date
Noam Cohen aebbbaffe8
[3.13] gh-132542: Set native thread ID after fork (GH-132701) (GH-134361)
(cherry picked from commit 6b73502313)
2025-05-20 17:03:19 +00:00
Miss Islington (bot) bad9f63f6c
[3.13] gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238) (gh-134353)
gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238)
(cherry picked from commit 317c496223)

Co-authored-by: Donghee Na <donghee.na@python.org>
2025-05-20 16:26:23 +00:00
Hugo van Kemenade 61af847d41
[3.13] gh-101100: Fix Sphinx warnings in `library/decimal.rst` (GH-134303) (#134339)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 17:55:23 +03:00
Guido van Rossum eca8ff1ae2
[3.13] gh-128307: Update what's new in 3.13 with create_task changes of asyncio (#134304) (#134335)
(It's complicated.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 07:30:18 -07:00
Serhiy Storchaka 6279eb8c07
[3.13] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944)
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 14:46:57 +02:00
Miss Islington (bot) 0c0fedf289
[3.13] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134329)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

(cherry picked from commit a31bbc951a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 12:17:10 +00:00
Miss Islington (bot) edf2de0178
[3.13] Clean up test_posixpath (GH-134315) (GH-134317)
* Ensure that created files and dirs are always removed after test.
  Now addCleanup() does not conflict with tearDown().
* Use os_helper.unlink() and os_helper.rmdir().
* Import TESTFN from os_helper.
(cherry picked from commit e29171bf8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 08:15:29 +00:00
Miss Islington (bot) 783675e73f
[3.13] gh-133940: test_strftime incorrectly calculates expected week (GH-134281) (#134302)
gh-133940: test_strftime incorrectly calculates expected week (GH-134281)

Let the system determine the correct tm_wday and tm_isdst.
(cherry picked from commit e3dda8f818)

Co-authored-by: Gustaf <79180496+GGyll@users.noreply.github.com>
2025-05-20 01:17:22 +00:00
Miss Islington (bot) edbde92a12
[3.13] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134297)
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------
(cherry picked from commit 66aaad6103)

Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-20 00:05:26 +00:00
Miss Islington (bot) da506b2560
[3.13] gh-117596: Add more tests for os.path with invalid paths (GH-134189) (GH-134266)
(cherry picked from commit 871d269875)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 18:41:37 +00:00
Miss Islington (bot) c1e47702a2
[3.13] gh-125225: Fix column misalignment in help('topics') output (gh-125226) (#134226)
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.

Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.
(cherry picked from commit b22460c44d)

Co-authored-by: Étienne Pelletier <EtiennePelletier@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 17:34:31 +02:00
Miss Islington (bot) 08c9ba5b72
[3.13] gh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136) (gh-134221)
(cherry picked from commit c31547a591)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 16:13:25 +02:00
Miss Islington (bot) 55a7cb1206
[3.13] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134218)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:29 +03:00
Peter Bierma 8d92823eca
[3.13] Docs: C API: Fix the incorrect `PyThreadState_Swap` documentation (#133900) 2025-05-19 18:24:00 +05:30
Serhiy Storchaka 06a8c0613e
[3.13] gh-133890: Handle UnicodeEncodeError in tarfile (GH-134147) (GH-134196)
UnicodeEncodeError is now handled the same way as OSError during
TarFile member extraction.
(cherry picked from commit 9983c7d441)
2025-05-19 10:37:36 +00:00
Miss Islington (bot) ea9c9623f0
[3.13] gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328) (GH-134204)
(cherry picked from commit d55e11b804)

Co-authored-by: BecoKo <koev_v@yahoo.com>
2025-05-19 09:57:19 +00:00
Miss Islington (bot) 821a87e7a6
[3.13] gh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH-134135) (GH-134191)
The query and fragment are ambiguous and not used.
(cherry picked from commit 5cbc8c632e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-18 22:16:56 +03:00
Miss Islington (bot) 018ec634f6
[3.13] document `Py_VISIT` as a macro in the docs (GH-133688) (#134187)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:36:04 +00:00
Miss Islington (bot) 9c297690d5
[3.13] fix indent in `controlflow.rst` docs (GH-134008) (#134185)
fix indent in `controlflow.rst` docs (GH-134008)
(cherry picked from commit 4ce91871a9)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-18 16:27:09 +00:00
Miss Islington (bot) 523024499e
[3.13] gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (GH-134117) (#134172)
gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (GH-134117)
(cherry picked from commit 4e9005d32f)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
2025-05-18 20:38:28 +05:30
Thomas Grainger fd6a602d04
[3.13] gh-133745: Fix asyncio task factory name/context kwarg breaks (#133948)
In 3.13.3 we accidentally broke the interface for custom task factory. Factory authors added workarounds.
This PR (for 3.13.4) unbreaks task factories that haven't made a workaround yet while also supporting those that have.

NOTE: The custom task factory API will change to what we accidentally released in 3.13.3.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2025-05-18 06:50:07 -07:00
Miss Islington (bot) ebe54d7ab7
[3.13] gh-134150: Clarify distinction between JSON and Python objects (GH-134154) (#134167)
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)

* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)

Co-authored-by: Micha Albert <micha@2231puppy.tech>
2025-05-18 01:53:37 +00:00
Miss Islington (bot) f62543271a
[3.13] gh-88275: Add missing `__init__` method to `match` example (GH-120281) (#134143)
gh-88275: Add missing `__init__` method to `match` example (GH-120281)
(cherry picked from commit 7a9d46295a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-05-17 13:18:14 +00:00
Miss Islington (bot) ec42d72f47
[3.13] Docs: fix spelling of "test case" in `unittest` documentation (GH-134137) (#134139)
Docs: fix spelling of "test case" in `unittest` documentation (GH-134137)
(cherry picked from commit b41d79c776)

Co-authored-by: Clifford Gama <53076065+cliff688@users.noreply.github.com>
2025-05-17 14:03:58 +02:00
Miss Islington (bot) c529870542
[3.13] gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (GH-133910) (#134127)
gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (GH-133910)
(cherry picked from commit c1c9ad1d5a)

Co-authored-by: Oleg Burnaev <51371645+Shepard2154@users.noreply.github.com>
2025-05-17 08:05:41 +00:00
Miss Islington (bot) bc0dc9d4ef
[3.13] gh-134098: Fix handling %-encoded trailing slash in SimpleHTTPRequestHandler (GH-134099) (GH-134124)
(cherry picked from commit 2f1ecb3bc4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-17 07:33:42 +00:00
Miss Islington (bot) 6dae082584
[3.13] gh-133889: Improve tests for SimpleHTTPRequestHandler (GH-134102) (GH-134122)
(cherry picked from commit fcaf009907)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-17 07:23:27 +00:00
Miss Islington (bot) 510e28ec29
[3.13] gh-134109: Fix showing comments in pydoc output for argparse (GH-134110) (GH-134113)
Comments immediately preceding the object's source code are used
if the object has no docstring.
Comments that do not describe the object should be separated from
the following source code by an empty line.
(cherry picked from commit 71cf4dd622)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-16 20:52:42 +00:00
Miss Islington (bot) 4291bbe88b
[3.13] gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027) (GH-134108)
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)

Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
2025-05-16 22:24:05 +03:00
Miss Islington (bot) 8077e2268c
[3.13] gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340) (#134106)
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
2025-05-16 20:20:53 +01:00
Miss Islington (bot) 2a029a7d79
[3.13] gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081) (#134094)
gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081)
(cherry picked from commit d94b1e9cac)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-16 15:38:22 +00:00
Miss Islington (bot) 0007c9b505
[3.13] gh-124210: Add introduction to `threading` docs (GH-127046) (#134091)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-16 12:25:22 +00:00
Miss Islington (bot) bc1a6ecfab
[3.13] gh-133410: Fix PR detection in build workflow (GH-133671) (#134054)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-15 16:41:47 +03:00
sobolevn cec0e13fd4
[3.13] gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802) (#134040)
(cherry picked from commit 7eaa097390)
2025-05-15 13:43:15 +03:00
Miss Islington (bot) f81f1bb2f9
[3.13] Test also error messages in test_limit_int. (GH-134018) (GH-134032)
(cherry picked from commit e123a1d09b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-15 07:45:00 +00:00
Miss Islington (bot) bd3add06f6
[3.13] gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987) (#133992)
gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987)
---------
(cherry picked from commit 3e23047363)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-05-14 21:33:38 -04:00
Miss Islington (bot) f474264b1e
[3.13] Improve tests for str to Fraction conversion (GH-134010) (GH-134017)
(cherry picked from commit 17d0fec702)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-14 17:42:23 +00:00
Miss Islington (bot) ab8aafe551
[3.13] Docs: remove link elements in builders other than HTML (GH-133720) (#134006)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-05-14 18:22:27 +03:00
Hugo van Kemenade 5d186350b6
[3.13] Remove trailing whitespace from python.gram (#133858) (#133991)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-14 13:25:04 +03:00
Sam Gross e1cc789531
gh-132869: Fix crash in `_PyObject_TryGetInstanceAttribute` (#133700)
This fixes a crash in `_PyObject_TryGetInstanceAttribute` due to the use
of `_PyDictKeys_StringLookup` on an unlocked dictionary that may be
concurrently modified.

The underlying bug was already fixed in 3.14 and the main branch.

(partially cherry picked from commit 1b15c89a17)
2025-05-14 12:47:34 +09:00
Stan Ulbrych 78a04b3300
[3.13] gh-46236: Document PyUnicode_BuildEncodingMap (#133770) 2025-05-13 19:23:43 -04:00
Brandt Bucher 50b45c4f45
[3.13] GH-133543: Maintain tracking for materialized instance dictionaries (GH-133617) 2025-05-12 13:00:01 -07:00
Miss Islington (bot) 05ddd06624
[3.13] gh-133413: Fix references to removed Request.has_data (GH-133414) (GH-133946)
The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0)

Co-authored-by: ppaez <pp@pp.com.mx>
2025-05-12 18:25:25 +00:00
Serhiy Storchaka d9d8e9a00c
[3.13] gh-133677: Fix tests when running in non-UTF-8 locale (GH-133865) (GH-133939)
(cherry picked from commit 14305a83d3)
2025-05-12 17:02:19 +00:00
Victor Stinner 5ce47b96b0
[3.13] gh-133744: Fix multiprocessing interrupt test: add an event (#133746) (#133917)
gh-133744: Fix multiprocessing interrupt test: add an event (#133746)

Add an event to synchronize the parent process with the child
process: wait until the child process starts sleeping.

(cherry picked from commit c2989b7070)
2025-05-12 14:16:52 +00:00
mkaraev 532acbd0fa
[3.13] gh-133904: Fix `math.factorial` documentation (GH-133907) (#133922)
* [3.13] gh-133904: Fix `math.factorial` documentation (GH-133907)
(cherry picked from commit 27ed64575d)

Co-authored-by: mkaraev <maruf.karaev97@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-12 12:17:17 +00:00
Miss Islington (bot) 8e923f3659
[3.13] gh-91555: disable logger while handling log record (GH-131812) (GH-133898)
Co-authored-by: Duane Griffin <duaneg@dghda.com>
2025-05-12 07:29:06 +01:00
Victor Stinner 5cd56b249f
[3.13] gh-133441: Fix STORE_ATTR_WITH_HINT bytecode (#133446)
Deoptimize if the dict is a dict subclass.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-11 23:10:04 +02:00
Miss Islington (bot) 927da99219
[3.13] gh-133823: update "Pending Removal in 3.15" notes about `TypedDict` (GH-133864) (#133871)
gh-133823: update "Pending Removal in 3.15" notes about `TypedDict` (GH-133864)
(cherry picked from commit f91127ae1a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-11 08:18:04 +00:00
Inada Naoki f0a88e2ce5
gh-133703: dict: fix calculate_log2_keysize() (GH-133809)
(cherry picked from commit 92337f666e)
2025-05-11 15:14:11 +09:00