Commit graph

124692 commits

Author SHA1 Message Date
Miss Islington (bot)
9cfa4dfe05
[3.13] gh-137450: macOS installer shell path management improvements (GH-137451) (#137452)
Separate the installer `Shell profile updater` postinstall script from the `Update Shell Profile.command` to enable more robust error handling.
(cherry picked from commit 781eb1a688)

Co-authored-by: Ned Deily <nad@python.org>
2025-08-06 07:43:54 -04:00
Miss Islington (bot)
3a61ddf2d3
[3.13] gh-81325: Support path-like objects with streaming TarFile (GH-137188) (#137366)
Co-authored-by: Alexander Urieles <aeurielesn@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-08-05 22:17:12 +01:00
Miss Islington (bot)
29ebe0435c
[3.13] Docs: add dunder and walrus to the glossary (GH-137430) (#137435)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2025-08-05 22:16:59 +01:00
Miss Islington (bot)
1bb2ae503b
[3.13] gh-136823: Update documentation on excluded headers in Python.h (GH-136824) (#137438)
Co-authored-by: Sina Zel taat <111974143+SZeltaat@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-08-05 22:16:24 +01:00
Miss Islington (bot)
c4c554d14d
[3.13] GH-136155: Use `sphinxext-opengraph` v0.12.0 (GH-137393) (#137432)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-05 20:21:10 +00:00
Miss Islington (bot)
db4df35384
[3.13] gh-123441: Correct the supported languages of the iso-8859-4 codec (GH-137034) (GH-137418)
(cherry picked from commit 525784aa65)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-08-05 15:02:57 +00:00
Sergey B Kirpichev
dc980b0ed6
[3.13] gh-122450: Expand documentation for `Rational and Fraction` (#136800) (#137367)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-05 14:54:31 +01:00
Bénédikt Tran
c489934b26
[3.13] gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (GH-135226) (#137408)
* [3.13] gh-135244: generate UUID random Node ID with a CSPRNG as per RFC 9562, §6.10.3 (GH-135226)

This aligns with the recommendations of RFC 9562, Section 6.10, paragraph 3 [1].

[1]: https://www.rfc-editor.org/rfc/rfc9562.html#section-6.10-3.

---------
(cherry picked from commit 1cb7163872)

Co-authored-by: LamentXU <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-08-05 09:01:07 +00:00
Miss Islington (bot)
25c221f5e7
[3.13] gh-137397: Skip test_os_open on NetBSD due to indefinite hang (GH-137398) (#137407)
gh-137397: Skip test_os_open on NetBSD due to indefinite hang (GH-137398)
(cherry picked from commit 7f416c8674)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2025-08-05 08:55:53 +00:00
Bénédikt Tran
3c37483731
[3.13] gh-132710: only use stable _uuid.generate_time_safe() to deduce MAC address (GH-132901) (#134704)
This commit includes the original commit and the NEWS entry that was added separately.

(cherry picked from commit 3bffada467)
(cherry picked from commit 9eb84d83e0)
2025-08-05 07:56:03 +00:00
Miss Islington (bot)
932221bc01
[3.13] gh-132124: improve safety nets for creating AF_UNIX socket files (GH-134085) (#134448)
* gh-132124: improve safety nets for creating AF_UNIX socket files (GH-134085)

* ensure that we can create AF_UNIX socket files
* emit a warning if system-wide temporary directory is used
(cherry picked from commit 1a07a01014)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* rename warn -> _warn for the 3.13.x backport

* Update Misc/NEWS.d/next/Library/2025-05-16-12-40-37.gh-issue-132124.T_5Odx.rst

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-08-04 07:38:49 -07:00
Pablo Galindo Salgado
235d380c4c
[3.13] gh-130077: Properly match full soft keywords in the parser (GH-135317) (#135399)
* [3.13] gh-130077: Properly match full soft keywords in the parser (GH-135317)
(cherry picked from commit ff2b5f40c2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

* Remove line the main-branch commit removed

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-08-04 15:18:05 +01:00
Miss Islington (bot)
55f8fe548a
[3.13] gh-137194: Fix requires_debug_ranges when _testcpi doesn't exist (GH-137195) (GH-137275)
(cherry picked from commit 0282eef880)

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-08-04 13:22:15 +00:00
sobolevn
17392a71ae
[3.13] gh-135839: Fix module_traverse and module_clear in subinterp modules (GH-135937) (GH-135943)
(cherry picked from commit bcc2cbaa7f)
2025-08-04 14:34:47 +02:00
Alex Waygood
d0c6b09685
[3.13] Remove Alex Waygood as a codeowner for pre-commit config (#137372) (#137374) 2025-08-04 11:40:56 +01:00
Brian Schubert
a2c749d806
[3.13] Fix typo in Lib/test/test_ast/test_ast.py (GH-136767) (#137356)
`ASTOptimiziationTests` -> `ASTOptimizationTests`
(cherry picked from commit 60146f4f6f)

Co-authored-by: Hunter Hogan <hunterhogan@users.noreply.github.com>
2025-08-04 08:56:07 +03:00
Miss Islington (bot)
1ba09b2f04
[3.13] gh-137257: Upgrade bundled pip to 25.2 (GH-137258) (GH-137362)
gh-137257: Upgrade bundled pip to 25.2 (GH-137258)
(cherry picked from commit 506542b596)

Co-authored-by: Richard Si <sichard26@gmail.com>
2025-08-04 02:23:25 +00:00
Brian Schubert
d29a9c55cf
[3.13] Doc: fix duplicated words (GH-136086) (#137357)
(cherry picked from commit 698bab5a40)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-08-04 06:41:47 +08:00
Miss Islington (bot)
fc190c3d38
[3.13] GH-136155: Use `sphinxext-opengraph` v0.11.0 (GH-137348) (#137350)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-08-03 18:39:39 +00:00
Serhiy Storchaka
1c96723cb1
[3.13] gh-137341: Remove more word duplications (GH-137342) (GH-137347)
(cherry picked from commit 1612dcbafe)
2025-08-03 17:24:26 +00:00
Miss Islington (bot)
23a3e892ee
[3.13] gh-137314: Fix incorrect treatment of format specs in raw fstrings (GH-137328) (#137345)
gh-137314: Fix incorrect treatment of format specs in raw fstrings (GH-137328)
(cherry picked from commit 0153d82a5a)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-08-03 16:58:49 +00:00
Miss Islington (bot)
7adea430c1
Doc: remove unused images (GH-137323)
(cherry picked from commit f195c28030)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-08-03 14:28:52 +09:00
Miss Islington (bot)
1b0dfbf209
[3.13] gh-135444: fix asyncio.DatagramTransport.sendto to account for datagram header size when data cannot be sent (GH-135445) (#137246)
gh-135444: fix `asyncio.DatagramTransport.sendto` to account for datagram header size when data cannot be sent (GH-135445)
(cherry picked from commit e3ea861351)

Co-authored-by: Justin Bronder <jsbronder@cold-front.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-08-03 10:18:53 +05:30
Petr Viktorin
3b28cb0f3f
[3.13] gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980) (GH-136371)
* Turn the __future__ table to list-table.
  This'll make it easier to add entries that need longer markup
* Semantic markup for __future__ feature descriptions.
* Document CO_* C macros.
(cherry picked from commit 2468aafe98)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-08-02 16:19:20 +02:00
Miss Islington (bot)
a32bd11cb0
[3.13] gh-137273: Fix debug assertion failure in locale.setlocale() on Windows (GH-137300) (GH-137306)
It happened when there were at least 16 characters after dot in the
locale name.
(cherry picked from commit 718e0c89ba)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-08-01 15:06:16 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
6a217cef27
[3.13] GH-111758: Merge TSan and UBSan reusable GHA workflows (#136820) (GH-137029)
(cherry picked from commit 65d2c51c10)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
2025-08-01 15:00:48 +02:00
Neil Schemenauer
5c16f699d2
[3.13] GH-133136: Revise QSBR to reduce excess memory held (gh-135473) (gh-136480)
The free threading build uses QSBR to delay the freeing of dictionary
keys and list arrays when the objects are accessed by multiple threads
in order to allow concurrent reads to proceed with holding the object
lock. The requests are processed in batches to reduce execution
overhead, but for large memory blocks this can lead to excess memory
usage.

Take into account the size of the memory block when deciding when to
process QSBR requests.

Also track the amount of memory being held by QSBR for mimalloc pages.
Advance the write sequence if this memory exceeds a limit.  Advancing
the sequence will allow it to be freed more quickly.

Process the held QSBR items from the "eval breaker", rather than from
`_PyMem_FreeDelayed()`.  This gives a higher chance that the global read
sequence has advanced enough so that items can be freed.

(cherry picked from commit 113de8545f)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-07-30 11:06:44 -07:00
Miss Islington (bot)
d3b5f838ec
[3.13] GH-116738: document thread-safety of bisect (GH-136555) (#137222)
* GH-116738: document thread-safety of bisect (GH-136555)
(cherry picked from commit 5236b0281b)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-07-30 11:50:39 +00:00
Miss Islington (bot)
d61f8b841d
[3.13] gh-137183: Document that array.array typecode w is new in 3.13 (GH-137184) (GH-137209)
(cherry picked from commit 0b4e13c265)

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2025-07-29 18:45:08 +02:00
Miss Islington (bot)
cdae923ffe
[3.13] gh-130577: tarfile now validates archives to ensure member offsets are non-negative (GH-137027) (#137170)
gh-130577: tarfile now validates archives to ensure member offsets are non-negative (GH-137027)
(cherry picked from commit 7040aa54f1)

Co-authored-by: Alexander Urieles <aeurielesn@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-07-28 15:59:33 +00:00
Kumar Aditya
3f57d9be8b
[3.13] gh-136759: revert rename lock.h to pylock.h (GH-137041) (#137075) (#137166)
Revert "[3.13] gh-136759: rename `lock.h` to `pylock.h` (GH-137041) (#137075)"

This reverts commit 74503acba7.
2025-07-28 12:19:32 +00:00
Miss Islington (bot)
505e2a4a2d
[3.13] gh-119711: describe create_datagram_endpoint's behavior in asyncio when local_addr is None (GH-136913) (#137163)
gh-119711: describe `create_datagram_endpoint`'s behavior in asyncio when `local_addr` is `None` (GH-136913)
(cherry picked from commit 1481384141)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-07-28 11:03:08 +00:00
Brian Schubert
c2b8a89d94
[3.13] gh-84559: improve What's New entry for multiprocessing startmethod changes (GH-128173) (#137156)
[3.13] gh-84559: improve What's New entry for `multiprocessing` start method changes (GH-128173)
(cherry picked from commit b8c313a41c)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-07-27 18:12:16 -07:00
Miss Islington (bot)
97f5fdf567
[3.13] gh-136992: Add "None" as valid SameSite value as per RFC 6265bis (GH-137040) (#137141)
gh-136992: Add "None" as valid `SameSite` value as per RFC 6265bis (GH-137040)

The "SameSite" attribute defined in RFC 6265bis [1] allows the "Strict", "Lax" and "None"
enforcement modes. We already documented "Strict" and "Lax" as being valid values
but "None" was missing from the list. While the RFC has not been formally approved,
modern browsers support the "None" value [2, 3] thereby making sense to document it.

[1]: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis
[2]: https://developers.google.com/search/blog/2020/01/get-ready-for-new-samesitenone-secure
[3]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Set-Cookie#none

---------
(cherry picked from commit ae8b7d7100)

Co-authored-by: Iqra Khan <iqraakhan2519@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-07-27 22:08:46 +02:00
Miss Islington (bot)
f867711df0
[3.13] gh-132898: Add a note in multiprocessing.Process docs about creating a process in a REPL (GH-137118) (#137155)
gh-132898: Add a note in `multiprocessing.Process` docs about creating a process in a REPL (GH-137118)

* Reword, expand, and clarify the limitation, highlighting the REPL case.
* Mention in the high level Process description.
* added a pointer to the GH issue from the doc note

---------
(cherry picked from commit 4e40f2bea7)

Co-authored-by: Duprat <yduprat@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-07-27 20:05:39 +00:00
Miss Islington (bot)
81079d7b1a
[3.13] gh-136278: Document codecs.escape_encode() and codecs.escape_decode() (GH-136314) (#137150)
gh-136278: Document codecs.escape_encode() and codecs.escape_decode() (GH-136314)

Closes GH-136278
(cherry picked from commit 6784ef7da7)

Co-authored-by: Toshaksha <147024929+Toshaksha@users.noreply.github.com>
2025-07-27 16:44:25 +00:00
Gregory P. Smith
4a37dd6cef
[3.13] gh-134698: Hold a lock when the thread state is detached in ssl (GH-134724) (#137126)
Lock when the thread state is detached.
(cherry picked from commit e047a35b23) or really from the 3.14 backport fd565fdfc9

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-27 08:30:25 -07:00
Miss Islington (bot)
89f256ecd1
[3.13] gh-126662: naming consistency for signal.ItimerError (GH-126712) (#137123)
gh-126662: naming consistency for `signal.ItimerError` (GH-126712)
(cherry picked from commit d5fa437dfb)

Co-authored-by: Stephen Morton <git@tungol.org>
2025-07-27 09:58:21 +05:30
Miss Islington (bot)
2b84dfdf97
[3.13] Link to plaintext for "show source" links (GH-137131) (#137133)
Co-authored-by: ryan-duve <ryan-duve@users.noreply.github.com>
2025-07-27 01:55:51 +00:00
Miss Islington (bot)
a995a11b23
[3.13] gh-131038: Use text=True in subprocesses in test_perf_profiler (GH-137117) (#137125) 2025-07-26 17:24:32 +00:00
Miss Islington (bot)
8f4121168a
[3.13] gh-130522: Fix unraisable TypeError in threading at interpreter shutdown (GH-131537) (GH-137106)
gh-130522: Fix unraisable TypeError in threading at interpreter shutdown (GH-131537)
(cherry picked from commit cb93b6fc5e)

Co-authored-by: Tyler Kennedy <tk@tkte.ch>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-25 15:14:27 +00:00
Miss Islington (bot)
eda613438f
[3.13] Fix Queue.shutdown docs for condition to unblock a join (gh-137088) (gh-137102) 2025-07-25 08:48:28 -06:00
Miss Islington (bot)
d9feec4542
[3.13] Fix docs for Queue.shutdown (gh-137028) (gh-137081) 2025-07-24 11:54:42 -06:00
AN Long
74503acba7
[3.13] gh-136759: rename lock.h to pylock.h (GH-137041) (#137075)
Rename `lock.h` to `pylock.h` to avoid conflicts with headers of other projects.
(cherry picked from commit ec02db5caa)
2025-07-24 21:36:25 +05:30
Miss Islington (bot)
2880798d0e
[3.13] gh-136516: Mention installation artifacts as de-facto resources (GH-136419) (GH-137039)
Files like NUL on windows are, from `importlib.resources` point of
view, an artifact caused by installing to a filesystem directory.
Mention these.
(cherry picked from commit fac4964fdb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-24 09:01:12 +02:00
Miss Islington (bot)
6ffeef10b2
[3.13] gh-137043: mention PyList_GET_ITEM as unsafe borrowed API in free-threading docs (GH-137042) (#137046)
gh-137043: mention `PyList_GET_ITEM` as unsafe borrowed API in free-threading docs (GH-137042)
(cherry picked from commit 38b936cc99)

Co-authored-by: Guido Imperiale <crusaderky@gmail.com>
2025-07-23 14:42:53 +00:00
Miss Islington (bot)
9ab885e0a1
[3.13] gh-136437: Convert more `os.path` functions to positional-only in the docs (GH-136970) (#137001)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-07-22 13:44:36 +00:00
Miss Islington (bot)
8de88e0840
[3.13] gh-118350: Fix support of elements "textarea" and "title" in HTMLParser (GH-135310) (GH-136985)
(cherry picked from commit 4d02f31cdd)

Co-authored-by: Timon Viola <44016238+timonviola@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-07-22 14:17:59 +02:00
Miss Islington (bot)
4999cdbced
[3.13] gh-131531: Android test fixes (GH-136845) (#136963)
Modifies the test runner script to no longer export the the HOST environment
variable, and to allow for tests that produce no Python output (output from the
Android console is still expected and required). These changes stem from
knowledge gained during developing a PR for Android support in cibuildwheel.
(cherry picked from commit 149bddcc21)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-07-22 19:27:02 +08:00
Miss Islington (bot)
853b5c43d0
[3.13] gh-135661: Fix parsing attributes with whitespaces around the "=" separator in HTMLParser (GH-136908) (GH-136918)
This fixes a regression introduced in GH-135930.
(cherry picked from commit dee6501894)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-22 11:56:10 +02:00