]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 months agogh-144484: Warn users not to use wsgiref in production 144516/head
Seth Michael Larson [Thu, 5 Feb 2026 15:43:39 +0000 (09:43 -0600)] 
gh-144484: Warn users not to use wsgiref in production

2 months agogh-144148: Update the urllib.parse documentation (GH-144497)
Serhiy Storchaka [Thu, 5 Feb 2026 14:32:17 +0000 (16:32 +0200)] 
gh-144148: Update the urllib.parse documentation (GH-144497)

Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.

2 months agogh-144363: Update bundled libexpat to 2.7.4 (#144365)
Stan Ulbrych [Thu, 5 Feb 2026 12:58:18 +0000 (12:58 +0000)] 
gh-144363: Update bundled libexpat to 2.7.4 (#144365)

* Update to 2.7.4

* update expat license copyright year to match and a pedantic #define

* include COPYING update in refresh.sh

* Update checksum for copying

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 months agogh-144330: Initialize classmethod and staticmethod in new (#144469)
Victor Stinner [Thu, 5 Feb 2026 10:32:56 +0000 (11:32 +0100)] 
gh-144330: Initialize classmethod and staticmethod in new (#144469)

Move classmethod and staticmethod initialization from __init__() to
__new__().

PyClassMethod_New() and PyStaticMethod_New() now copy attributes of
the wrapped functions: __module__, __name__, __qualname__ and
__doc__.

Change static type initialization: initialize PyStaticMethod_Type and
PyCFunction_Type earlier.

Remove test_refleaks_in_classmethod___init__() and
test_refleaks_in_staticmethod___init__() tests from test_descr since
classmethod and staticmethod have no __init__() method anymore.

2 months agoGH-144179: Use recorded values to make optimizer more robust (GH-144437)
Mark Shannon [Thu, 5 Feb 2026 08:58:41 +0000 (08:58 +0000)] 
GH-144179: Use recorded values to make optimizer more robust (GH-144437)

* Add three new symbol kinds
* Do not smuggle code object in _PUSH_FRAME operand
* Fix small bug in predicate analysis

2 months agoItertools recipes: Replace the tabulate() example with running_mean() (gh-144483)
Raymond Hettinger [Wed, 4 Feb 2026 20:21:20 +0000 (14:21 -0600)] 
Itertools recipes:  Replace the tabulate() example with running_mean() (gh-144483)

2 months agogh-123471: Make concurrent iteration over `itertools.permutations` and `itertools...
Pieter Eendebak [Wed, 4 Feb 2026 18:38:45 +0000 (19:38 +0100)] 
gh-123471: Make concurrent iteration over `itertools.permutations` and `itertools.combinations_with_replacement` thread-safe (gh-144402)

2 months agogh-143962: Improve name suggestions for not normalized names (GH-144154)
Serhiy Storchaka [Wed, 4 Feb 2026 17:23:09 +0000 (19:23 +0200)] 
gh-143962: Improve name suggestions for not normalized names (GH-144154)

Suggest the normalized name or the closest name to the normalized name.
If the suggested name is not ASCII, include also its ASCII representation.

2 months agogh-106318: Add examples for `str.startswith()` method (#144369)
Adorilson Bezerra [Wed, 4 Feb 2026 17:17:42 +0000 (17:17 +0000)] 
gh-106318: Add examples for `str.startswith()` method (#144369)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-141004: Document remaining `pyport.h` utility macros (GH-144279)
Peter Bierma [Wed, 4 Feb 2026 16:43:47 +0000 (11:43 -0500)] 
gh-141004: Document remaining `pyport.h` utility macros (GH-144279)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985)
Petr Viktorin [Wed, 4 Feb 2026 16:08:23 +0000 (17:08 +0100)] 
gh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-140824: Fix _Py_DumpExtensionModules() to ignore sub-modules (#144339)
Victor Stinner [Wed, 4 Feb 2026 15:06:35 +0000 (16:06 +0100)] 
gh-140824: Fix _Py_DumpExtensionModules() to ignore sub-modules (#144339)

Ignore "math.integer" extension if "math" is in
sys.stdlib_module_names.

2 months agogh-142903: add conda-forge license for pixi-packages (#143468)
Lucas Colley [Wed, 4 Feb 2026 12:36:14 +0000 (12:36 +0000)] 
gh-142903: add conda-forge license for pixi-packages (#143468)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: h-vetinari <h.vetinari@gmx.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-144386: Add support for descriptors in ExitStack and AsyncExitStack (#144420)
Serhiy Storchaka [Wed, 4 Feb 2026 11:20:18 +0000 (13:20 +0200)] 
gh-144386: Add support for descriptors in ExitStack and AsyncExitStack (#144420)

__enter__(), __exit__(), __aenter__(), and __aexit__() can now be
arbitrary descriptors, not only normal methods, for consistency with the
"with" and "async with" statements.

2 months agogh-141444: Replace dead URL in urllib.robotparser example (GH-144443)
kovan [Wed, 4 Feb 2026 08:45:15 +0000 (09:45 +0100)] 
gh-141444: Replace dead URL in urllib.robotparser example (GH-144443)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2 months agogh-143120: pixi builds for free-threading and TSAN (#142872)
Guido Imperiale [Wed, 4 Feb 2026 04:28:29 +0000 (04:28 +0000)] 
gh-143120: pixi builds for free-threading and TSAN (#142872)

Co-authored-by: Isuru Fernando <isuruf@gmail.com>
Co-authored-by: Lucas Colley <lucas.colley8@gmail.com>
2 months agoRemove unused PYEXPAT_EXPORTS from PCBuild/pyexpat.vcxproj (GH-144462)
Max Bachmann [Tue, 3 Feb 2026 23:38:22 +0000 (00:38 +0100)] 
Remove unused PYEXPAT_EXPORTS from PCBuild/pyexpat.vcxproj (GH-144462)

2 months agogh-120321: Add gi_state, cr_state, and ag_state attributes (gh-144409)
Sam Gross [Tue, 3 Feb 2026 18:06:32 +0000 (13:06 -0500)] 
gh-120321: Add gi_state, cr_state, and ag_state attributes (gh-144409)

Add `gi_state`, `cr_state`, and `ag_state` attributes to generators,
coroutines, and async generators respectively. These attributes return the
current state as a string (e.g., `GEN_RUNNING`, `CORO_SUSPENDED`).

The `inspect.getgeneratorstate()`, `inspect.getcoroutinestate()`, and
`inspect.getasyncgenstate()` functions now return these attributes directly.

This is in preparation for making `gi_frame` thread-safe, which may involve
stop-the-world synchronization. The new state attributes avoid potential
performance cliffs in `inspect.getgeneratorstate()` and similar functions by
not requiring frame access.

Also removes unused `FRAME_COMPLETED` state and renumbers the frame state enum
to start at 0 instead of -1.

2 months agogh-139103: Use borrowed references for positional args in _PyStack_UnpackDict (gh...
Sam Gross [Tue, 3 Feb 2026 17:24:35 +0000 (12:24 -0500)] 
gh-139103: Use borrowed references for positional args in _PyStack_UnpackDict (gh-144407)

The positional arguments passed to _PyStack_UnpackDict are already
kept alive by the caller, so we can avoid the extra reference count
operations by using borrowed references instead of creating new ones.

This reduces reference count contention in the free-threaded build
when calling functions with keyword arguments. In particular, this
avoids contention on the type argument to `__new__` when instantiating
namedtuples with keyword arguments.

2 months agogh-127313: Use getLogger() without argument to get root logger in logging cookbook...
AN Long [Tue, 3 Feb 2026 14:49:12 +0000 (23:49 +0900)] 
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)

Use getLogger() to get root logger in logging cookbook

2 months agogh-74453: Add stronger security warning to os.path.commonprefix (GH-144401)
Seth Michael Larson [Tue, 3 Feb 2026 14:07:59 +0000 (08:07 -0600)] 
gh-74453: Add stronger security warning to os.path.commonprefix (GH-144401)

2 months agogh-106318: Add examples for str.rindex() method (#143887)
Adorilson Bezerra [Tue, 3 Feb 2026 13:29:05 +0000 (13:29 +0000)] 
gh-106318: Add examples for str.rindex() method (#143887)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-142956: Update `tomllib` to parse TOML 1.1.0 (#144243)
Taneli Hukkinen [Tue, 3 Feb 2026 12:41:57 +0000 (14:41 +0200)] 
gh-142956: Update `tomllib` to parse TOML 1.1.0 (#144243)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-144377: Clean up sqlite3 Connection's list of weakrefs to Cursor objects (#144378)
Thomas Kluyver [Tue, 3 Feb 2026 12:36:12 +0000 (12:36 +0000)] 
gh-144377: Clean up sqlite3 Connection's list of weakrefs to Cursor objects (#144378)

2 months agogh-132888: Fix Windows API error checking in pyrepl.windows_console (#144248)
AN Long [Tue, 3 Feb 2026 12:25:29 +0000 (21:25 +0900)] 
gh-132888: Fix Windows API error checking in pyrepl.windows_console (#144248)

2 months agogh-139103: use `METH_FASTCALL` for tp_new_wrapper (#144406)
Sam Gross [Tue, 3 Feb 2026 10:32:06 +0000 (05:32 -0500)] 
gh-139103: use `METH_FASTCALL` for tp_new_wrapper (#144406)

2 months agogh-144415: Android testbed fixes (#142912)
Malcolm Smith [Tue, 3 Feb 2026 08:37:34 +0000 (08:37 +0000)] 
gh-144415: Android testbed fixes (#142912)

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.

2 months agogh-75572: Speed up test_xpickle (GH-144393)
Serhiy Storchaka [Mon, 2 Feb 2026 18:00:12 +0000 (20:00 +0200)] 
gh-75572: Speed up test_xpickle (GH-144393)

Run a long living subprocess which handles multiple requests instead of
running a new subprocess for each request.

2 months agogh-139109: Replace `_CHECK_STACK_SPACE` with `_CHECK_STACK_SPACE_OPERAND` in JIT...
Hai Zhu [Mon, 2 Feb 2026 17:12:01 +0000 (01:12 +0800)] 
gh-139109: Replace `_CHECK_STACK_SPACE` with `_CHECK_STACK_SPACE_OPERAND` in JIT optiimizer (GH-144394)

2 months agoGH-144179: Add value recording to JIT tracing front-end (GH-144303)
Mark Shannon [Mon, 2 Feb 2026 16:57:04 +0000 (16:57 +0000)] 
GH-144179: Add value recording to JIT tracing front-end (GH-144303)

2 months agogh-144376: Only run 'address' fuzzer for python3-libraries (#144398)
Seth Michael Larson [Mon, 2 Feb 2026 15:55:11 +0000 (09:55 -0600)] 
gh-144376: Only run 'address' fuzzer for python3-libraries (#144398)

2 months agogh-144242: Note that issues aren't needed for typos in docs template (GH-144288)
Stan Ulbrych [Mon, 2 Feb 2026 14:56:45 +0000 (14:56 +0000)] 
gh-144242: Note that issues aren't needed for typos in docs template (GH-144288)

2 months agogh-142555: Fix null pointer dereference in array.__setitem__ via re-entrant __index__...
AN Long [Mon, 2 Feb 2026 14:44:08 +0000 (23:44 +0900)] 
gh-142555: Fix null pointer dereference in array.__setitem__ via re-entrant __index__ (GH-142713)

2 months agogh-134160: "First extension module" tutorial improvements (GH-144183)
Petr Viktorin [Mon, 2 Feb 2026 14:32:25 +0000 (15:32 +0100)] 
gh-134160: "First extension module" tutorial improvements (GH-144183)

- Pass -v to pip, so compiler output is visible
- Move the call ``spam.system(3)`` up so that error handling is tested
  right after it's added
- Use `PyUnicode_AsUTF8AndSize` as `PyUnicode_AsUTF8` is not in the
  Limited API.
- Add a footnote about embedded NULs.

2 months agogh-144145: Revert PR#144122 for performance and potential bugs. (GH-144391)
Hai Zhu [Mon, 2 Feb 2026 14:09:54 +0000 (22:09 +0800)] 
gh-144145: Revert PR#144122 for performance and potential bugs. (GH-144391)

Revert "gh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)"

This reverts commit 1dc12b2883c89045469f3c401157d4df13f535f0.

2 months agogh-144001: Simplify Base64 decoding with altchars and ignorechars specified (GH-144324)
Serhiy Storchaka [Mon, 2 Feb 2026 11:38:32 +0000 (13:38 +0200)] 
gh-144001: Simplify Base64 decoding with altchars and ignorechars specified (GH-144324)

Treat "+" and "/" like other characters not in the alternative Base64
alphabet when both altchars and ignorechars are specified.
E.g. discard them if they are not in altchars but are in ignorechars,
and set error if they are not in altchars and not in ignorechars.
Only emit warnings if ignorechars is not specified.

2 months agogh-115231: Fill __module__ for built-in staticmethods (#115232)
Sergey B Kirpichev [Mon, 2 Feb 2026 11:34:02 +0000 (14:34 +0300)] 
gh-115231: Fill __module__ for built-in staticmethods (#115232)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agodocs: update dangling reference to `LOAD_METHOD` in dis.rst (#144358)
Guilherme Leobas [Mon, 2 Feb 2026 10:30:17 +0000 (07:30 -0300)] 
docs: update dangling reference to `LOAD_METHOD` in dis.rst (#144358)

2 months agogh-144380: Fix incorrect type check in `buffered_iternext()` (#144381)
Ruiyang Ke [Mon, 2 Feb 2026 10:04:18 +0000 (02:04 -0800)] 
gh-144380: Fix incorrect type check in `buffered_iternext()` (#144381)

2 months agogh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333)
Peter Bierma [Mon, 2 Feb 2026 01:39:26 +0000 (17:39 -0800)] 
gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333)

2 months agogh-143904: Raise OverflowError instead of IndexError for too large offset in struct... 144349/head
Serhiy Storchaka [Sun, 1 Feb 2026 13:25:59 +0000 (15:25 +0200)] 
gh-143904: Raise OverflowError instead of IndexError for too large offset in struct.pack_into() (GH-143905)

2 months agogh-144348: annotationlib: fix test that relies on set ordering (#144359)
Jelle Zijlstra [Sun, 1 Feb 2026 04:05:46 +0000 (20:05 -0800)] 
gh-144348: annotationlib: fix test that relies on set ordering (#144359)

2 months agoFix unused variable 'COLORS' warning in optimizer.c (#144373)
AN Long [Sun, 1 Feb 2026 04:01:45 +0000 (13:01 +0900)] 
Fix unused variable 'COLORS' warning in optimizer.c (#144373)

2 months agogh-143055: Implementation of PEP 798 (#143056)
adam j hartz [Sat, 31 Jan 2026 04:37:52 +0000 (23:37 -0500)] 
gh-143055: Implementation of PEP 798 (#143056)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 months agogh-144319: Fix huge page safety in pymalloc arenas (#144331) 128880/head
Pablo Galindo Salgado [Fri, 30 Jan 2026 18:18:56 +0000 (18:18 +0000)] 
gh-144319: Fix huge page safety in pymalloc arenas (#144331)

The pymalloc huge page support had two problems. First, on
architectures where the default huge page size exceeds the arena
size (e.g. 32 MiB on PPC, 512 MiB on ARM64 with 64 KB base
pages), mmap with MAP_HUGETLB silently allocates a full huge page
even when the requested size is smaller. The subsequent munmap
with the original arena size then fails with EINVAL, permanently
leaking the entire huge page. Second, huge pages were always
attempted when compiled in, with no way to disable them at
runtime. On Linux, if the huge page pool is exhausted, page
faults including copy-on-write faults after fork deliver SIGBUS
and kill the process.

The arena allocator now queries the system huge page size from
/proc/meminfo and skips MAP_HUGETLB when the arena size is not a
multiple of it. Huge pages also now require explicit opt-in at
runtime via the PYTHON_PYMALLOC_HUGEPAGES environment variable,
which is read through PyConfig and respects -E and -I flags.
The config field pymalloc_hugepages is propagated to the runtime
allocators struct so the low-level arena allocator can check it
without calling getenv directly.

2 months agogh-120321: Make gi_yieldfrom thread-safe in free-threading build (#144292)
Sam Gross [Fri, 30 Jan 2026 17:20:27 +0000 (12:20 -0500)] 
gh-120321: Make gi_yieldfrom thread-safe in free-threading build (#144292)

Add a FRAME_SUSPENDED_YIELD_FROM_LOCKED state that acts as a brief
lock, preventing other threads from transitioning the frame state
while gen_getyieldfrom reads the yield-from object off the stack.

2 months agogh-144280: Add missing predicate symbol to case-switch (GH-144298)
reiden [Fri, 30 Jan 2026 16:43:27 +0000 (00:43 +0800)] 
gh-144280: Add missing predicate symbol to case-switch (GH-144298)

2 months agogh-144295: Fix data race in dict method lookup and global load (gh-144312)
Sam Gross [Fri, 30 Jan 2026 16:14:10 +0000 (11:14 -0500)] 
gh-144295: Fix data race in dict method lookup and global load (gh-144312)

In `_PyDict_GetMethodStackRef`, only use the fast-path unicode lookup
when the dict is owned by the current thread or already marked as shared.
This prevents a race between the lookup and concurrent dict resizes,
which may free the PyDictKeysObject (i.e., it ensures that the resize
uses QSBR).

Address a similar issue in `_Py_dict_lookup_threadsafe_stackref` by
calling `ensure_shared_on_read()`.

2 months agogh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)
Hai Zhu [Fri, 30 Jan 2026 15:25:19 +0000 (23:25 +0800)] 
gh-144145: Track nullness of properties in the Tier 2 JIT optimizer (GH-144122)

2 months agogh-144342: Use `time.sleep` in `profiling.sampling` (#144343)
Maurycy Pawłowski-Wieroński [Fri, 30 Jan 2026 15:13:21 +0000 (16:13 +0100)] 
gh-144342: Use `time.sleep` in `profiling.sampling` (#144343)

2 months agogh-143423: Fix free-threaded build detection in sampling profiler (#143426)
Divyanshu Choudhury [Fri, 30 Jan 2026 00:35:30 +0000 (06:05 +0530)] 
gh-143423: Fix free-threaded build detection in sampling profiler (#143426)

2 months agogh-143192 Avoid incref/decref pair in long_bitwise (gh-143194)
Pieter Eendebak [Thu, 29 Jan 2026 21:32:09 +0000 (22:32 +0100)] 
gh-143192 Avoid incref/decref pair in long_bitwise (gh-143194)

Remove unnecessary reference count operations in long_bitwise in order to
avoid reference count contention in the free-threading build.

2 months agogh-144307: Fix a reference leak during module teardown (GH-144308)
Yongtao Huang [Thu, 29 Jan 2026 18:50:54 +0000 (02:50 +0800)] 
gh-144307: Fix a reference leak during module teardown (GH-144308)

Signed-off-by: Yongtao Huang <yongtaoh2022@gamil.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 months agoTest: fix stale uops usage in `test_capi/test_opt.py` (GH-144239)
Yongtao Huang [Thu, 29 Jan 2026 17:08:14 +0000 (01:08 +0800)] 
Test: fix stale uops usage in `test_capi/test_opt.py` (GH-144239)

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
2 months agogh-143946: Add more debug info in `optimize_uops` (GH-144262)
Hai Zhu [Thu, 29 Jan 2026 16:58:01 +0000 (00:58 +0800)] 
gh-143946: Add more debug info in `optimize_uops` (GH-144262)

2 months agogh-144264: Speed up Base64 decoding of data containing ignored characters (GH-144265)
Serhiy Storchaka [Thu, 29 Jan 2026 15:33:10 +0000 (17:33 +0200)] 
gh-144264: Speed up Base64 decoding of data containing ignored characters (GH-144265)

Try the fast path again after decoding a quad the slow path.
Use a bitmap cache for the ignorechars argument.

2 months agogh-144322: typo This errors to These errors (#144323)
cui [Thu, 29 Jan 2026 13:26:38 +0000 (21:26 +0800)] 
gh-144322: typo This errors to These errors (#144323)

2 months agogh-144206: Improve error messages for buffer overflow in fcntl.fcntl() and fcntl...
Serhiy Storchaka [Thu, 29 Jan 2026 13:04:37 +0000 (15:04 +0200)] 
gh-144206: Improve error messages for buffer overflow in fcntl.fcntl() and fcntl.ioctl() (GH-144273)

2 months agogh-144309: Build Python with POSIX 2024 (#144310)
Victor Stinner [Thu, 29 Jan 2026 12:50:07 +0000 (13:50 +0100)] 
gh-144309: Build Python with POSIX 2024 (#144310)

On FreeBSD, the ppoll() function is only visible if the POSIX version
is 2024 or newer.

2 months agogh-144319: Add huge pages support for pymalloc (#144320)
Pablo Galindo Salgado [Thu, 29 Jan 2026 12:26:11 +0000 (12:26 +0000)] 
gh-144319: Add huge pages support for pymalloc (#144320)

2 months agogh-142387: Reduce Android testbed API level to 33 (#144315)
Malcolm Smith [Wed, 28 Jan 2026 23:48:26 +0000 (23:48 +0000)] 
gh-142387: Reduce Android testbed API level to 33 (#144315)

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.

2 months agogh-83069: Use efficient event-driven `subprocess.Popen.wait()` on Linux / macOS ...
Giampaolo Rodola [Wed, 28 Jan 2026 14:04:40 +0000 (15:04 +0100)] 
gh-83069: Use efficient event-driven `subprocess.Popen.wait()` on Linux / macOS / BSD (#144047)

2 months agogh-144194: Fix mmap failure check in perf_jit_trampoline.c (#143713)
stratakis [Wed, 28 Jan 2026 13:30:17 +0000 (14:30 +0100)] 
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.

2 months agogh-140232: Do not track frozenset objects with immutables (#140234)
Pieter Eendebak [Wed, 28 Jan 2026 10:27:37 +0000 (11:27 +0100)] 
gh-140232: Do not track frozenset objects with immutables (#140234)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-144249: Report filename in SSLContext.load_cert_chain errors (#144250)
Romuald Brunet [Wed, 28 Jan 2026 10:20:51 +0000 (11:20 +0100)] 
gh-144249: Report filename in SSLContext.load_cert_chain errors (#144250)

When user tries to load a certificate chain, attach the related
filename to the exception being raised. Improving user experience.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agogh-144289: Remove ENABLE_SPECIALIZATION_FT (gh-144290)
Sam Gross [Tue, 27 Jan 2026 22:52:50 +0000 (17:52 -0500)] 
gh-144289: Remove ENABLE_SPECIALIZATION_FT (gh-144290)

Now that the specializing interpreter works with free threading,
replace ENABLE_SPECIALIZATION_FT with ENABLE_SPECIALIZATION and
replace requires_specialization_ft with requires_specialization.

Also limit the uniquely referenced check to FOR_ITER_RANGE. It's not
necessary for FOR_ITER_GEN and would cause test_for_iter_gen to fail.

2 months agogh-120321: Add missing "return false" in gen_try_set_executing (gh-144291)
Sam Gross [Tue, 27 Jan 2026 21:38:50 +0000 (16:38 -0500)] 
gh-120321: Add missing "return false" in gen_try_set_executing (gh-144291)

We didn't catch this because of a combination of:

1) falling through to the if-statement below works
2) we only specialized FOR_ITER_GEN for uniquely referenced generators,
   so we didn't trigger the non-thread-safe behavior.

2 months agoGH-126910: add test for manual frame unwinding (#144137)
Diego Russo [Tue, 27 Jan 2026 13:17:40 +0000 (13:17 +0000)] 
GH-126910: add test for manual frame unwinding (#144137)

2 months agoAvoid TestNullDlsym hanging on HP-PA (#141011)
Stefano Rivera [Tue, 27 Jan 2026 11:39:03 +0000 (03:39 -0800)] 
Avoid TestNullDlsym hanging on HP-PA (#141011)

glibc has no support for IFUNC on HP PA RISC yet. Rather than waiting
for an "OK" that we'll never get, skip the test.

See: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/hppa/dl-irel.h;h=770dcb3ea3a6ce232bb11bf59315cfec4c543f93;hb=HEAD

2 months agogh-143883: Use named parameters in PyModExport-related declarations & docs (GH-143884)
Nathan Goldbaum [Tue, 27 Jan 2026 10:28:28 +0000 (03:28 -0700)] 
gh-143883: Use named parameters in PyModExport-related declarations & docs (GH-143884)

2 months agogh-126014: test_makefile_test_folders: Ignore basically-empty directories (#140466)
Stefano Rivera [Tue, 27 Jan 2026 10:05:09 +0000 (02:05 -0800)] 
gh-126014: test_makefile_test_folders: Ignore basically-empty directories (#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.

2 months agogh-142119: Clarify that one `contextvars.Token` can only reset once in a lifetime...
Bartosz Sławecki [Tue, 27 Jan 2026 09:49:05 +0000 (10:49 +0100)] 
gh-142119: Clarify that one `contextvars.Token` can only reset once in a lifetime (GH-143693)

2 months agogh-144257: document return values of PyModule_SetDocString (GH-144258)
Nathan Goldbaum [Tue, 27 Jan 2026 07:15:16 +0000 (00:15 -0700)] 
gh-144257: document return values of PyModule_SetDocString (GH-144258)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 months agogh-142037: Fix a refleak introduced in GH-142081 (GH-144256)
Serhiy Storchaka [Mon, 26 Jan 2026 21:15:21 +0000 (23:15 +0200)] 
gh-142037: Fix a refleak introduced in GH-142081 (GH-144256)

2 months agogh-144001: Support ignorechars in binascii.a2b_base64() and base64.b64decode() (GH...
Serhiy Storchaka [Mon, 26 Jan 2026 18:11:40 +0000 (20:11 +0200)] 
gh-144001: Support ignorechars in binascii.a2b_base64() and base64.b64decode() (GH-144024)

2 months agogh-142966: Make ctypes.POINTER.set_type also reset format (GH-142967)
Jeong, YunWon [Mon, 26 Jan 2026 16:40:56 +0000 (01:40 +0900)] 
gh-142966: Make ctypes.POINTER.set_type also reset format (GH-142967)

Make the deprecated set_type method resets the format, using the
same code as in type initialization.

Implementation note: this was done in PyCPointerType_init
after calling PyCPointerType_SetProto, but was forgotten
after in PyCPointerType_set_type_impl's call to
PyCPointerType_SetProto.
With this change, setting the format is conceptually part of
setting proto (i.e. the pointed-to type).

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2 months agogh-101888: Add function.__builtins__ to ref documentation (#144174)
Victor Stinner [Mon, 26 Jan 2026 16:15:47 +0000 (17:15 +0100)] 
gh-101888: Add function.__builtins__ to ref documentation (#144174)

2 months agogh-142119: Clarify context manager protocol documentation on `ContextVar.set` and...
Bartosz Sławecki [Mon, 26 Jan 2026 15:50:27 +0000 (16:50 +0100)] 
gh-142119: Clarify context manager protocol documentation on `ContextVar.set` and `Token` (GH-143694)

2 months agogh-140557: Force alignment of empty `bytearray` and `array.array` buffers (GH-140559)
Jake Lishman [Mon, 26 Jan 2026 15:45:17 +0000 (15:45 +0000)] 
gh-140557: Force alignment of empty `bytearray` and `array.array` buffers (GH-140559)

This ensures the buffers used by the empty `bytearray` and `array.array`
are aligned the same as a pointer returned by the allocator.  This is a
more convenient default for interop with other languages that have
stricter requirements of type-safe buffers (e.g. Rust's `&[T]` type)
even when empty.

2 months agogh-144212: Add `image/jxl` to `mimetypes` (GH-144213)
FooIbar [Mon, 26 Jan 2026 14:26:55 +0000 (22:26 +0800)] 
gh-144212: Add `image/jxl` to `mimetypes` (GH-144213)

2 months agogh-143928: Remove outdated comparison between pickle and marshal regarding recursion...
Yashraj [Mon, 26 Jan 2026 13:38:23 +0000 (19:08 +0530)] 
gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (#144025)

2 months agogh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#144108)
VanshAgarwal24036 [Mon, 26 Jan 2026 12:27:42 +0000 (17:57 +0530)] 
gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#144108)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-144128: Fix crash in array.fromlist with reentrant __index__ (#144138)
Priyanshu Singh [Mon, 26 Jan 2026 12:13:49 +0000 (17:43 +0530)] 
gh-144128: Fix crash in array.fromlist with reentrant __index__ (#144138)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-144233: Fix typo in os.eventfd documentation (#144234)
Solomon Ritzow [Mon, 26 Jan 2026 08:07:56 +0000 (00:07 -0800)] 
gh-144233: Fix typo in os.eventfd documentation (#144234)

2 months agogh-144169: Fix three crashes in AST objects with non-str kwargs (#144178)
Jelle Zijlstra [Mon, 26 Jan 2026 01:28:58 +0000 (17:28 -0800)] 
gh-144169: Fix three crashes in AST objects with non-str kwargs (#144178)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-144217: Add dicom support (medical imaging) to mimetypes (GH-144218)
benediktjohannes [Sun, 25 Jan 2026 22:22:43 +0000 (23:22 +0100)] 
gh-144217: Add dicom support (medical imaging) to mimetypes (GH-144218)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 months agogh-143995: Eliminate redundant refcounting in the JIT from LOAD_ATTR_MODULE (GH-143996)
AN Long [Sun, 25 Jan 2026 18:24:44 +0000 (03:24 +0900)] 
gh-143995: Eliminate redundant refcounting in the JIT from LOAD_ATTR_MODULE (GH-143996)

2 months agogh-143504: Expose CELL status of a symbol in symtable (#143549)
Yashraj [Sun, 25 Jan 2026 15:21:27 +0000 (20:51 +0530)] 
gh-143504: Expose CELL status of a symbol in symtable (#143549)

2 months agogh-144140: Optimize len for string constants in optimizer (GH-144142)
Yi Yang [Sat, 24 Jan 2026 16:09:29 +0000 (00:09 +0800)] 
gh-144140: Optimize len for string constants in optimizer (GH-144142)

2 months agoRemove stray typedef in _tkinter.c (GH-142924)
mdehoon [Sat, 24 Jan 2026 15:20:14 +0000 (00:20 +0900)] 
Remove stray typedef in _tkinter.c (GH-142924)

Co-authored-by: Michiel de Hoon <mdehoon@tkx288.genome.gsc.riken.jp>
2 months agogh-142037: Improve error messages for printf-style formatting (GH-142081)
Serhiy Storchaka [Sat, 24 Jan 2026 11:13:50 +0000 (13:13 +0200)] 
gh-142037: Improve error messages for printf-style formatting (GH-142081)

This affects string formatting as well as bytes and bytearray formatting.

* For errors in the format string, always include the position of the
  start of the format unit.
* For errors related to the formatted arguments, always include the number
  or the name of the formatted argument.
* Suggest more probable causes of errors in the format string (stray %,
  unsupported format, unexpected character).
* Provide more information when the number of arguments does not match
  the number of format units.
* Raise more specific errors when access of arguments by name is mixed with
  sequential access and when * is used with a mapping.
* Add tests for some uncovered cases.

2 months agogh-142913: Add generated test files to gitattributes (GH-144209)
Marc Mueller [Sat, 24 Jan 2026 10:19:21 +0000 (11:19 +0100)] 
gh-142913: Add generated test files to gitattributes (GH-144209)

2 months agogh-130415: Narrow types to constants in branches involving specialized comparisons...
reiden [Sat, 24 Jan 2026 10:02:08 +0000 (18:02 +0800)] 
gh-130415: Narrow types to constants in branches involving specialized comparisons with a constant (GH-144150)

2 months agogh-144068: fix JIT tracer memory leak when daemon thread exits (GH-144077)
Hai Zhu [Sat, 24 Jan 2026 09:43:01 +0000 (17:43 +0800)] 
gh-144068: fix JIT tracer memory leak when daemon thread exits (GH-144077)

2 months agoMisc: remove duplicate `instr_frame` assignment in `_PyJit_TryInitializeTracing`...
Yongtao Huang [Sat, 24 Jan 2026 09:37:45 +0000 (17:37 +0800)] 
Misc: remove duplicate `instr_frame` assignment in `_PyJit_TryInitializeTracing` (GH-144155)

Remove duplicate instr_frame assignment in optimizer

2 months agogh-144016: Fix bad stack assert in the JIT optimizer (GH-144019)
Ken Jin [Sat, 24 Jan 2026 09:36:40 +0000 (17:36 +0800)] 
gh-144016: Fix bad stack assert in the JIT optimizer (GH-144019)

2 months agogh-144007: Eliminate redundant refcounting in the JIT for BINARY_OP (GH-144011)
AN Long [Sat, 24 Jan 2026 09:35:32 +0000 (18:35 +0900)] 
gh-144007: Eliminate redundant refcounting in the JIT for BINARY_OP (GH-144011)

2 months agogh-135142: Initial 3.15 IDLE News3.txt entries (#144200)
Terry Jan Reedy [Sat, 24 Jan 2026 02:34:41 +0000 (21:34 -0500)] 
gh-135142: Initial 3.15 IDLE News3.txt entries (#144200)

2 months agogh-74902: Avoid hitting unicode.org for test data (GH-144195)
Zachary Ware [Fri, 23 Jan 2026 21:07:27 +0000 (15:07 -0600)] 
gh-74902: Avoid hitting unicode.org for test data (GH-144195)

Use our own pythontest.net instead.

2 months agogh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028)
Serhiy Storchaka [Fri, 23 Jan 2026 18:55:48 +0000 (20:55 +0200)] 
gh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028)

It does not support an ASCII string.

Also add more tests.