Commit graph

129019 commits

Author SHA1 Message Date
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
Sam Gross
f2b5131d1a
[3.14] gh-146041: Avoid lock in sys.intern() for already interned strings (gh-146072) (#146390)
Fix free-threading scaling bottleneck in sys.intern and `PyObject_SetAttr` by
avoiding the interpreter-wide lock when the string is already interned and
immortalized.

(cherry picked from commit 60093096ba)
2026-03-24 21:42:19 -04:00
Pablo Galindo Salgado
58c5eda24c
[3.14] gh-146308: Fix error handling issues in _remote_debugging module (GH-146309) (#146398)
(cherry picked from commit ae6adc9079)
2026-03-25 01:05:47 +00:00
Miss Islington (bot)
ac2fff4c0e
[3.14] gh-140196: Added constructor behavior changes in ast.rst for python 3.13 (GH-140243) (GH-146351)
(cherry picked from commit fae5761a76)

Co-authored-by: Parman Mohammadalizadeh <prmma23@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2026-03-24 02:37:09 +01:00
Miss Islington (bot)
ad273f76b2
[3.14] gh-146202: Create tmp_dir in regrtest worker (GH-146347) (#146349)
gh-146202: Create tmp_dir in regrtest worker (GH-146347)

Create tmp_dir in libregrtest.worker since the directory can be
different than the --tempdir directory.
(cherry picked from commit bcff99cb3f)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-24 00:13:09 +00:00
Miss Islington (bot)
c1df96a930
[3.14] gh-145870: Fix Format.SOURCE reference in get_annotations docstring (GH-145889) (GH-146036)
The get_annotations() docstring incorrectly referred to the SOURCE
format, which was renamed to STRING during PEP 749 development.
(cherry picked from commit 2a0fa500f8)

Co-authored-by: wavebyrd <160968744+wavebyrd@users.noreply.github.com>
Co-authored-by: Carson Jones <carson@Carsons-MacBook-Pro.local>
2026-03-24 00:29:53 +01:00
Zachary Ware
d64665b6ae
[3.14] gh-136728: Combine OpenSSL and AWS-LC CI configurations (GH-144805) (GH-145397)
(cherry picked from commit c9b96b1e6f)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2026-03-24 00:28:27 +01:00
Miss Islington (bot)
cbb1985b72
[3.14] GH-131296: Suppress clang-cl warnings in socketmodule.c (GH-131821) (GH-146339)
(cherry picked from commit cc8e6d2703)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-03-24 00:27:20 +01:00
Miss Islington (bot)
c334bdee7b
[3.14] GH-131296: Fix clang-cl warning on Windows in socketmodule.h (GH-131832) (GH-146340)
(cherry picked from commit 59e2330cf3)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-03-24 00:27:01 +01:00
Serhiy Storchaka
e31c551216
[3.14] gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267) (GH-146326)
Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.
(cherry picked from commit 4561f6418a)
2026-03-24 00:20:26 +01:00
Miss Islington (bot)
9669a912a0
[3.14] gh-143930: Reject leading dashes in webbrowser URLs (GH-146214)
(cherry picked from commit 82a24a4442)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-03-24 00:16:27 +01:00
Hood Chatham
7c8a46bcce
[3.14] gh-146197: Add Emscripten to CI (GH-146198) (GH-146331)
(cherry picked from commit c94048be02)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-24 00:13:16 +01:00
Miss Islington (bot)
abd276ab3d
[3.14] docs: fix f-string in ExceptionGroup example (GH-146108) (GH-146126)
(cherry picked from commit 2c6afb935a)

Co-authored-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
2026-03-24 00:09:00 +01:00
Miss Islington (bot)
74d104d66c
[3.14] gh-145305: Update ocert.org URLs in docs from http to https (GH-145304) (GH-145322)
(cherry picked from commit 11eec7a492)

Co-authored-by: indoor47 <indoor47@gmail.com>
Co-authored-by: Adam (indoor47) <adamai@agentmail.to>
2026-03-23 23:36:40 +01:00
dr-carlos
dd4ea46917
[3.14] gh-141732: Fix ExceptionGroup repr changing when original exception sequence is mutated (GH-141736) (GH-144445)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2026-03-23 23:31:32 +01:00
Miss Islington (bot)
1b2f0bd54c
[3.14] gh-136672: Docs: Move parts of Enum HOWTO to API Docs (GH-139176) (GH-144802)
To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also https://github.com/python/cpython/pull/136791
(cherry picked from commit 629a363ddd)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
2026-03-23 21:21:41 +01:00
Victor Stinner
c6dd764719
[3.14] gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332) (#146336)
gh-146197: Run -m test.pythoninfo on the Emscripten CI (#146332)


(cherry picked from commit a57209eb98)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-23 17:54:57 +00:00
Miss Islington (bot)
f883bbd433
[3.14] gh-108907: ctypes: Document _type_ codes (GH-145837) (GH-146328)
gh-108907: ctypes: Document _type_ codes (GH-145837)

Add `_SimpleCData._type_` docs.

Add type codes to the summary table.

Cross-link `struct`, `array`, and `ctypes`; throw in `numpy` too.
(Anyone wanting to add a code should be aware of those.)

Add `py_object`, and `VARIANT_BOOL` for completeness.
(cherry picked from commit 1114d7f7f8)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-23 14:07:24 +01:00
Miss Islington (bot)
8e7c62b41a
[3.14] gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) (GH-146290)
(cherry picked from commit 161329cde2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-22 15:47:37 +00:00
Miss Islington (bot)
114d1c38b1
[3.14] gh-143959: Fix test_datetime if _datetime is unavailable (GH-145248) (GH-146288)
(cherry picked from commit 97c725cd39)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-22 14:41:38 +00:00
Miss Islington (bot)
69a37be21c
[3.14] gh-146245: Fix reference and buffer leaks via audit hook in socket module (GH-146248) (GH-146274)
(cherry picked from commit c30fae4bea)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-03-22 11:55:13 +00:00
Serhiy Storchaka
796513306f
[3.14] gh-146056: Fix repr() for lists and tuples containing NULLs (GH-146129) (GH-146155)
(cherry picked from commit 0f2246b155)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-22 09:25:02 +02:00
Miss Islington (bot)
d65e8d9094
[3.14] Docs: replace all datetime imports with import datetime as dt (GH-145640) (#146258)
Docs: replace all `datetime` imports with `import datetime as dt` (GH-145640)
(cherry picked from commit 83360b5869)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-21 20:19:07 +02:00
Maciej Olko
9737ce2ac2
[3.14] gh-139588: Docs: fix PDF build (#145741) 2026-03-21 19:07:12 +02:00
Miss Islington (bot)
f2c70247fb
[3.14] gh-138234: clarify returncode behavior for subprocesses created with shell=True (GH-138536) (#146254)
gh-138234: clarify returncode behavior for subprocesses created with `shell=True` (GH-138536)
(cherry picked from commit 8a531f89df)

Co-authored-by: andreuu-tsai <32549555+andreuu-tsai@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 12:38:34 +00:00
Miss Islington (bot)
d6e0066920
[3.14] GH-100108: Add async generators best practices section (GH-141885) (#146252)
GH-100108: Add async generators best practices section (GH-141885)
(cherry picked from commit 897fa231a7)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 12:05:06 +00:00
AN Long
6bd5992d8b
[3.14] gh-129849: Add tests for Py_tp_bases (GH-143208) (#146225)
(cherry picked from commit 6f8867a676)
2026-03-21 15:22:58 +05:30
Sam Gross
73e74eeb2f
[3.14] gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229) (#146232)
Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.

(cherry picked from commit 1eff27f2c0)
2026-03-20 20:08:20 +00:00
Miss Islington (bot)
a2a45d7d13
[3.14] gh-146092: Raise MemoryError on allocation failure in _zoneinfo (GH-146165) (#146223)
gh-146092: Raise MemoryError on allocation failure in _zoneinfo (GH-146165)
(cherry picked from commit 6450b1d142)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-20 16:44:19 +00:00
Victor Stinner
6e73225c32
[3.14] gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201) (#146220)
gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)

Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.


(cherry picked from commit cd10a2e65c)

Co-authored-by: Shamil <ashm.tech@proton.me>
2026-03-20 16:26:18 +00:00
Miss Islington (bot)
8b447fb56c
[3.14] gh-91279: Note SOURCE_DATE_EPOCH support in ZipFile.writestr() doc (GH-139396) (#146222)
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (GH-139396)
(cherry picked from commit 5ad738f8fb)

Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-20 16:20:39 +00:00