Commit graph

30440 commits

Author SHA1 Message Date
Miss Islington (bot)
c3b5900c65
[3.13] gh-144551: Update macOS installer to use OpenSSL 3.0.19 (GH-144897) (#144898)
(cherry picked from commit 8f7e9c239f)

Co-authored-by: Ned Deily <nad@python.org>
2026-02-17 05:57:46 +00:00
Peter Bierma
9314ec23a6
[3.13] gh-144601: Avoid sharing exception objects raised in a PyInit function across multiple interpreters (GH-144602) (GH-144880)
(cherry picked from commit fd6b639a49)
2026-02-16 16:05:55 +00:00
Miss Islington (bot)
ba0bab40f7
[3.13] gh-80667: Fix lookup for Tangut ideographs in unicodedata (GH-144789) (GH-144871) (GH-144875)
(cherry picked from commit 8b7b5a9946)
(cherry picked from commit bcabbd02f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
2026-02-16 15:02:01 +00:00
Miss Islington (bot)
37f818caef
[3.13] gh-144833: Fix use-after-free in SSL module when SSL_new() fails (GH-144843) (#144859)
gh-144833: Fix use-after-free in SSL module when SSL_new() fails (GH-144843)

In newPySSLSocket(), when SSL_new() returns NULL, Py_DECREF(self)
was called before _setSSLError(get_state_ctx(self), ...), causing
a use-after-free. Additionally, get_state_ctx() was called with
self (PySSLSocket*) instead of sslctx (PySSLContext*), which is
a type confusion bug.

Fix by calling _setSSLError() before Py_DECREF() and using
sslctx instead of self for get_state_ctx().
(cherry picked from commit c91638ca06)

Co-authored-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
2026-02-16 03:09:58 +00:00
Pablo Galindo Salgado
0151abcd9f
[3.13] gh-144766: Fix a crash in fork child process when perf support is enabled. (GH-144795) (#144818)
(cherry picked from commit 5922149a50)

Co-authored-by: Yilei <hi@mangoumbrella.com>
2026-02-14 17:52:42 +00:00
Zachary Ware
160fe2acd8
[3.13] gh-144551: Update Windows builds to use OpenSSL 3.0.19 (GH-144798)
(cherry picked from commit 928602c0ac)
2026-02-13 19:37:02 +00:00
Miss Islington (bot)
309bacdb4a
[3.13] gh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (GH-143892) (#144785)
gh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (GH-143892)
(cherry picked from commit 82b92e3cd1)

Co-authored-by: Priyanshu Singh <priyanshu2282@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-02-13 15:58:59 +00:00
Serhiy Storchaka
2f354107f3
[3.13] gh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-107281) (GH-144754)
Lookup for CJK ideograms and Hangul syllables is now case-insensitive,
as is the case for other character names.
(cherry picked from commit e66f4a5a9c)

Co-authored-by: James <snoopjedi@gmail.com>
2026-02-12 17:18:48 +00:00
Serhiy Storchaka
009583fc6f
[3.13] gh-84424: Use numeric_changed for UCD.numeric (GH-19457) (GH-144732)
This was causing ucd_3_2_0.numeric() to pick up only decimal
changes between Unicode 3.2.0 and the current version.
(cherry picked from commit 3e0322ff16)

Co-authored-by: William Meehan <wmeehan@fb.com>
2026-02-12 08:35:09 +00:00
Gregory P. Smith
c117ef1a1c
[3.13] gh-143650: Fix importlib race condition on import failure (GH-143651) (#144697)
gh-143650: Fix importlib race condition on import failure (GH-143651)

Fix a race condition where a thread could receive a partially-initialized
module when another thread's import fails. The race occurs when:

1. Thread 1 starts importing, adds module to sys.modules
2. Thread 2 sees the module in sys.modules via the fast path
3. Thread 1's import fails, removes module from sys.modules
4. Thread 2 returns a stale module reference not in sys.modules

The fix adds verification after the "skip lock" optimization in both Python
and C code paths to check if the module is still in sys.modules. If the
module was removed (due to import failure), we retry the import so the
caller receives the actual exception from the import failure rather than
a stale module reference.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

cherry picked from ac8b5b6890
2026-02-11 06:37:25 +00:00
Miss Islington (bot)
d177460b43
[3.13] gh-143543: Fix re-entrant use-after-free in itertools.groupby (GH-143738) (GH-144627)
(cherry picked from commit a91b5c3fb5)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-10 14:01:23 +01:00
Miss Islington (bot)
7fbdec4180
[3.13] gh-144363: Update bundled libexpat to 2.7.4 (GH-144365) (GH-144500)
(cherry picked from commit d5cb9f6a9b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2026-02-10 13:59:12 +01:00
Petr Viktorin
bad4bc4603
[3.13] gh-131261: generate_sbom.py: Exclude the refresh script from SBOM (GH-131359) (GH-144625)
- generate_sbom.py: Exclude the refresh script from SBOM
- Modules/expat/refresh.sh: Expand the list of manual steps

(cherry picked from commit 51d309988b)
2026-02-10 10:49:00 +01:00
Miss Islington (bot)
ac9bc7c8fc
[3.13] gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556) (#144561)
gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556)

Upgrade bundled pip to 26.0.1
(cherry picked from commit f4364a51c1)

Co-authored-by: Damian Shaw <damian.peter.shaw@gmail.com>
2026-02-07 14:22:54 +02:00
Thomas Wouters
1cbe481834 Python 3.13.12 2026-02-03 18:53:27 +01: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
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
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
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
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)
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
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
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)
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)
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
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
Sam Gross
0f21962fb7
[3.13] gh-133253: making linecache thread-safe (GH-133305) (#143911)
(cherry picked from commit 8054184f9f)

Co-authored-by: vfdev <vfdev.5@gmail.com>
2026-01-16 13:34:53 -05:00
Miss Islington (bot)
6fdb9f1872
[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 21ed1e2a94)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-16 17:01:53 +00:00
Victor Stinner
201e819355
[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 c461aa99e2)


(cherry picked from commit 1241432150)

Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
2026-01-16 14:23:03 +01:00
sobolevn
aa5ad50597
[3.13] gh-143635: Fix crash in ga_repr_items_list (GH-143670) (#143852)
(cherry picked from commit bdba5f0db2)
2026-01-15 15:27:31 +00:00
Serhiy Storchaka
149ecbb9a9
[3.13] gh-142829: Fix use-after-free in Context.__eq__ via re-entrant ContextVar.set (GH-142905) (GH-143871)
(cherry picked from commit a4086d7f89)

Co-authored-by: A.Ibrahim <abdulrasheedibrahim47@gmail.com>
2026-01-15 15:00:44 +00:00
Serhiy Storchaka
5c028df404
[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 b8e925b4f8)
2026-01-15 07:59:15 +00:00
Miss Islington (bot)
8c6d87693b
[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 ce8f5f98c6)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
2026-01-14 11:48:52 +00:00
Gregory P. Smith
480f48035b
[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 298d5440eb)
2026-01-13 18:09:05 -08:00
Miss Islington (bot)
be602fcde6
[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 103a384bfd)

Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
2026-01-13 13:53:41 +00:00
Inada Naoki
b739bd1d42
[3.13] gh-143189: fix insertdict() for non-Unicode key (GH-143285) (#143772) 2026-01-13 10:12:38 +00:00
Miss Islington (bot)
0612f5b882
[3.13] gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143411) (GH-143745)
(cherry picked from commit 3d44f0ab65)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
2026-01-12 18:20:22 +00:00
Sergey B Kirpichev
8fd4435cd9
[3.13] gh-78724: Raise RuntimeError's when calling methods on non-ready Struct()'s (GH-143643) (GH-143714)
(cherry picked from commit 515ae4078d)
2026-01-12 14:45:52 +02:00
Serhiy Storchaka
1822f59dc7
[3.13] gh-142881: Fix concurrent and reentrant call of atexit.unregister() (GH-142901) (GH-143722)
(cherry picked from commit dbd10a6c29)
2026-01-12 10:05:09 +00:00
Miss Islington (bot)
8ec108378c
[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 5f28aa2f37)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-12 09:04:00 +00:00