Commit graph

125492 commits

Author SHA1 Message Date
Thomas Wouters
1cbe481834 Python 3.13.12 2026-02-03 18:53:27 +01:00
Miss Islington (bot)
ad5bd4ad47
[3.13] gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683) (GH-144432)
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)

Use getLogger() to get root logger in logging cookbook
(cherry picked from commit 53fecbe6e1)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-02-03 14:55:25 +00:00
Miss Islington (bot)
5e888993e4
[3.13] gh-74453: Add stronger security warning to os.path.commonprefix
gh-74453: Add stronger security warning to os.path.commonprefix (GH-144401)
(cherry picked from commit 4e15b8d95d)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-03 14:16:28 +00:00
Miss Islington (bot)
44820648e6
[3.13] gh-106318: Add examples for str.rindex() method (GH-143887) (#144422)
gh-106318: Add examples for str.rindex() method (GH-143887)
(cherry picked from commit 45d00a0791)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-03 14:36:32 +01:00
Miss Islington (bot)
9d76689343
[3.13] gh-75572: Speed up test_xpickle (GH-144393) (GH-144404)
Run a long living subprocess which handles multiple requests instead of
running a new subprocess for each request.
(cherry picked from commit 29acc08c8d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-03 10:40:48 +00:00
Miss Islington (bot)
ebc047f717
[3.13] gh-144415: Android testbed fixes (GH-142912) (#144417)
Modifies handling of `.gz` files in Android app payloads, and ensures that
when the Android testbed streams logs, stream flushes aren't treated as
newlines. This improves the output of test suites that use "one dot per test"
progress indicators.
(cherry picked from commit cb1dc91dcb)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2026-02-03 09:28:43 +00:00
Guo Ci
b4a84bc555
[3.13] gh-140806: add docs for enum.bin function (#140807) (#143740)
(cherry picked from commit 7f50a5febd)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-02-02 22:57:53 +01:00
Miss Islington (bot)
b74e3a4c05
[3.13] gh-142555: Fix null pointer dereference in array.__setitem__ via re-entrant __index__ (GH-142713) (#144397)
gh-142555: Fix null pointer dereference in array.__setitem__ via re-entrant __index__ (GH-142713)
(cherry picked from commit 39f16a93ef)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-02-02 21:06:59 +01:00
Miss Islington (bot)
bb1247d83c
[3.13] gh-129401: Test repr rlock failing randomly (GH-129959) (#144405)
Fix and simplify a test of `test_repr_rlock` about multiprocessing.RLock primitive.
(cherry picked from commit a98a6bd112)

Co-authored-by: Duprat <yduprat@gmail.com>
2026-02-02 14:11:03 -05:00
Stan Ulbrych
54ece4bd58
[3.13] gh-144376: Only run 'address' fuzzer for python3-libraries (GH-144398) (#144400)
(cherry picked from commit 5f91577cdd)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-02 17:51:05 +01:00
Miss Islington (bot)
51fccc6059
[3.13] gh-144380: Fix incorrect type check in buffered_iternext() (GH-144381) (#144390)
gh-144380: Fix incorrect type check in `buffered_iternext()` (GH-144381)
(cherry picked from commit 40d07cad38)

Co-authored-by: Ruiyang Ke <me@ry.ke>
2026-02-02 10:29:16 +00:00
Peter Bierma
78a37d521e
[3.13] gh-144307: Fix a reference leak during module teardown (GH-144308) (GH-144328)
(cherry picked from commit 219b7ac9d5)

Signed-off-by: Yongtao Huang <yongtaoh2022@gamil.com>
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-01-29 19:18:39 +00:00
Miss Islington (bot)
a75c58b6c8
[3.13] gh-142387: Reduce Android testbed API level to 33 (GH-144315) (#144318)
The emulator images for API level 34 and 35 have significant issues with image size and
internet connectivity. Reverts the default API level used for testbed testing to 33.
(cherry picked from commit 6543720b63)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2026-01-29 08:42:13 +08:00
Victor Stinner
e752ea9eb9
[3.13] gh-144194: Fix mmap failure check in perf_jit_trampoline.c (#143713) (#144304)
gh-144194: Fix mmap failure check in perf_jit_trampoline.c (#143713)

mmap() returns MAP_FAILED ((void*)-1) on error, not NULL. The current
check never detects mmap failures, so jitdump initialization proceeds
even when the memory mapping fails.

(cherry picked from commit 8fe8a94a7c)

Co-authored-by: stratakis <cstratak@redhat.com>
2026-01-28 14:15:39 +00:00
Jelle Zijlstra
bc92e7878f
[3.13] gh-144169: Fix three crashes in AST objects with non-str kwargs (GH-144178) (#144260)
(cherry picked from commit 639c1ad4f1)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-27 20:37:35 -08:00
Nathan Goldbaum
b5129b89bb
[3.13] gh-144257: document return values of PyModule_SetDocString (GH-144258) (GH-144286)
(cherry picked from commit 3e9a5b022f)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-27 18:30:48 +00:00
Victor Stinner
3df9e31142
[3.13] gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#144108) (#144245)
gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#144108)


(cherry picked from commit 8f459255eb)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
2026-01-27 12:59:55 +01:00
Miss Islington (bot)
d6f4fb867a
[3.13] gh-142119: Clarify that one contextvars.Token can only reset once in a lifetime (GH-143693) (GH-144267)
(cherry picked from commit 487bd2dea5)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-27 11:39:20 +01:00
Miss Islington (bot)
33a488e929
[3.13] gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-140466) (#144268)
gh-126014: test_makefile_test_folders: Ignore basically-empty directories (GH-140466)

The code in test_makefile was attempting to ignore any
non-interesting files, but missed some corners:

1. There is never a *file* called `__pycache__`.
2. A directory containing only a `__pycache__` subdirectory should be
   ignored.
3. A directory containing only hidden files should be ignored.

Simplify this all into a couple of filters that let us check for empty
lists.
(cherry picked from commit 17d447e993)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2026-01-27 10:28:09 +00:00
Miss Islington (bot)
f9f0a78f1c
[3.13] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144253)
gh-101888: Add function.__builtins__ to ref documentation (GH-144174)
(cherry picked from commit 933540e332)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-26 16:22:31 +00:00
Petr Viktorin
fdac87ae39
[3.13] gh-127773: Disable attribute cache on incompatible MRO entries (GH-127924) (GH-143729) 2026-01-26 16:31:52 +01:00
Miss Islington (bot)
01c18767f0
[3.13] gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (GH-144025) (#144247)
gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (GH-144025)
(cherry picked from commit 923d9d2ac2)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
2026-01-26 13:45:22 +00:00
Miss Islington (bot)
ef5bc9ec9b
[3.13] gh-144233: Fix typo in os.eventfd documentation (GH-144234) (#144237)
gh-144233: Fix typo in os.eventfd documentation (GH-144234)
(cherry picked from commit 9982147433)

Co-authored-by: Solomon Ritzow <11698787+ritzow@users.noreply.github.com>
2026-01-26 08:16:06 +00:00
Miss Islington (bot)
f738386838
[3.13] gh-143935: Email preserve parens when folding comments (GH-143936) (#144035)
gh-143935: Email preserve parens when folding comments (GH-143936)

Fix a bug in the folding of comments when flattening an email message
using a modern email policy. Comments consisting of a very long sequence of
non-foldable characters could trigger a forced line wrap that omitted the
required leading space on the continuation line, causing the remainder of
the comment to be interpreted as a new header field. This enabled header
injection with carefully crafted inputs.
(cherry picked from commit 17d1490aa9)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Denis Ledoux <dle@odoo.com>
2026-01-25 17:09:53 +00:00
Miss Islington (bot)
8ad828750f
[3.13] gh-143237: Fix support of named pipes in the rotating logging handlers (GH-143259) (#143298)
gh-143237: Fix support of named pipes in the rotating logging handlers (GH-143259)

This fixes regression introduced in GH-105887.
(cherry picked from commit aa8a43d179)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-25 17:09:40 +00:00
Miss Islington (bot)
0a925ab591
[3.13] gh-144125: email: verify headers are sound in BytesGenerator (#144181)
gh-144125: email: verify headers are sound in BytesGenerator
(cherry picked from commit 052e55e7d4)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Denis Ledoux <dle@odoo.com>
Co-authored-by: Denis Ledoux <5822488+beledouxdenis@users.noreply.github.com>
Co-authored-by: Petr Viktorin <302922+encukou@users.noreply.github.com>
Co-authored-by: Bas Bloemsaat <1586868+basbloemsaat@users.noreply.github.com>
2026-01-25 17:09:26 +00:00
Miss Islington (bot)
918387e491
[3.13] gh-143919: Reject control characters in http cookies (#144090)
gh-143919: Reject control characters in http cookies
(cherry picked from commit 95746b3a13)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-25 17:09:22 +00:00
Miss Islington (bot)
a47f1b14f6
[3.13] Programming FAQ: fix some punctuaction typos (GH-144058) (#144186)
Programming FAQ: fix some punctuaction typos (GH-144058)

(cherry picked from commit 03e651d601)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-25 17:09:04 +00:00
Seth Michael Larson
a35ca3be58
[3.13] gh-143925: Reject control characters in data: URL mediatypes (#144111)
(cherry picked from commit f25509e78e)
2026-01-25 17:06:01 +00:00
Stan Ulbrych
8072d67a7c
[3.13] gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143392) (GH-144153)
(cherry picked from commit 72bacb0cd0)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
2026-01-24 17:13:13 +02:00
Terry Jan Reedy
ed102a8c5a
[3.13] gh-135142: Initial 3.15 News3.txt entries (GH-144200) (#144202)
(cherry picked from commit 29f1e778fa)
2026-01-23 22:16:21 -05:00
Miss Islington (bot)
cbfebb1bc5
[3.13] gh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028) (GH-144193)
It does not support an ASCII string.

Also add more tests.
(cherry picked from commit 25a10b60b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-23 19:19:22 +00:00
Miss Islington (bot)
62489c8533
[3.13] Doc: fix incorrect reference in isasyncgenfunction docs (GH-144099) (GH-144171)
(cherry picked from commit f3dd0cae6c)

Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
2026-01-23 11:35:27 +01:00
Miss Islington (bot)
e4e36a716a
[3.13] gh-142779: Initialize reserved field for proper padding (GH-142780) (#144160)
gh-142779: Initialize reserved field for proper padding (GH-142780)

The jitdump specification specifies a reserved field for padding.

Initialize it so no garbage data is embedded in the jitdump files.
(cherry picked from commit 77bf4ba732)

Co-authored-by: stratakis <cstratak@redhat.com>
2026-01-22 17:29:57 +00:00
Stan Ulbrych
837b88fd9f
[3.13] gh-144023: Prevent follow_symlinks from being allowed with an fd of 0 (GH-144022) (#144152)
[3.13] gh-144023: Prevent follow_symlinks from being allowed with an fd of 0 (GH-144022)

The check was (fd > 0), should be (fd >= 0).
(cherry picked from commit fa44efa0ef)

Co-authored-by: AZero13 <gfunni234@gmail.com>
2026-01-22 15:52:49 +00:00
Miss Islington (bot)
d4d37b26cb
[3.13] gh-141004: Mark up constants for PyOS_double_to_string (GH-143867) (GH-144147)
gh-141004: Mark up constants for `PyOS_double_to_string` (GH-143867)

This ensures they show up as C macros in search and the Sphinx inventory.
(cherry picked from commit fb690c38ca)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-22 13:30:31 +01:00
Miss Islington (bot)
ac9715bf13
[3.13] gh-77188: Add pickle tests for objects with slots (GH-144116) (GH-144120)
(cherry picked from commit cf71e34940)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-22 11:26:48 +00:00
Miss Islington (bot)
015b90dc02
[3.13] gh-143959: Make _datetime optional for test_sys (GH-144003) (#144144)
gh-143959: Make _datetime optional for test_sys (GH-144003)
(cherry picked from commit c447d1bc14)

Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2026-01-22 11:15:00 +00:00
Miss Islington (bot)
9a3aea9fd5
[3.13] gh-141004: Mark up docs of old PyMem macros (GH-143783) (GH-143865)
gh-141004: Mark up docs of old PyMem macros (GH-143783)

These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things “soft deprecated” if there's just a note in the docs.

The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.
(cherry picked from commit a009e78b79)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-22 11:52:12 +01:00
Yongtao Huang
a6acb1628f
[3.13] gh-144085: Add {gi,cr}_suspended to inspect comments and generator/coroutine tests (GH-144086) (#144134)
(cherry picked from commit 4ef30a5871)
2026-01-22 12:20:32 +03:00
Bera
740db907a8
[3.13] gh-143866: Verify return value of pathlib.write_{bytes,text} methods in tests (GH-143870) (#144078)
(cherry picked from commit cb6a662bb0)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-20 21:34:43 +03:00
Miss Islington (bot)
77dddece52
[3.13] gh-144050: Fix stat.filemode pure Python file type detection (GH-144059) (GH-144074)
(cherry picked from commit fe629262c0)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
2026-01-20 12:44:46 +00:00
Miss Islington (bot)
640ef9931e
[3.13] Update struct.__doc__: _Bool available unconditionally (GH-143716) (#144071)
Update struct.__doc__: _Bool available unconditionally (GH-143716)

This amends commit a9296e7f3b.
(cherry picked from commit 31c81ab0a2)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-01-20 12:32:45 +00:00
Miss Islington (bot)
11bf6efcaf
[3.13] gh-143999: Fix: handle suspended state on types.coroutine wrappers (GH-144000) (GH-144065)
(cherry picked from commit 76b484b9d1)

Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
2026-01-20 12:59:24 +02:00
Miss Islington (bot)
746d2f979b
[3.13] gh-143774 - Improve IDLE Format Paragraph doc (GH-143775) (#144063)
gh-143774 - Improve IDLE Format Paragraph doc (GH-143775)

Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.

(Also fix a couple case errors in cross references.)
(cherry picked from commit fa3abf5a51)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2026-01-20 09:32:55 +00:00
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко)
c779fa2530
[3.13] Notify Sviat of GHA changes through codeowners (GH-143945) (#144052)
(cherry picked from commit 78b1370de9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-19 23:49:20 +02:00
Miss Islington (bot)
7bca3dd1e6
[3.13] gh-102809: No longer mention Misc/gdbinit in the code (GH-143980) (#144045)
gh-102809: No longer mention `Misc/gdbinit` in the code (GH-143980)

Fix misleading comment on `PyObject_Dump`.
(cherry picked from commit f84ea11071)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-19 17:59:44 +00:00
Miss Islington (bot)
4ada03f47f
[3.13] gh-106318: Add examples for str.rpartition() method (GH-143891) (#144041)
gh-106318: Add examples for str.rpartition() method (GH-143891)
(cherry picked from commit 3c9c3d33cb)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-19 14:22:24 +00:00
Miss Islington (bot)
48a8cd1d12
[3.13] gh-143754: Modernize Tkinter docs (GH-143841) (GH-144033)
Use more relevant terminology instead of "master"/"slave" widgets where possible.
(cherry picked from commit 813fc7a291)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-19 12:26:26 +00:00
Gregory P. Smith
22e4d55285
[3.13] gh-143916: Reject control characters in wsgiref.headers.Headers (GH-143917) (#143973)
gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed79c)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-01-17 18:23:57 +00:00