Commit graph

129049 commits

Author SHA1 Message Date
Miss Islington (bot)
242ededffd
[3.14] gh-125895: Fix static asset location for sphinx-notfound-page (GH-147984) (#148040)
(cherry picked from commit 80ab6d958a)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-03 16:40:12 +01:00
Miss Islington (bot)
3d49e490e2
[3.14] gh-148022: Add threat model to remote debugging docs (GH-148024) (#148039)
gh-148022: Add threat model to remote debugging docs (GH-148024)

The remote debugging protocol has been generating spurious
vulnerability reports from automated scanners that pattern-match
on "remote access" and "memory operations" without understanding
the privilege model. This section documents the security boundaries
so reporters can self-triage before submitting.

The threat model clarifies three points: attaching requires the
same OS-level privileges as GDB (ptrace, task_for_pid, or
SeDebugPrivilege), crashes caused by reading corrupted target
process memory are not security issues, and a compromised target
process is out of scope. A subsection explains when operators
should use PYTHON_DISABLE_REMOTE_DEBUG for defence-in-depth.
(cherry picked from commit edab6860a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2026-04-03 14:34:36 +00:00
Miss Islington (bot)
6996c8303b
[3.14] gh-146907: Clarify ABI compatibility between debug and release builds (GH-146925) (GH-147971)
(cherry picked from commit 03f3b9ade9)

Co-authored-by: konsti <konstin@mailbox.org>
2026-04-03 10:02:36 +02:00
Miss Islington (bot)
dbba26dabe
[3.14] gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395) (#148020)
gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395)
(cherry picked from commit 617f4cc1c2)

Co-authored-by: Tadej Magajna <tmagajna@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-02 21:32:48 +00:00
William Woodruff
ea9ecc8955
[3.14] gh-146488: hash-pin all action references (gh-146489) (#147983) 2026-04-02 09:30:01 +00:00
sunmy2019
b406d85603
[3.14] gh-146615: Fix format specifiers in extension modules (GH-146617) (#147704)
Fix format specifier in parse_task_name() for long result.
2026-04-01 15:12:44 +02:00
Sam Gross
6ea4f842fb
[3.14] gh-144438: Fix false sharing between QSBR and tlbc_index (gh-144554) (#144923)
Align the QSBR thread state array to a 64-byte cache line boundary
and add padding at the end of _PyThreadStateImpl. Depending on heap
layout, the QSBR array could end up sharing a cache line with a
thread's tlbc_index, causing QSBR quiescent state updates to contend
with reads of tlbc_index in RESUME_CHECK. This is sensitive to
earlier allocations during interpreter init and can appear or
disappear with seemingly unrelated changes.

Either change alone is sufficient to fix the specific issue, but both
are worthwhile to avoid similar problems in the future.

(cherry picked from commit 6577d870b0)
2026-03-31 19:20:24 +00:00
Miss Islington (bot)
25b48b84b8
[3.14] gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (GH-145901) (#147331)
gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (GH-145901)

The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion.  Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().
(cherry picked from commit db5936c5b8)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-31 16:14:12 +02:00
Miss Islington (bot)
e387bac1a4
[3.14] gh-126835: Fix _PY_IS_SMALL_INT() macro (GH-146631) (#147187)
gh-126835: Fix _PY_IS_SMALL_INT() macro (GH-146631)
(cherry picked from commit adf2c47911)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-31 13:27:11 +00:00
Miss Islington (bot)
2d1515dc21
[3.14] gh-145563: Add thread-safety annotation for PyCapsule C-API (GH-146612) (#146659)
gh-145563: Add thread-safety annotation for PyCapsule C-API (GH-146612)
(cherry picked from commit 67354b2925)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-03-31 17:05:49 +05:30
Serhiy Storchaka
58c7259133
[3.14] gh-146615: Fix format specifiers in extension modules (GH-146617) (GH-146652)
(cherry picked from commit 1c396e1821)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2026-03-31 10:07:09 +00:00
Miss Islington (bot)
e5ec90e021
[3.14] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) (GH-146651)
(cherry picked from commit bbf7fb2c15)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2026-03-31 09:17:58 +00:00
Miss Islington (bot)
3866c2947b
[3.14] gh-146615: Fix format specifiers in test cextensions (GH-146618) (GH-146649)
(cherry picked from commit b7055533ab)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2026-03-31 08:31:05 +00:00
Miss Islington (bot)
9ac758e6a4
[3.14] gh-146615: Fix format specifiers in Python/ directory (GH-146619) (GH-146650)
(cherry picked from commit dcb260eff2)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2026-03-31 08:25:07 +00:00
Miss Islington (bot)
ed557e6a5f
[3.14] gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) (GH-146647)
(cherry picked from commit 72d29ea363)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2026-03-31 08:20:00 +00:00
Miss Islington (bot)
99f333de7f
[3.14] gh-146376: Reduce timeout in Emscripten GHA workflow (GH-146378) (#146645)
gh-146376: Reduce timeout in Emscripten GHA workflow (GH-146378)
(cherry picked from commit 70d1b08a4b)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2026-03-30 21:03:46 +00:00
Miss Islington (bot)
3c434f7f0f
[3.14] gh-146250: Fix memory leak in re-initialization of SyntaxError (GH-146251) (#146517)
Co-authored-by: Brij Kapadia <97006829+bkap123@users.noreply.github.com>
2026-03-30 16:14:58 +00:00
Miss Islington (bot)
ec1148556f
[3.14] gh-146416: Emscripten: Improve standard stream handling in node_entry.mjs (GH-146417) (#146630)
gh-146416: Emscripten: Improve standard stream handling in node_entry.mjs (GH-146417)
(cherry picked from commit 6857de625f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-30 12:18:19 +00:00
Miss Islington (bot)
487fb7e342
[3.14] gh-146444: Don't package as part of iOS 'build hosts' target (GH-146628) (#146629)
gh-146444: Don't package as part of iOS 'build hosts' target (GH-146628)

* Revert Py3.9 compatibility fixes.
* Only build the package on 'build all'.
(cherry picked from commit 6420847bda)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-30 11:19:22 +00:00
Miss Islington (bot)
836e5abfb3
[3.14] gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (GH-146624) (#146627)
gh-146444: Make Platforms/Apple/ compatible with Python 3.9 (GH-146624)

Replace "str | None" with typing.Union[str, None].
(cherry picked from commit 382c04308d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-30 09:41:50 +00:00
Miss Islington (bot)
de234fc07a
[3.14] gh-146579: _zstd: Fix decompression options dict error message (GH-146577) (#146611)
The TypeError in _zstd_set_d_parameters incorrectly referred to
compression options; say decompression options instead.
(cherry picked from commit 4d0e8ee649)

Co-authored-by: cui <cuiweixie@gmail.com>
2026-03-30 08:26:45 +00:00
Miss Islington (bot)
7317e9d761
[3.14] gh-146556: Fix infinite loop in annotationlib.get_annotations() on circular __wrapped__ (GH-146557) (#146622)
gh-146556: Fix infinite loop in annotationlib.get_annotations() on circular __wrapped__ (GH-146557)
(cherry picked from commit 2cf6a68f02)

Co-authored-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
2026-03-29 22:30:14 -07:00
Miss Islington (bot)
36c22d06f0
[3.14] gh-146083: Upgrade bundled Expat to 2.7.5 (GH-146085) (#146603)
(cherry picked from commit e39d84a37d)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-29 17:31:02 +00:00
Miss Islington (bot)
1458ea0065
[3.14] gh-146090: fix memory management of internal sqlite3 callback contexts (GH-146569) (#146595)
gh-146090: fix memory management of internal `sqlite3` callback contexts (GH-146569)
(cherry picked from commit aa6680775d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-29 15:15:05 +02:00
Bénédikt Tran
883b6d22d1
[3.14] gh-146080: fix a crash in SNI callbacks when the SSL object is gone (GH-146573) (#146597)
(cherry picked from commit 24db78c532)
2026-03-29 12:58:37 +00:00
Miss Islington (bot)
525f8e4dce
[3.14] gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580) (#146585)
gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580)
(cherry picked from commit 1af025dd22)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-03-29 04:55:22 +00:00
Miss Islington (bot)
801f67c1af
[3.14] gh-146544: Fix asyncio.Queue docstring ambiguity (GH-146545) (#146567)
gh-146544: Fix `asyncio.Queue` docstring ambiguity (GH-146545)
(cherry picked from commit 578d726d46)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-03-28 19:41:29 +05:30
Miss Islington (bot)
85f5ea156d
[3.14] Docs: don't rely on implicit 'above' directions in socket docs (GH-146426) (#146560)
Docs: don't rely on implicit 'above' directions in socket docs (GH-146426)
(cherry picked from commit 3ff582238f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-28 05:53:14 -04:00
Miss Islington (bot)
28d3b9bc56
[3.14] gh-146004: propagate all -X options to multiprocessing child processes (GH-146005) (#146552)
gh-146004: propagate all -X options to multiprocessing child processes (GH-146005)

Propagate all -X command line options to multiprocessing spawned child Python processes.
(cherry picked from commit 1efe441de7)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-03-28 05:30:06 +00:00
Sergey Miryanov
ed38c20dd3
[3.14] Fix possible memory leak in OrderedDict popitem (GH-145247) (#146537) 2026-03-27 21:40:50 +00:00
Miss Islington (bot)
b4a0c8defe
[3.14] gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357) (#146534)
gh-146310: Fix ensurepip to treat empty WHEEL_PKG_DIR as unset (GH-146357)

Path('') resolves to CWD, so an empty WHEEL_PKG_DIR string caused
ensurepip to search the current working directory for wheel files.
Add a truthiness check to treat empty strings the same as None.
(cherry picked from commit 73cc1fd4f4)

Co-authored-by: Imgyu Kim <kimimgo@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 21:13:17 +00:00
Miss Islington (bot)
70affe0dc7
[3.14] gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel (GH-145617) (#146464)
gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel (GH-145617)

When Python is running on 32-bit ARM Android on a 64-bit ARM kernel, `os.uname().machine` is `armv8l`. Such devices run the same userspace code as `armv7l` devices, so apply the same `armeabi_v7a` Android ABI to them, which works.
(cherry picked from commit 3a2b81e919)

Co-authored-by: Robert Kirkman <31490854+robertkirkman@users.noreply.github.com>
2026-03-27 20:43:23 +01:00
Miss Islington (bot)
bc8497b77a
[3.14] Mention _Float16 (type from Annex H of the C23) in the struct docs (GH-146243) (#146529)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-27 17:44:27 +00:00
Miss Islington (bot)
8fde8faffe
[3.14] gh-142518: add thread safety annotations for bytearray C-API (GH-146514) (#146516)
gh-142518: add thread safety annotations for bytearray C-API (GH-146514)
(cherry picked from commit 5466f57ead)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-27 19:21:05 +05:30
Miss Islington (bot)
67862fc75e
[3.14] gh-142518: add thread safety docs on bytes C-API (GH-146415) (#146515)
gh-142518: add thread safety docs on bytes C-API (GH-146415)
(cherry picked from commit 6a94980301)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-27 13:07:37 +00:00
Miss Islington (bot)
d7e04e7b8d
[3.14] gh-146480: Override the exception in _PyErr_SetKeyError() (GH-146486) (#146511)
gh-146480: Override the exception in _PyErr_SetKeyError() (GH-146486)

If _PyErr_SetKeyError() is called with an exception set, it now
replaces the current exception with KeyError (as expected), instead
of setting a SystemError or failing with a fatal error (in debug
mode).
(cherry picked from commit d4153a9f76)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 11:48:29 +00:00
Miss Islington (bot)
cba54979df
[3.14] gh-146059: Cleanup pickle fast_save_enter() test (GH-146481) (#146509)
gh-146059: Cleanup pickle fast_save_enter() test (GH-146481)

Remove {"key": data}, it's not required to reproduce the bug.
Simplify also deep_nested_struct(): remove the seed parameter.
Fix a typo in a comment.
(cherry picked from commit 0c7a75aeef)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-27 08:40:03 +00:00
Miss Islington (bot)
4d61fd6b7a
[3.14] gh-146244: Fix initconfig.c SET_ITEM macro leaks dict on expression failure (GH-146246) (GH-146432)
(cherry picked from commit 9343518c6f)

Co-authored-by: Wulian233 <1055917385@qq.com>
2026-03-27 02:37:53 +00:00
Miss Islington (bot)
74c21aec82
[3.14] gh-146498: Ensure binary content is correctly processed in multi-arch iOS XCframeworks (GH-146499) (#146502)
Ensure that multi-arch libpython dylibs aren't copied into the app, and the
standard lib is always found for framework post-processing.
(cherry picked from commit 5684b3a04c)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-27 02:16:52 +00:00
Miss Islington (bot)
6a5354ef65
[3.14] gh-146446: Miscellaneous improvements to iOS XCframework build script (GH-146447) (#146496)
Modifies the iOS build script so that the clean target is more selective about
what is cleaned, the test target has a valid fallback value for ci mode, and the
cross-build directory can be customised.
(cherry picked from commit ca6dfa0f31)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-27 06:18:16 +08:00
Miss Islington (bot)
de54353235
[3.14] gh-144837: Improve documentation for more collection methods (GH-144841) (GH-146483)
Use uniform standard signature syntax in the tutorial and in
the array and collections modules documentation.
(cherry picked from commit 17070f41d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-26 19:55:25 +00:00
Miss Islington (bot)
e8c3d31b2c
[3.14] gh-146059: Call fast_save_leave() in pickle save_frozenset() (GH-146173) (#146473)
gh-146059: Call fast_save_leave() in pickle save_frozenset() (GH-146173)

Add more pickle tests: test also nested structures.
(cherry picked from commit 5c0dcb3e0d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-26 17:02:20 +00:00
Miss Islington (bot)
25714b3c82
[3.14] gh-146318: Document that signal.SIGSTOP is Unix-only (GH-146319) (#146468)
gh-146318: Document that signal.SIGSTOP is Unix-only (GH-146319)
(cherry picked from commit e44993a665)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-03-26 16:49:43 +01:00
Miss Islington (bot)
8a25840a2a
[3.14] gh-145633: Fix struct.pack('f') on s390x (GH-146422) (#146460)
gh-145633: Fix struct.pack('f') on s390x (GH-146422)

Use PyFloat_Pack4() to raise OverflowError.
Add more tests on packing/unpacking floats.
(cherry picked from commit 8de70b31c5)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-26 11:38:42 +00:00
Miss Islington (bot)
7efa72a6e4
[3.14] gh-138573: Filter out failing math tests on Solaris (GH-146402) (#146438)
gh-138573: Filter out failing math tests on Solaris (GH-146402)
(cherry picked from commit 8e1469c952)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-26 00:42:27 +00:00
Miss Islington (bot)
c8e0eadeb9
[3.14] Fix typo in 3.14 What's New tail call interpreter docs (GH-146425) (GH-146430)
Fix typo in 3.14 What's New tail call interpreter docs (GH-146425)
(cherry picked from commit 4447f23f40)

Co-authored-by: johnthagen <johnthagen@users.noreply.github.com>
2026-03-25 18:59:35 +00:00
Miss Islington (bot)
e34945a94c
[3.14] gh-146358: Fix warnings.catch_warnings on Free Threading (GH-146374) (#146418)
gh-146358: Fix warnings.catch_warnings on Free Threading (GH-146374)

catch_warnings now also overrides warnings.showwarning() on Free
Threading to support custom warnings.showwarning().
(cherry picked from commit 0055140b2c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-25 16:23:21 +00:00
Miss Islington (bot)
ce78904601
[3.14] gh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (GH-145099) (#146412)
Co-authored-by: clintonsteiner <47841949+clintonsteiner@users.noreply.github.com>
2026-03-25 11:41:12 +00:00
Hood Chatham
498559a7f3
[3.14] gh-146352: In Emscripten pyrepl test, pick port dynamically (GH-146375) (#146411)
Dynamically allocates the port for the pyrepl browser test, so that multiple
tests can run at the same time. Also allows the pyrepl test to honor the
CROSS_BUILD_DIR environment variable.
(cherry picked from commit 2be147e1e7)
2026-03-25 11:34:43 +00:00
Miss Islington (bot)
4f5f6ea7be
[3.14] gh-144984: Skip test under tracerefs (GH-146218) (GH-146384)
(cherry picked from commit 119fce7b88)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-25 10:35:31 +01:00