]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Mon, 26 Jan 2026 08:16:06 +0000 (09:16 +0100)]
[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
99821474336187eaf657740c4eb618044d83b9c7 )
Co-authored-by: Solomon Ritzow <11698787+ritzow@users.noreply.github.com>
Miss Islington (bot) [Sun, 25 Jan 2026 17:09:53 +0000 (18:09 +0100)]
[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
17d1490aa97bd6b98a42b1a9b324ead84e7fd8a2 )
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Denis Ledoux <dle@odoo.com>
Miss Islington (bot) [Sun, 25 Jan 2026 17:09:40 +0000 (18:09 +0100)]
[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
aa8a43d179bad5cd9fbfce63b630e2ee0bd617e4 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sun, 25 Jan 2026 17:09:26 +0000 (18:09 +0100)]
[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
052e55e7d44718fe46cbba0ca995cb8fcc359413 )
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>
Miss Islington (bot) [Sun, 25 Jan 2026 17:09:22 +0000 (18:09 +0100)]
[3.13] gh-143919: Reject control characters in http cookies (#144090)
gh-143919: Reject control characters in http cookies
(cherry picked from commit
95746b3a13a985787ef53b977129041971ed7f70 )
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>
Miss Islington (bot) [Sun, 25 Jan 2026 17:09:04 +0000 (18:09 +0100)]
[3.13] Programming FAQ: fix some punctuaction typos (GH-144058) (#144186)
Programming FAQ: fix some punctuaction typos (GH-144058)
(cherry picked from commit
03e651d601c7d54ffe93ef1bbd4f66fafb89eded )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Seth Michael Larson [Sun, 25 Jan 2026 17:06:01 +0000 (11:06 -0600)]
[3.13] gh-143925: Reject control characters in data: URL mediatypes (#144111)
(cherry picked from commit
f25509e78e8be6ea73c811ac2b8c928c28841b9f )
Stan Ulbrych [Sat, 24 Jan 2026 15:13:13 +0000 (15:13 +0000)]
[3.13] gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143392) (GH-144153)
(cherry picked from commit
72bacb0cd0882bce6bd7e9e2e4e9c112d70213e7 )
Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Terry Jan Reedy [Sat, 24 Jan 2026 03:16:21 +0000 (22:16 -0500)]
[3.13] gh-135142: Initial 3.15 News3.txt entries (GH-144200) (#144202)
(cherry picked from commit
29f1e778faaa31479e4ef84e2fb37a7a53984550 )
Miss Islington (bot) [Fri, 23 Jan 2026 19:19:22 +0000 (20:19 +0100)]
[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
25a10b60b04ab2fa802409dc6f211cf2ca028a0a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Fri, 23 Jan 2026 10:35:27 +0000 (11:35 +0100)]
[3.13] Doc: fix incorrect reference in `isasyncgenfunction` docs (GH-144099) (GH-144171)
(cherry picked from commit
f3dd0cae6cea38b15b42b20d39c7142a4a0f716e )
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Miss Islington (bot) [Thu, 22 Jan 2026 17:29:57 +0000 (18:29 +0100)]
[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
77bf4ba732a8736910bd6b7ec5a58b8ee833c95f )
Co-authored-by: stratakis <cstratak@redhat.com>
Stan Ulbrych [Thu, 22 Jan 2026 15:52:49 +0000 (15:52 +0000)]
[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
fa44efa0ef1972ac1e2f66996303154be11f605e )
Co-authored-by: AZero13 <gfunni234@gmail.com>
Miss Islington (bot) [Thu, 22 Jan 2026 12:30:31 +0000 (13:30 +0100)]
[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
fb690c38cafb15e4ccddc52aba37f9470ce201a0 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Thu, 22 Jan 2026 11:26:48 +0000 (12:26 +0100)]
[3.13] gh-77188: Add pickle tests for objects with slots (GH-144116) (GH-144120)
(cherry picked from commit
cf71e34940e2314ee7ca00961d86a7172286eeea )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 22 Jan 2026 11:15:00 +0000 (12:15 +0100)]
[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
c447d1bc146bcf7707a619779bdcc03651adb5e3 )
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
Miss Islington (bot) [Thu, 22 Jan 2026 10:52:12 +0000 (11:52 +0100)]
[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
a009e78b79ec340d9ff0e1a8ad20f8178fd3257f )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Yongtao Huang [Thu, 22 Jan 2026 09:20:32 +0000 (17:20 +0800)]
[3.13] gh-144085: Add `{gi,cr}_suspended` to `inspect` comments and `generator/coroutine` tests (GH-144086) (#144134)
(cherry picked from commit
4ef30a5871db2043712945e64f33af81938d68dc )
Bera [Tue, 20 Jan 2026 18:34:43 +0000 (21:34 +0300)]
[3.13] gh-143866: Verify return value of `pathlib.write_{bytes,text}` methods in tests (GH-143870) (#144078)
(cherry picked from commit
cb6a662bb0f7a9da9d4ba9dda820053f8d54a9f8 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Tue, 20 Jan 2026 12:44:46 +0000 (13:44 +0100)]
[3.13] gh-144050: Fix stat.filemode pure Python file type detection (GH-144059) (GH-144074)
(cherry picked from commit
fe629262c0db7aa18bad8bf3ac524acd8695739b )
Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Miss Islington (bot) [Tue, 20 Jan 2026 12:32:45 +0000 (13:32 +0100)]
[3.13] Update struct.__doc__: _Bool available unconditionally (GH-143716) (#144071)
Update struct.__doc__: _Bool available unconditionally (GH-143716)
This amends commit
a9296e7f3be4d6c22271b25c86467ff867c63bbb .
(cherry picked from commit
31c81ab0a2fb7009a76426617991a9b539ab0180 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Tue, 20 Jan 2026 10:59:24 +0000 (11:59 +0100)]
[3.13] gh-143999: Fix: handle suspended state on types.coroutine wrappers (GH-144000) (GH-144065)
(cherry picked from commit
76b484b9d16d6a3b1749dc89d99773b5b4a5c4a5 )
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Miss Islington (bot) [Tue, 20 Jan 2026 09:32:55 +0000 (10:32 +0100)]
[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
fa3abf5a51d42b2d62e1bc89e9465b398a567e94 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) [Mon, 19 Jan 2026 21:49:20 +0000 (22:49 +0100)]
[3.13] Notify Sviat of GHA changes through codeowners (GH-143945) (#144052)
(cherry picked from commit
78b1370de96bab5eee82b022a9e26e633a040e0b )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Mon, 19 Jan 2026 17:59:44 +0000 (18:59 +0100)]
[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
f84ea1107170988742fbd350123678a5c503c1ad )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Mon, 19 Jan 2026 14:22:24 +0000 (15:22 +0100)]
[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
3c9c3d33cbdef257526871cbc12e93635026f5d6 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Miss Islington (bot) [Mon, 19 Jan 2026 12:26:26 +0000 (13:26 +0100)]
[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
813fc7a291c98654c27f2b5d8f9afa8e53b066a6 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Gregory P. Smith [Sat, 17 Jan 2026 18:23:57 +0000 (10:23 -0800)]
[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
f7fceed79ca1bceae8dbe5ba5bc8928564da7211 )
Co-authored-by: Seth Michael Larson <seth@python.org>
Sam Gross [Fri, 16 Jan 2026 18:34:53 +0000 (13:34 -0500)]
[3.13] gh-133253: making linecache thread-safe (GH-133305) (#143911)
(cherry picked from commit
8054184f9f32c7ba561e6e23b358074824e4928d )
Co-authored-by: vfdev <vfdev.5@gmail.com>
Seth Michael Larson [Fri, 16 Jan 2026 17:24:34 +0000 (11:24 -0600)]
[3.13] gh-143572: Run 'python3-libraries' fuzzer in CI using CIFuzz (… (#143915)
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <578543+webknjaz@users.noreply.github.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 16 Jan 2026 17:01:53 +0000 (18:01 +0100)]
[3.13] gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570) (GH-143914)
This allows to run Tkinter tests with the specified value of
tkinter.wantobjects, for example "-u wantobjects=0".
(cherry picked from commit
21ed1e2a9401a2e96ccc910fcb66f22afc96efbd )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Victor Stinner [Fri, 16 Jan 2026 13:23:03 +0000 (14:23 +0100)]
[3.13] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872) (#143878)
[3.14] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872)
gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629)
Fix an inconsistency issue in io.BytesIO.write() where the buffer was exported
twice, which could lead to unexpected data overwrites and position drift when
the buffer changes between exports.
(cherry picked from commit
c461aa99e2fabbaf5859c0a8a93e08306ee8115d )
(cherry picked from commit
1241432150f6342e3d38c5a80a19c8c157a4ebe8 )
Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
Miss Islington (bot) [Fri, 16 Jan 2026 11:49:30 +0000 (12:49 +0100)]
[3.13] gh-143672: Add more tests for struct.pack_into() (GH-143901) (GH-143903)
Add tests for negative offset, out of bound offset, invalid type of offset,
non-writeable buffer, non-continuous buffer, invalid type of buffer.
Repeat all tests for struct.Struct.pack_into().
(cherry picked from commit
66680f1230e51b8274279964f8d2278d12285eb3 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
sobolevn [Thu, 15 Jan 2026 15:27:31 +0000 (18:27 +0300)]
[3.13] gh-143635: Fix crash in `ga_repr_items_list` (GH-143670) (#143852)
(cherry picked from commit
bdba5f0db2ab29f3deedb9416f3c143d33e4ab66 )
Serhiy Storchaka [Thu, 15 Jan 2026 15:00:44 +0000 (17:00 +0200)]
[3.13] gh-142829: Fix use-after-free in `Context.__eq__` via re-entrant `ContextVar.set` (GH-142905) (GH-143871)
(cherry picked from commit
a4086d7f89e5d388e4ffcdb13e4fba0255234286 )
Co-authored-by: A.Ibrahim <abdulrasheedibrahim47@gmail.com>
Miss Islington (bot) [Thu, 15 Jan 2026 12:34:37 +0000 (13:34 +0100)]
[3.13] gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508) (GH-143787)
(cherry picked from commit
a7ba3b124f707f73b94b59f13908872f1a48e24f )
Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Serhiy Storchaka [Thu, 15 Jan 2026 10:04:34 +0000 (12:04 +0200)]
[3.13] Add regression test for add() after remove() with hash collision in set (GH-143781) (GH-143859)
(cherry picked from commit
565685f6e88fd333326baff6469f53cfff28e01e )
Miss Islington (bot) [Thu, 15 Jan 2026 08:34:21 +0000 (09:34 +0100)]
[3.13] gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH-143840) (GH-143855)
(cherry picked from commit
421bd1770a87d141f66754ae29e407589e44ce83 )
Co-authored-by: Muneeb Ullah <moneebullah25@gmail.com>
Serhiy Storchaka [Thu, 15 Jan 2026 07:59:15 +0000 (09:59 +0200)]
[3.13] gh-141805: Fix crash after concurrent addition objects with the same hash to set (GH-143815) (GH-143853)
This happens when the set contained several elements with the same hash,
and then some of them were removed.
(cherry picked from commit
b8e925b4f8f6c5e28fbebc4f3965bf77610698b3 )
Miss Islington (bot) [Wed, 14 Jan 2026 11:48:52 +0000 (12:48 +0100)]
[3.13] gh-106287: Do not write objects after an unmarshalling error (GH-132715) (GH-143833)
Writing out an object may involve a slot lookup, which is not safe to do with
an exception raised. In debug mode an assertion failure will occur if this
happens.
(cherry picked from commit
ce8f5f98c6fc95a1704360d986a4d0281eeada79 )
Co-authored-by: Duane Griffin <duaneg@dghda.com>
Miss Islington (bot) [Wed, 14 Jan 2026 10:01:54 +0000 (11:01 +0100)]
[3.13] gh-141004: Document old provisional names for vectorcall/code API (GH-143568) (GH-143829)
For vectorcall API, the underscore-prefixed provisional names
continue to be available per PEP 590:
https://peps.python.org/pep-0590/#finalizing-the-api
Use `versionadded`, `versionchanged`, and `:no-typesetting:`
to mark this up.
For PyCode API, use `:no-typesetting:` rather than `index::` so that
these are semantically documented as C functions.
(cherry picked from commit
7e8a1b5061313e03f99bc2ffa2062702bcc76426 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Wed, 14 Jan 2026 09:56:18 +0000 (10:56 +0100)]
[3.13] gh-137113 docs: note readline no longer supported in REPL after 3.13 (GH-137142) (GH-143792)
Add a note to the readline module documentation stating that
Python 3.13 and later no longer supports readline in the default REPL,
as per gh-118840. Includes workaround using PYTHON_BASIC_REPL.
Update tutorial to remove the reference, and use a different key to
test things out.
(cherry picked from commit
971f387bbb598a481aa8974ddc7a358459030415 )
Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
Co-authored-by: Kuang Yu Heng <yuheng3107@gmail.com>
Gregory P. Smith [Wed, 14 Jan 2026 02:09:05 +0000 (18:09 -0800)]
[3.13] gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (GH-143717) (#143821)
The forkserver was not passing sys.argv to its main() function, causing
sys.argv to be empty during `__main__` module import in child processes. This
fixes a non-obvious regression inadvertently introduced by the gh-126631 main
preloading fix.
(cherry picked from commit
298d5440eb83f2dfd5651bac86d1592ec358d54c )
Hugo van Kemenade [Tue, 13 Jan 2026 16:47:03 +0000 (18:47 +0200)]
[3.13] Bump GitHub Actions (GH-143757) (#143798)
Miss Islington (bot) [Tue, 13 Jan 2026 13:58:14 +0000 (14:58 +0100)]
[3.13] gh-143728: Keep `TypedDict` and `NamedTuple` in `class` role in docs (GH-143702) (#143800)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Tue, 13 Jan 2026 13:53:41 +0000 (14:53 +0100)]
[3.13] gh-143249: Fix buffer leak when overlapped operation fails to start on windows (GH-143250) (#143796)
gh-143249: Fix buffer leak when overlapped operation fails to start on windows (GH-143250)
(cherry picked from commit
103a384bfdeafc68ab39ea9bf8838a8b2eec83dd )
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
Miss Islington (bot) [Tue, 13 Jan 2026 13:48:39 +0000 (14:48 +0100)]
[3.13] gh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt` is changed (GH-143583) (GH-143794)
gh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt` is changed (GH-143583)
(cherry picked from commit
1176facbf21388ef29276ec55a95a66423f61191 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Tue, 13 Jan 2026 12:23:26 +0000 (13:23 +0100)]
[3.13] gh-106318: Add examples for str.replace() method (GH-143581) (GH-143788)
(cherry picked from commit
af9f783a7e9bfdca94ce5b9619c1b82a32d9e170 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Inada Naoki [Tue, 13 Jan 2026 10:12:38 +0000 (19:12 +0900)]
[3.13] gh-143189: fix insertdict() for non-Unicode key (GH-143285) (#143772)
Terry Jan Reedy [Tue, 13 Jan 2026 03:58:30 +0000 (22:58 -0500)]
[3.13] gh-139707: Copy-strip change to idle.rst into idlelib (#143767)
Copy net new text in idle.rst from main to 3.13.
Make 3.13 docs and copy-strip idle.html to idlelib/help.html.
See https://github.com/python/cpython/issues/139707#issuecomment-
3737374788
and PR #143718 message for more.
* Revert url to 'main' from '3.13'
The branch in the source links in the revised help.html
become '3.13' instead of 'main' because the html
was generated from an edited 3.13 version of idle.rst
instead being backported from main. This reversion
avoids the possibility of future backport merge conflicts.
The version makes no difference to the Help/IDLE doc display as
the url is currently neither displayed nor linked to the link title
-- 'Lib/idlelib'. If we do make the links live, we can use
sys.version_info to replace 'main' when main is no longer the source branch.
Miss Islington (bot) [Tue, 13 Jan 2026 00:25:55 +0000 (01:25 +0100)]
[3.13] gh-143762 Backport
a6bc60d for random combinatoric recipes (GH-143764) (gh-143766)
Miss Islington (bot) [Mon, 12 Jan 2026 18:20:22 +0000 (19:20 +0100)]
[3.13] gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143411) (GH-143745)
(cherry picked from commit
3d44f0ab65221d8704d9298712a5114cba3aeea9 )
Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Stan Ulbrych [Mon, 12 Jan 2026 18:07:34 +0000 (18:07 +0000)]
[3.13] gh-141536: Fix a crash when running test_capi *after* test_code in the same process (GH-141537) (GH-143625)
(cherry picked from commit
b2827de18fe88152dc38c1aa76c39b69ef59cb6f )
Co-authored-by: T. Wouters <thomas@python.org>
Shamil [Mon, 12 Jan 2026 16:19:57 +0000 (19:19 +0300)]
[3.13] gh-140306: Clear uncaught exception info after applying error in subinterpreter (GH-140397)
Miss Islington (bot) [Mon, 12 Jan 2026 16:02:23 +0000 (17:02 +0100)]
[3.13] gh-143544: Fix possible use-after-free in the JSON decoder when JSONDecodeError disappears during raising it (GH-143561) (#143734)
gh-143544: Fix possible use-after-free in the JSON decoder when JSONDecodeError disappears during raising it (GH-143561)
(cherry picked from commit
c3157480601499565fd42a8afbdb0207328ac484 )
Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Petr Viktorin [Mon, 12 Jan 2026 13:05:31 +0000 (14:05 +0100)]
[3.13] gh-141004: Improve `make check-c-api-docs` (GH-143564) (GH-143594)
- Gather all documented names into a set in a single pass.
This makes the check much faster.
- Do not match substrings (e.g. documenting `PyErr_WarnEx`
doesn't mean that `PyErr_Warn` is documented)
- Consider `PY`-prefixed names (a lot of old macros use this)
(cherry picked from commit
234a15dc4ec2d8f8ababea91532ebe896a96387a )
Sergey B Kirpichev [Mon, 12 Jan 2026 12:45:52 +0000 (15:45 +0300)]
[3.13] gh-78724: Raise RuntimeError's when calling methods on non-ready Struct()'s (GH-143643) (GH-143714)
(cherry picked from commit
515ae4078dffa0b74e5e5431462c2f4fe4563ffa )
Serhiy Storchaka [Mon, 12 Jan 2026 10:05:09 +0000 (12:05 +0200)]
[3.13] gh-142881: Fix concurrent and reentrant call of atexit.unregister() (GH-142901) (GH-143722)
(cherry picked from commit
dbd10a6c29ba1cfc9348924a090b5dc514470002 )
Miss Islington (bot) [Mon, 12 Jan 2026 09:04:00 +0000 (10:04 +0100)]
[3.13] gh-143346: Fix calculation of the line width for wrapped Base64 in plistlib (GH-143347) (GH-143720)
It was incorrect in case of mixed tabs and spaces in indentation.
(cherry picked from commit
5f28aa2f372339ba0c70373b96d33ec4d2879e04 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Mon, 12 Jan 2026 08:37:28 +0000 (10:37 +0200)]
[3.13] gh-143378: Fix use-after-free when BytesIO is concurrently mutated during write operations (GH-143408) (GH-143600)
PyObject_GetBuffer() can execute user code (e.g. via __buffer__), which may
close or otherwise mutate a BytesIO object while write() or writelines()
is in progress. This could invalidate the internal buffer and lead to a
use-after-free.
Ensure that PyObject_GetBuffer() is called before validation checks.
(cherry picked from commit
6d54b6ac7d5744e1f59d784c8e020d632d2959a3 )
Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
Miss Islington (bot) [Sun, 11 Jan 2026 19:47:05 +0000 (20:47 +0100)]
[3.13] gh-127750: Fix annotations in singledispatchmethod signature tests (GH-143571) (GH-143708)
These tests relied on a bug -- gh-84644, which is that singledispatch
doesn't verify the annotation is on the "first" parameter.
(cherry picked from commit
620a5b92693ac1b2cef1f90fd3c2dba1bb794552 )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Sun, 11 Jan 2026 19:42:44 +0000 (20:42 +0100)]
[3.13] gh-142972: Document arbitrary ordering in `Path.glob` and `Path.rglob` (GH-143025) (GH-143710)
gh-142972: Document arbitrary ordering in `Path.glob` and `Path.rglob` (GH-143025)
(cherry picked from commit
9d13ca97c1a83ed649a16fb0512b5f1c5f9ad108 )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Sun, 11 Jan 2026 17:23:52 +0000 (18:23 +0100)]
[3.13] gh-143420: Clarify sequence behavior for slice indexes (GH-143422) (#143703)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Miss Islington (bot) [Sun, 11 Jan 2026 15:59:19 +0000 (16:59 +0100)]
[3.13] gh-86139: Correct NamedTuple and TypedDict's type in typing.rst (GH-143692) (#143697)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Serhiy Storchaka [Sun, 11 Jan 2026 12:34:36 +0000 (14:34 +0200)]
[3.13] gh-143638: Forbid cuncurrent use of the Pickler and Unpickler objects in C implementation (GH-143664) (GH-143687)
Previously, this could cause crash or data corruption, now concurrent calls
of methods of the same object raise RuntimeError.
(cherry picked from commit
d1282efb2b847bf9274d78c5f15ea00499b2c894 )
Miss Islington (bot) [Sun, 11 Jan 2026 07:49:37 +0000 (08:49 +0100)]
[3.13] Remove outdated comment about `excess_args` warning in `object.__init__` (GH-143669) (#143681)
Remove outdated comment about `excess_args` warning in `object.__init__` (GH-143669)
The code emitting a warning was removed in
96384b93aae1d1e45dda21c4024d7d083c91626d .
(cherry picked from commit
03e6457096d452859fb4cfd418dc9268c6454c29 )
Co-authored-by: Manuel Jacob <me@manueljacob.de>
Miss Islington (bot) [Sun, 11 Jan 2026 05:06:57 +0000 (06:06 +0100)]
[3.13] Sync the batched() example with the grouper() example. (gh-143676) (gh-143679)
Bénédikt Tran [Sat, 10 Jan 2026 13:59:14 +0000 (14:59 +0100)]
[3.13] gh-143377: fix crashes in `_interpreters.capture_exception` (GH-143418) (#143653)
(cherry picked from commit
ce6bae92da671e31013b00901591ce2b595b61ce )
Miss Islington (bot) [Sat, 10 Jan 2026 13:40:34 +0000 (14:40 +0100)]
[3.13] Doc: remove duplicate GitHub issue reference in "What's New in Python 3.13" (GH-143654) (#143657)
Doc: remove duplicate GitHub issue reference in "What's New in Python 3.13" (GH-143654)
(cherry picked from commit
aa8578dc54df2af9daa3353566359e602e5905cf )
Co-authored-by: emmanuel <emmanuel20232035@gmail.com>
Miss Islington (bot) [Sat, 10 Jan 2026 10:14:46 +0000 (11:14 +0100)]
[3.13] gh-143641: Make `ready_to_import` always remove tempdir from `sys.path` (GH-143642) (#143648)
gh-143641: Make `ready_to_import` always remove tempdir from `sys.path` (GH-143642)
Make ready_to_import always remove tempdir from sys.path
(cherry picked from commit
e7f5ffa0de2476828d78b8d39caefc38d797c206 )
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
Miss Islington (bot) [Sat, 10 Jan 2026 06:52:18 +0000 (07:52 +0100)]
[3.13] gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (GH-143288) (#143608)
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (GH-143288)
(cherry picked from commit
a9ca49d9c699ce4040f1391d9054d88b4098466b )
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Serhiy Storchaka [Fri, 9 Jan 2026 17:43:35 +0000 (19:43 +0200)]
[3.13] gh-143006: Fix and optimize mixed comparison of float and int (GH-143084) (GH-143624)
When comparing negative non-integer float and int with the same number
of bits in the integer part, __neg__() in the int subclass returning
not an int caused an assertion error.
Now the integer is no longer negated. Also, reduced the number of
temporary created Python objects.
(cherry picked from commit
66bca383bd3b12d21e879d991d77b37a4c638f88 )
Miss Islington (bot) [Fri, 9 Jan 2026 15:33:25 +0000 (16:33 +0100)]
[3.13] gh-143547: Fix PyErr_FormatUnraisable() fallback (GH-143557) (GH-143603) (#143612)
[3.14] gh-143547: Fix PyErr_FormatUnraisable() fallback (GH-143557) (GH-143603)
gh-143547: Fix PyErr_FormatUnraisable() fallback (GH-143557)
Hold a strong reference to 'hook' while calling the default
unraisable took to log hook failure.
(cherry picked from commit
1d0baf1ae48f98b61cc869a82e1b7206298f653f )
(cherry picked from commit
39a2bcf949095bd603f7b73f15b5b478dbb49ba9 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 9 Jan 2026 15:30:23 +0000 (16:30 +0100)]
[3.13] gh-106318: Add examples for str.rfind() method (GH-143582) (#143617)
gh-106318: Add examples for str.rfind() method (GH-143582)
(cherry picked from commit
c696f33d9ee425d7acd5de90d5418a3280444962 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Miss Islington (bot) [Fri, 9 Jan 2026 15:29:04 +0000 (16:29 +0100)]
[3.13] gh-106318: Improve str.removeprefix() and str.removesuffix() docs (GH-143580) (#143615)
gh-106318: Improve str.removeprefix() and str.removesuffix() docs (GH-143580)
Add doctest role and 'See also'.
(cherry picked from commit
6d6c7ed73786915d16f6ac3d8b6e6d67f404209f )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Sam Gross [Thu, 8 Jan 2026 17:35:56 +0000 (12:35 -0500)]
[3.13] gh-142095: Use thread local frame info in `py-bt` and `py-bt-full` when available (gh-143371) (#143567)
In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.
(cherry picked from commit
49c3b0a67a77bb42e736cea7dcbc1aa8fa704074 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 8 Jan 2026 16:12:51 +0000 (17:12 +0100)]
[3.13] gh-143553: Add support for parametrized resources in regrtests (GH-143554) (GH-143556)
For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.
(cherry picked from commit
c07e5ec0a9e5843fc39dec6aa94172faf6354858 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 8 Jan 2026 13:46:33 +0000 (14:46 +0100)]
[3.13] gh-143513: Clarify changed argument name of `ResourceReader.is_resource` (GH-143523) (GH-143563)
gh-143513: Clarify changed argument name of `ResourceReader.is_resource` (GH-143523)
(cherry picked from commit
5462002bbefd6cb79716828051beae94de8f2529 )
Co-authored-by: Alex Willmer <alex@moreati.org.uk>
Miss Islington (bot) [Thu, 8 Jan 2026 13:29:41 +0000 (14:29 +0100)]
[3.13] gh-143528: Fix test_time.test_thread_time() (GH-143558) (#143560)
gh-143528: Fix test_time.test_thread_time() (GH-143558)
Tolerate 100 ms instead of 20 ms to support slow CIs.
(cherry picked from commit
efaa56f73cb1dc4863894444425e753afb7b997c )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 8 Jan 2026 11:49:43 +0000 (12:49 +0100)]
[3.13] gh-143089: Fix ParamSpec default examples to use list instead of tuple (GH-143179) (#143539)
Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Miss Islington (bot) [Wed, 7 Jan 2026 22:42:48 +0000 (23:42 +0100)]
[3.13] Fix a typo in STORE_SLICE docs (GH-143500) (#143534)
Fix a typo in STORE_SLICE docs (GH-143500)
(cherry picked from commit
228d95582e080c60335d5f0a229a6698eb69b11c )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Łukasz Langa [Wed, 7 Jan 2026 17:44:39 +0000 (18:44 +0100)]
[3.13] gh-138568: Make `help` mode in PyREPL not exit on empty line input (GH-143512) (GH-143520)
(cherry picked from commit
b3e4a3462f6011cacdfc58c565c69e4d7de6b9cd )
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
Miss Islington (bot) [Wed, 7 Jan 2026 17:03:24 +0000 (18:03 +0100)]
[3.13] gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154) (#143525)
gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154)
(cherry picked from commit
51a56a3a7bd8cf05ceda65e843fb7bae40509799 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Victor Stinner [Wed, 7 Jan 2026 14:17:06 +0000 (15:17 +0100)]
[3.13] gh-142991: Fix socketmodule.c build: remove _Py_FALLTHROUGH (#143514)
Fix commit
7f936694dbc0dc0dbb07d98fa668776c4e4ca595 backport which
uses _Py_FALLTHROUGH: this macro only exists in Python 3.14 and
newer.
Serhiy Storchaka [Wed, 7 Jan 2026 07:57:39 +0000 (09:57 +0200)]
[3.13] gh-75572: Forward-port test_xpickle from Python 2 to 3 (GH-22452) (GH-143509)
Move data classes used in tests to separate file test_picklecommon.py,
so it can be imported in old Python versions.
(cherry picked from commit
8735daf3e82d50defd791e9be7b9ae6843bc4ed1 )
(cherry picked from commit
ff0a8b72892e94ef6616ed70241d23985f7a5ac4 )
Co-authored-by: Ken Jin <kenjin@python.org>
Miss Islington (bot) [Tue, 6 Jan 2026 21:48:19 +0000 (22:48 +0100)]
[3.13] gh-106318: Add example for str.index() (GH-137023) (#143501)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Miss Islington (bot) [Tue, 6 Jan 2026 20:32:56 +0000 (21:32 +0100)]
[3.13] gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (GH-143307) (#143495)
gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (GH-143307)
(cherry picked from commit
ff7d1cec41f391270560b9f4726791d8476c6eba )
Co-authored-by: Andrii Hrimov <andrew.hrimov@gmail.com>
Miss Islington (bot) [Tue, 6 Jan 2026 18:11:48 +0000 (19:11 +0100)]
[3.13] gh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well (GH-143461) (GH-143467)
(cherry picked from commit
7dae1077cd18c1ddc50b130335936bc71e1c4ccd )
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Tue, 6 Jan 2026 17:14:42 +0000 (18:14 +0100)]
[3.13] gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (GH-142338) (#143487)
gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (GH-142338)
The documentation incorrectly stated that the file descriptor is not
inherited by child processes. In reality, the close-on-exec flag (when
available) only prevents inheritance across exec() calls, not fork().
(cherry picked from commit
e79c9b703117d8b0e7c4d86b704e2e7f120db883 )
Co-authored-by: ADITYA RAI <adi.hack1234@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Tue, 6 Jan 2026 16:50:02 +0000 (17:50 +0100)]
[3.13] gh-106318: Add examples for str.isprintable() (GH-140043) (#143484)
gh-106318: Add examples for str.isprintable() (GH-140043)
(cherry picked from commit
7b0a372b20ae3b80053d52e84c2b7bdd114c19f0 )
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Tue, 6 Jan 2026 16:48:03 +0000 (17:48 +0100)]
[3.13] gh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket (GH-142993) (#143482)
gh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket (GH-142993)
(cherry picked from commit
05406b221dc9d5946c60253392788d60f1f08c8b )
Co-authored-by: Gleb Smirnoff <glebius@FreeBSD.org>
Miss Islington (bot) [Tue, 6 Jan 2026 16:38:38 +0000 (17:38 +0100)]
[3.13] gh-143394: filter for turning off automatic margins in test_no_newline (GH-143433) (GH-143478)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Semyon Moroz [Tue, 6 Jan 2026 14:02:32 +0000 (14:02 +0000)]
[3.13] gh-143331: Schedule to remove format "N" for Decimal (GH-143372) (#143477)
(cherry picked from commit
dd750b348501247d458ea8d454213d4959a8f8b9 )
Hugo van Kemenade [Tue, 6 Jan 2026 13:02:16 +0000 (15:02 +0200)]
[3.13] Allow Android to fail CI (GH-143471) (GH-143473)
(cherry picked from commit
efb4e6c73374f910e9aae9b2431a3718331c3c79 )
Stan Ulbrych [Tue, 6 Jan 2026 11:49:31 +0000 (11:49 +0000)]
[3.13] gh-143003: Fix possible shared buffer overflow in bytearray.extend() (GH-143086) (GH-143448)
When __length_hint__() returns 0 for non-empty iterator, the data can be
written past the shared 0-terminated buffer, corrupting it.
(cherry picked from commit
522563549a49d28e763635c58274a23a6055f041 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Bénédikt Tran [Mon, 5 Jan 2026 18:56:02 +0000 (19:56 +0100)]
[3.13] gh-143309: fix UAF in `os.execve` when the environment is concurrently mutated (GH-143314) (#143431)
[3.13] gh-143309: fix UAF in `os.execve` when the environment is concurrently mutated (GH-143314) (#143431)
(cherry picked from commit
9609574e7fd36edfaa8b575558a82cc14e65bfbc )
(cherry picked from commit
c99f7667436d8978b4077704333e2a351f2a026f )
Miss Islington (bot) [Sat, 3 Jan 2026 23:53:59 +0000 (00:53 +0100)]
[3.13] gh-143308: fix UAF when PickleBuffer is concurrently mutated in a callback (GH-143312) (#143397)
gh-143308: fix UAF when PickleBuffer is concurrently mutated in a callback (GH-143312)
(cherry picked from commit
6c53af18f61c074d514e677b469b6201573a59da )
---------------
Co-authored-by: Aaron Wieczorek <aaronw@fastmail.com>
Co-authored-by: Aaron Wieczorek <woz@Aarons-MacBook-Pro.local>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 3 Jan 2026 08:25:52 +0000 (09:25 +0100)]
[3.13] gh-140648: Make asyncio REPL respect the `-I` flag (isolated mode) (GH-143045) (#143384)
gh-140648: Make asyncio REPL respect the `-I` flag (isolated mode) (GH-143045)
(cherry picked from commit
e7c542de5f069a4b83e8eded3067613e4d59a529 )
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Miss Islington (bot) [Fri, 2 Jan 2026 19:25:21 +0000 (20:25 +0100)]
[3.13] gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504) (#143370)
gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504)
* Document the `c` typecode for `multiprocessing.Array`.
* Add quotes
* Mention that 'w' is not supported
(cherry picked from commit
136f6d835588e0f72cecdff855afc8f424381ed5 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Fri, 2 Jan 2026 16:28:04 +0000 (17:28 +0100)]
[3.13] gh-138897: Use `_pyrepl.pager` for `_sitebuiltins._Printer` (GH-138898) (GH-143365)
(cherry picked from commit
0417dabe3f560470eec63a2485b1741ba9c5e697 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>