]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 months agogh-144551: Update OpenSSL version references in Mac/BuildScript/ (GH-144810)
Zachary Ware [Fri, 13 Feb 2026 22:50:15 +0000 (16:50 -0600)] 
gh-144551: Update OpenSSL version references in Mac/BuildScript/ (GH-144810)

3 months agogh-144551: Update Windows builds to use OpenSSL 3.5.5 (GH-144796)
Zachary Ware [Fri, 13 Feb 2026 21:43:05 +0000 (15:43 -0600)] 
gh-144551: Update Windows builds to use OpenSSL 3.5.5 (GH-144796)

3 months agogh-136672: Docs: Move parts of Enum HOWTO to API Docs (GH-139176)
Rafael Weingartner-Ortner [Fri, 13 Feb 2026 19:51:56 +0000 (20:51 +0100)] 
gh-136672: Docs: Move parts of Enum HOWTO to API Docs (GH-139176)

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

3 months agogh-144551: Update CI to use latest OpenSSL versions (GH-144794)
Zachary Ware [Fri, 13 Feb 2026 19:06:07 +0000 (13:06 -0600)] 
gh-144551: Update CI to use latest OpenSSL versions (GH-144794)

Also update _ssl_data_36.h to include an added symbol from 3.6.1.

3 months agogh-144551: Update Windows builds to use OpenSSL 3.0.19 (GH-144793)
Zachary Ware [Fri, 13 Feb 2026 18:48:52 +0000 (12:48 -0600)] 
gh-144551: Update Windows builds to use OpenSSL 3.0.19 (GH-144793)

3 months agogh-144787: [tests] Allow TLS v1.2 to be minimum version (GH-144790)
Colin McAllister [Fri, 13 Feb 2026 17:17:53 +0000 (11:17 -0600)] 
gh-144787: [tests] Allow TLS v1.2 to be minimum version (GH-144790)

Allow TLS v1.2 to be minimum version

Updates test_min_max_version to allow TLS v1.2 to be minimum version if
TLS 1.0 and 1.1 are disabled in OpenSSL.

3 months agogh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (#143892)
Priyanshu Singh [Fri, 13 Feb 2026 15:35:08 +0000 (21:05 +0530)] 
gh-143637: Fix re-entrant mutation of ancillary data in socket.sendmsg() (#143892)

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>
3 months agogh-144706: Warn against using synchronization primitives within signal handlers ...
Robsdedude [Thu, 12 Feb 2026 23:15:23 +0000 (00:15 +0100)] 
gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)

3 months agogh-143916: Allow HTAB in wsgiref header values
Seth Michael Larson [Thu, 12 Feb 2026 20:40:21 +0000 (14:40 -0600)] 
gh-143916: Allow HTAB in wsgiref header values

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-135906: Test more internal headers in test_cext/test_cppext (#144751)
Victor Stinner [Thu, 12 Feb 2026 18:40:42 +0000 (19:40 +0100)] 
gh-135906: Test more internal headers in test_cext/test_cppext (#144751)

3 months agogh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-107281)
James [Thu, 12 Feb 2026 16:50:40 +0000 (11:50 -0500)] 
gh-80667: Fix case-sensitivity of some Unicode literal escapes (GH-107281)

Lookup for CJK ideograms and Hangul syllables is now case-insensitive,
as is the case for other character names.

3 months agogh-121617: Include <string.h> for Py_CLEAR() macro (#144666)
Victor Stinner [Thu, 12 Feb 2026 16:03:55 +0000 (17:03 +0100)] 
gh-121617: Include <string.h> for Py_CLEAR() macro (#144666)

Python.h now also includes <string.h> in the limited C API version 3.11
and newer to fix the Py_CLEAR() macro which uses memcpy().

Add a Py_CLEAR() test in test_cext.

Modify also _Py_TYPEOF to use C23 typeof() if available.

3 months agogh-138744: Upgrade Windows to 2025 in GitHub Actions (#144682)
Victor Stinner [Thu, 12 Feb 2026 15:19:50 +0000 (16:19 +0100)] 
gh-138744: Upgrade Windows to 2025 in GitHub Actions (#144682)

Replace windows-2022 with windows-2025.

3 months agogh-144285: Improve `AttributeError` attribute suggestions (#144299)
Bartosz Sławecki [Thu, 12 Feb 2026 14:12:49 +0000 (15:12 +0100)] 
gh-144285: Improve `AttributeError` attribute suggestions (#144299)

3 months agogh-142349: Fix refcount corruption in lazy import specialization (#144733)
Pablo Galindo Salgado [Thu, 12 Feb 2026 11:45:28 +0000 (11:45 +0000)] 
gh-142349: Fix refcount corruption in lazy import specialization (#144733)

Remove spurious Py_DECREF on borrowed ref in LOAD_GLOBAL specialization

_PyDict_LookupIndexAndValue() returns a borrowed reference via
_Py_dict_lookup(), but specialize_load_global_lock_held() called
Py_DECREF(value) on it when bailing out for lazy imports. Each time
the adaptive counter fired while a lazy import was still in globals,
this stole one reference from the dict's object. With 8+ threads
racing through LOAD_GLOBAL during concurrent lazy import resolution,
enough triggers accumulated to drive the refcount to zero while the
dict and other threads still referenced the object, causing
use-after-free.

3 months agogh-57095: Add note about input splitting in `datetime.*.strptime` (GH-131049)
Stan Ulbrych [Thu, 12 Feb 2026 10:35:42 +0000 (10:35 +0000)] 
gh-57095: Add note about input splitting in `datetime.*.strptime` (GH-131049)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 months agoAdd missing step to `Modules/expat/refresh.sh` instructions (GH-144719)
Stan Ulbrych [Thu, 12 Feb 2026 08:55:26 +0000 (08:55 +0000)] 
Add missing step to `Modules/expat/refresh.sh` instructions (GH-144719)

3 months agogh-142349: Fix build errors from PEP 810 (#144726)
Pablo Galindo Salgado [Thu, 12 Feb 2026 08:18:36 +0000 (08:18 +0000)] 
gh-142349: Fix build errors from PEP 810 (#144726)

3 months agogh-106318: Fix incorrectly rendered code block in `str.isalnum()` docs (GH-144718)
Adorilson Bezerra [Thu, 12 Feb 2026 07:40:17 +0000 (07:40 +0000)] 
gh-106318: Fix incorrectly rendered code block in `str.isalnum()` docs (GH-144718)

3 months agogh-142349: Implement PEP 810 - Explicit lazy imports (#142351)
Pablo Galindo Salgado [Thu, 12 Feb 2026 00:15:33 +0000 (00:15 +0000)] 
gh-142349: Implement PEP 810 - Explicit lazy imports (#142351)

Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
3 months agogh-144675: update to WASI SDK 30 (#144676)
Roman Volosatovs [Thu, 12 Feb 2026 00:12:08 +0000 (01:12 +0100)] 
gh-144675: update to WASI SDK 30 (#144676)

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 months agogh-84424: Use numeric_changed for UCD.numeric (GH-19457)
William Meehan [Wed, 11 Feb 2026 20:58:24 +0000 (15:58 -0500)] 
gh-84424: Use numeric_changed for UCD.numeric (GH-19457)

This was causing ucd_3_2_0.numeric() to pick up only decimal
changes between Unicode 3.2.0 and the current version.

3 months agogh-141563: Enable test_cppext internal C API tests on macOS (#144711)
Victor Stinner [Wed, 11 Feb 2026 17:38:23 +0000 (18:38 +0100)] 
gh-141563: Enable test_cppext internal C API tests on macOS (#144711)

Build the C API in C++11 mode on macOS.

3 months agoFix typos and grammar errors across documentation (#144709)
Ronald Eddy Jr [Wed, 11 Feb 2026 16:35:25 +0000 (11:35 -0500)] 
Fix typos and grammar errors across documentation (#144709)

3 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Wed, 11 Feb 2026 15:34:44 +0000 (17:34 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

3 months agoPost 3.15.0a6
Hugo van Kemenade [Wed, 11 Feb 2026 15:33:36 +0000 (17:33 +0200)] 
Post 3.15.0a6

3 months agogh-143300: implement `PyUnstable_SetImmortal` for marking objects as immortal (#144543)
Kumar Aditya [Wed, 11 Feb 2026 15:29:31 +0000 (20:59 +0530)] 
gh-143300: implement `PyUnstable_SetImmortal` for marking objects as immortal (#144543)

3 months agogh-144639: Ruff: target Python 3.14 syntax in `Lib/test` (#144656)
Hugo van Kemenade [Wed, 11 Feb 2026 14:12:31 +0000 (16:12 +0200)] 
gh-144639: Ruff: target Python 3.14 syntax in `Lib/test` (#144656)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 months agogh-142518: Document thread-safety guarantees of dict operations (#144184)
Lysandros Nikolaou [Wed, 11 Feb 2026 13:33:00 +0000 (14:33 +0100)] 
gh-142518: Document thread-safety guarantees of dict operations (#144184)

* Address feedback; move thread safety section below see-also
* Address feedback - don't mention equality comparison only
* Change admonition to rubric; cross-reference glossary

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 months agoDocs: remove links of modules to themselves (#144695)
Ned Batchelder [Wed, 11 Feb 2026 12:56:36 +0000 (07:56 -0500)] 
Docs: remove links of modules to themselves (#144695)

3 months agogh-142518: Define lock-free and per-object lock (#144548)
Lysandros Nikolaou [Wed, 11 Feb 2026 12:55:36 +0000 (13:55 +0100)] 
gh-142518: Define lock-free and per-object lock (#144548)

- Add definitions of lock-free and per-object lock to the glossary
- Cross-reference these from list thread safety notes
- Change admonition to rubric

3 months agogh-144321: Fix named tuple bug when input is a non-sequence iterable (#144600)
bkap123 [Wed, 11 Feb 2026 12:44:22 +0000 (07:44 -0500)] 
gh-144321: Fix named tuple bug when input is a non-sequence iterable (#144600)

3 months agoPython 3.15.0a6 v3.15.0a6
Hugo van Kemenade [Wed, 11 Feb 2026 12:22:36 +0000 (14:22 +0200)] 
Python 3.15.0a6

3 months agogh-106318: Improve str.rstrip() method doc (#143893)
Adorilson Bezerra [Wed, 11 Feb 2026 08:41:37 +0000 (08:41 +0000)] 
gh-106318: Improve str.rstrip() method doc (#143893)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
3 months agogh-140421: Disable perf trampoline on older macOS (#144647)
Joshua Root [Wed, 11 Feb 2026 04:27:16 +0000 (15:27 +1100)] 
gh-140421: Disable perf trampoline on older macOS (#144647)

Trampoline requires clock_gettime() which was added in macOS 10.12.

3 months agogh-138122: Add sampling profiler visualisation to docs (#142772)
László Kiss Kollár [Tue, 10 Feb 2026 23:09:07 +0000 (23:09 +0000)] 
gh-138122: Add sampling profiler visualisation to docs (#142772)

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
3 months agodocs: profiling.sampling: Fix sampling-rate default value description typo (#144686)
Dov Murik [Tue, 10 Feb 2026 21:55:40 +0000 (16:55 -0500)] 
docs: profiling.sampling: Fix sampling-rate default value description typo (#144686)

3 months agogh-141563: Fix test_cppext on macOS (#144685)
Victor Stinner [Tue, 10 Feb 2026 19:31:12 +0000 (20:31 +0100)] 
gh-141563: Fix test_cppext on macOS (#144685)

Don't test internal header files including mimalloc on macOS since
mimalloc emits compiler warnings:

  In file included from extension.cpp:21:
  In file included from Include/internal/pycore_backoff.h:15:
  In file included from Include/internal/pycore_interp_structs.h:15:
  In file included from Include/internal/pycore_tstate.h:14:
  In file included from Include/internal/pycore_mimalloc.h:43:
  Include/internal/mimalloc/mimalloc.h:464:85: error: defaulted
  function definitions are a C++11 extension
  [-Werror,-Wc++11-extensions]
    mi_stl_allocator() mi_attr_noexcept = default;
                                                                                      ^
  Include/internal/mimalloc/mimalloc.h:465:85: error: defaulted
  function definitions are a C++11 extension
  [-Werror,-Wc++11-extensions]
    mi_stl_allocator(const mi_stl_allocator&) mi_attr_noexcept = default;

Log also CXX and CXXFLAGS env vars in test_cppext. Log also CPPFLAGS
in test_cext.

3 months agogh-141563: Fix test_cext on Windows (#144677)
Victor Stinner [Tue, 10 Feb 2026 17:27:44 +0000 (18:27 +0100)] 
gh-141563: Fix test_cext on Windows (#144677)

The 'module' argument is now always needed to call the test_datetime
method.

3 months agogh-133879: Copyedit "What's new in Python 3.15" (#144661)
Hugo van Kemenade [Tue, 10 Feb 2026 16:49:20 +0000 (18:49 +0200)] 
gh-133879: Copyedit "What's new in Python 3.15" (#144661)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
3 months agogh-141563: Don't test datetime.h with the limited C API (#144673)
Victor Stinner [Tue, 10 Feb 2026 15:45:24 +0000 (16:45 +0100)] 
gh-141563: Don't test datetime.h with the limited C API (#144673)

Fix test_cext and test_cppext.

3 months agogh-141563: Add missing cast to _PyDateTime_IMPORT() (#144667)
Victor Stinner [Tue, 10 Feb 2026 14:47:12 +0000 (15:47 +0100)] 
gh-141563: Add missing cast to _PyDateTime_IMPORT() (#144667)

Fix compilation on C++.

Add test on PyDateTime_IMPORT in test_cext and test_cppext.

3 months agogh-144629: Add test for the PyFunction_GetAnnotations() function (#144630)
Nybblista [Tue, 10 Feb 2026 14:38:24 +0000 (17:38 +0300)] 
gh-144629: Add test for the PyFunction_GetAnnotations() function (#144630)

3 months agogh-134584: Optimize `_BINARY_OP_SUBSCR_LIST_SLICE` (GH-144659)
Sacul [Tue, 10 Feb 2026 14:33:32 +0000 (22:33 +0800)] 
gh-134584: Optimize `_BINARY_OP_SUBSCR_LIST_SLICE` (GH-144659)

3 months agoClarify the docs for `args` in asyncio callbacks (#143873)
Aarni Koskela [Tue, 10 Feb 2026 13:10:01 +0000 (15:10 +0200)] 
Clarify the docs for `args` in asyncio callbacks (#143873)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
3 months agogh-143650: Fix importlib race condition on import failure (GH-143651)
Gregory P. Smith [Tue, 10 Feb 2026 13:08:33 +0000 (05:08 -0800)] 
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>
3 months agogh-144652: Support Windows exit status in support get_signal_name() (#144653)
Victor Stinner [Tue, 10 Feb 2026 11:15:14 +0000 (12:15 +0100)] 
gh-144652: Support Windows exit status in support get_signal_name() (#144653)

Format Windows exit status as hexadecimal.

3 months agogh-144490: Fix mimalloc debug build for C++ (#144620)
Alper [Tue, 10 Feb 2026 10:56:52 +0000 (02:56 -0800)] 
gh-144490: Fix mimalloc debug build for C++ (#144620)

3 months agogh-72798: Add mapping example to str.translate documentation (#144454)
kovan [Tue, 10 Feb 2026 10:13:40 +0000 (11:13 +0100)] 
gh-72798: Add mapping example to str.translate documentation (#144454)

Add an example showing how to use str.translate() with a dictionary
mapping directly, demonstrating character replacement and deletion.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
3 months agogh-144563: Fix remote debugging with duplicate libpython mappings from ctypes (#144595)
Pablo Galindo Salgado [Tue, 10 Feb 2026 10:04:50 +0000 (10:04 +0000)] 
gh-144563: Fix remote debugging with duplicate libpython mappings from ctypes (#144595)

When _ctypes is imported, it may call dlopen on the libpython shared
library, causing the dynamic linker to load a second mapping of the
library into the process address space. The remote debugging code
iterates memory regions from low addresses upward and returns the first
mapping whose filename matches libpython. After _ctypes is imported, it
finds the dlopen'd copy first, but that copy's PyRuntime section was
never initialized, so reading debug offsets from it fails.

Fix this by validating each candidate PyRuntime address before accepting
it. The validation reads the first 8 bytes and checks for the "xdebugpy"
cookie that is only present in an initialized PyRuntime. Uninitialized
duplicate mappings will fail this check and be skipped, allowing the
search to continue to the real, initialized PyRuntime.

3 months agogh-144648: Improve libproc usage in _remote_debugging (#144649)
Joshua Root [Tue, 10 Feb 2026 08:29:55 +0000 (19:29 +1100)] 
gh-144648: Improve libproc usage in _remote_debugging (#144649)

3 months agogh-144551: Update macOS installer to use OpenSSL 3.5.5 (#144645)
Ned Deily [Tue, 10 Feb 2026 06:45:55 +0000 (01:45 -0500)] 
gh-144551: Update macOS installer to use OpenSSL 3.5.5 (#144645)

3 months agogh-124111: Update macOS installer to use Tcl/Tk 9.0.3 (#144646)
Ned Deily [Tue, 10 Feb 2026 06:45:06 +0000 (01:45 -0500)] 
gh-124111: Update macOS installer to use Tcl/Tk 9.0.3 (#144646)

3 months agoDisable pip version check when upgrading certifi (#144632)
Hugo van Kemenade [Tue, 10 Feb 2026 03:04:52 +0000 (05:04 +0200)] 
Disable pip version check when upgrading certifi (#144632)

3 months agogh-144278: Enable overriding sys.implementation's name and cache_tag when building...
Steve Dower [Tue, 10 Feb 2026 00:01:17 +0000 (00:01 +0000)] 
gh-144278: Enable overriding sys.implementation's name and cache_tag when building sysmodule.c (GH-144293)

Changing the values requires forking and patching, which is intentional. Simply rebuilding from source does not change the implementation enough to justify changing these values - they would still be `cpython` and compatible with existing `.pyc` files. But people who maintain forks are better served by being able to easily override these values in a place that can be forward-ported reliably.

3 months agoGH-144552: Clean up `tail-call.yml ` CI (#144553)
Savannah Ostrowski [Mon, 9 Feb 2026 22:52:45 +0000 (14:52 -0800)] 
GH-144552: Clean up `tail-call.yml ` CI (#144553)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 months agogh-144492: Fix `process_changed_files` outputs for `reusable-{macos, wasi}.yml` ...
Stan Ulbrych [Mon, 9 Feb 2026 17:30:19 +0000 (17:30 +0000)] 
gh-144492: Fix `process_changed_files` outputs for `reusable-{macos, wasi}.yml` (#144518)

Fix `process_changed_files` double-processing reusable-{macos, wasi] ending up with incorrect outputs

3 months agogh-144490: Fix test_cppext on Windows (#144628)
Victor Stinner [Mon, 9 Feb 2026 16:17:00 +0000 (17:17 +0100)] 
gh-144490: Fix test_cppext on Windows (#144628)

Don't include pycore_backoff.h and pycore_cell.h on Windows, since
they emit C++ compiler warnings.

3 months agogh-144601: Avoid sharing exception objects raised in a `PyInit` function across multi...
Peter Bierma [Mon, 9 Feb 2026 15:57:03 +0000 (10:57 -0500)] 
gh-144601: Avoid sharing exception objects raised in a `PyInit` function across multiple interpreters (GH-144602)

3 months agogh-134179: Use sys._clear_internal_caches() at test_cmd_line (#134180)
alexey semenyuk [Mon, 9 Feb 2026 14:40:17 +0000 (19:40 +0500)] 
gh-134179: Use sys._clear_internal_caches() at test_cmd_line (#134180)

Use sys._clear_internal_caches() instead of deprecated sys._clear_type_cache() at test_cmd_line.

3 months agogh-132604: Deprecate inherited runtime checkability of protocols (GH-143806)
Bartosz Sławecki [Mon, 9 Feb 2026 14:13:47 +0000 (15:13 +0100)] 
gh-132604: Deprecate inherited runtime checkability of protocols (GH-143806)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 months agogh-143543: Fix re-entrant use-after-free in itertools.groupby (GH-143738)
VanshAgarwal24036 [Mon, 9 Feb 2026 14:12:25 +0000 (19:42 +0530)] 
gh-143543: Fix re-entrant use-after-free in itertools.groupby (GH-143738)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 months agogh-144623: Fix missing output uops in optimizer debug output (GH-144617)
Hai Zhu [Mon, 9 Feb 2026 13:23:02 +0000 (21:23 +0800)] 
gh-144623: Fix missing output uops in optimizer debug output (GH-144617)

3 months agogh-141563: make `PyDateTime_IMPORT` thread-safe (#144210)
Kumar Aditya [Mon, 9 Feb 2026 13:20:35 +0000 (18:50 +0530)] 
gh-141563: make `PyDateTime_IMPORT` thread-safe (#144210)

3 months agogh-140715: Add `%F` format code support to `strptime()` (GH-140647)
Jason Yalim, PhD [Mon, 9 Feb 2026 12:24:15 +0000 (05:24 -0700)] 
gh-140715: Add `%F` format code support to `strptime()` (GH-140647)

Also: add tests for the `%T` format code

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
3 months agogh-119740: Remove obsoleted removal announce for trunc delegation (GH-144622)
Sergey B Kirpichev [Mon, 9 Feb 2026 11:41:05 +0000 (14:41 +0300)] 
gh-119740: Remove obsoleted removal announce for trunc delegation (GH-144622)

This was done in GH-119743 (3.14).

3 months agogh-140550: allow slots that repeat information from PyModuleDef (GH-144340)
Petr Viktorin [Mon, 9 Feb 2026 10:35:43 +0000 (11:35 +0100)] 
gh-140550: allow slots that repeat information from PyModuleDef (GH-144340)

When integrating slots-based module creation is with the inittab,
which currently requires PyModuleDef, it would be convenient to
reuse the the same slots array for the MethodDef.

Allow slots that match what's already present in the PyModuleDef.

3 months agogh-106318: Add examples for str.partition() method (#142823)
Adorilson Bezerra [Sun, 8 Feb 2026 22:10:43 +0000 (22:10 +0000)] 
gh-106318: Add examples for str.partition() method (#142823)

3 months agogh-106318: Add example for str.isalnum() (#137550)
Adorilson Bezerra [Sun, 8 Feb 2026 22:08:18 +0000 (22:08 +0000)] 
gh-106318: Add example for str.isalnum() (#137550)

3 months agoGH-131798: Optimize `_GUARD_TOS_SLICE` (GH-144470)
Sacul [Sun, 8 Feb 2026 18:08:26 +0000 (02:08 +0800)] 
GH-131798: Optimize `_GUARD_TOS_SLICE` (GH-144470)

3 months agoFor `enum.bin`, update versionadded directive from 3.10 to 3.11 (#144574)
Guo Ci [Sun, 8 Feb 2026 07:35:02 +0000 (02:35 -0500)] 
For `enum.bin`, update versionadded directive from 3.10 to 3.11 (#144574)

3 months agoBump pre-commit hooks (#144576)
Savannah Ostrowski [Sat, 7 Feb 2026 23:14:18 +0000 (15:14 -0800)] 
Bump pre-commit hooks (#144576)

3 months agogh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (#144568)
Bénédikt Tran [Sat, 7 Feb 2026 22:36:42 +0000 (23:36 +0100)] 
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (#144568)

3 months agogh-84116: Add missing backslash to `_SubParsersAction.add_parser` signature (#144572)
Guo Ci [Sat, 7 Feb 2026 18:02:01 +0000 (13:02 -0500)] 
gh-84116: Add missing backslash to `_SubParsersAction.add_parser` signature (#144572)

3 months agogh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (#144449)
kovan [Sat, 7 Feb 2026 12:22:51 +0000 (13:22 +0100)] 
gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (#144449)

3 months agogh-140490: Document changes for `PurePath.stem` in Python 3.14 (#144450)
kovan [Sat, 7 Feb 2026 12:19:20 +0000 (13:19 +0100)] 
gh-140490: Document changes for `PurePath.stem` in Python 3.14 (#144450)

3 months agogh-144538: Upgrade bundled pip to 26.0.1 (gh-144556)
Damian Shaw [Sat, 7 Feb 2026 10:59:54 +0000 (05:59 -0500)] 
gh-144538: Upgrade bundled pip to 26.0.1 (gh-144556)

Upgrade bundled pip to 26.0.1

3 months agogh-144490: Fix C++ compatibility in pycore_cell.h (GH-144482)
Alper [Sat, 7 Feb 2026 03:11:58 +0000 (19:11 -0800)] 
gh-144490: Fix C++ compatibility in pycore_cell.h (GH-144482)

3 months agogh-84116: Docs: Document help and aliases for argparse.add_parser() (#140574)
Krishna-web-hub [Fri, 6 Feb 2026 21:26:44 +0000 (02:56 +0530)] 
gh-84116: Docs: Document help and aliases for argparse.add_parser() (#140574)

* gh-140281: Doc: Update free-threading how-to

* gh-140281: Doc: Update free-threading how-to

* Fix trailing whitespace

* doc fixing of the cpython fixes#84116

* Docs: Document help and aliases for argparse.add_parser() (gh-84116)

* Docs: Document help and aliases for argparse.add_parser() (gh-84116)

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing whitespace

* Fix trailing errors

* Fix trailing errors and spaces

* Fix docutils formatting, NEWS ref, and trailing whitespace

* Docs: Update argparse.rst and add NEWS entry

* Delete Doc/howto/free-threading-python.rst

* Delete Misc/NEWS.d/next/Documentation/2025-10-25-00-49-43.gh-issue-140281.tuMQUe.rst

* adding the depreceated tag

* The error indexing was fixed

* Fix trailing whitespace

* Restore missing free-threading documentation

* fixing some minor error

* fixing some minor error part 2

* fixing some minor error part 3

* Fix NEWS entry format

* Final cleanup of NEWS entry format 2

* changes in the argparse.rst

* Remove unnecessary NEWS entry

* Fixing the issue as requested

* Added the Changes done before.

* done the changes

* done the changes#1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Done the changes

* Done the new changes

* The versionadded is rectified

* Update Doc/library/argparse.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* Docs editing

* Docs fixing whitespace

* Docs rectifiying

* little bit rectification

* Indentation rectification

* Indentation rectification 1

* Apply suggestion from @picnixz

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* deprecated rectification

* Remove mistakenly added NEWS entry

* Update Doc/library/argparse.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* changes #1

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Update Doc/library/argparse.rst 2

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* removed useless thing

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* changed according to the request

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Updated the test part

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
3 months agogh-144549: Fix tail calling interpreter on Windows for FT (GH-144550)
Ken Jin [Fri, 6 Feb 2026 19:20:28 +0000 (03:20 +0800)] 
gh-144549: Fix tail calling interpreter on Windows for FT (GH-144550)

3 months agogh-143658: Use `str.lower` and `replace` to further improve performance of `importlib...
Hugo van Kemenade [Fri, 6 Feb 2026 17:38:58 +0000 (19:38 +0200)] 
gh-143658: Use `str.lower` and `replace` to further improve performance of `importlib.metadata.Prepared.normalized` (#144083)

Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
3 months agogh-132132: Upgrade to VS 2026 on Windows tailcall CI (GH-144544)
Ken Jin [Fri, 6 Feb 2026 16:36:51 +0000 (00:36 +0800)] 
gh-132132: Upgrade to VS 2026 on Windows tailcall CI (GH-144544)

Upgrade to VS 2026 on Windows tailcall CI

3 months agogh-140715: Update `datetime.*.str*time` format code tables (GH-140716)
Stan Ulbrych [Fri, 6 Feb 2026 16:08:26 +0000 (16:08 +0000)] 
gh-140715: Update `datetime.*.str*time` format code tables (GH-140716)

3 months agogh-144490: Fix test_cppext: test the internal C API (#144536)
Victor Stinner [Fri, 6 Feb 2026 15:42:42 +0000 (16:42 +0100)] 
gh-144490: Fix test_cppext: test the internal C API (#144536)

Add missing TEST_INTERNAL_C_API env var.

3 months agogh-144513: Skip critical section locking during stop-the-world (gh-144524)
Sam Gross [Fri, 6 Feb 2026 15:14:08 +0000 (10:14 -0500)] 
gh-144513: Skip critical section locking during stop-the-world (gh-144524)

When the interpreter is in a stop-the-world pause, critical sections
don't need to acquire locks since no other threads can be running.
This avoids a potential deadlock where lock fairness hands off ownership
to a thread that has already suspended for stop-the-world.

3 months agogh-144446: Fix some frame object thread-safety issues (gh-144479)
Sam Gross [Fri, 6 Feb 2026 14:43:36 +0000 (09:43 -0500)] 
gh-144446: Fix some frame object thread-safety issues (gh-144479)

Fix thread-safety issues when accessing frame attributes while another
thread is executing the frame:

- Add critical section to frame_repr() to prevent races when accessing
  the frame's code object and line number

- Add _Py_NO_SANITIZE_THREAD to PyUnstable_InterpreterFrame_GetLasti()
  to allow intentional racy reads of instr_ptr.

- Fix take_ownership() to not write to the original frame's f_executable

3 months agogh-101178: Add Ascii85, Base85, and Z85 support to binascii (GH-102753)
kangtastic [Fri, 6 Feb 2026 14:43:16 +0000 (06:43 -0800)] 
gh-101178: Add Ascii85, Base85, and Z85 support to binascii (GH-102753)

Add Ascii85, Base85, and Z85 encoders and decoders to binascii,
replacing the existing pure Python implementations in base64.

This makes the codecs two orders of magnitude faster and consume
two orders of magnitude less memory.

Note that attempting to decode Ascii85 or Base85 data of length 1 mod 5
(after accounting for Ascii85 quirks) now produces an error, as no
encoder would emit such data. This should be the only significant
externally visible difference compared to the old implementation.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 months agogh-139103: Improve namedtuple scaling in free-threaded build (gh-144332)
Sam Gross [Fri, 6 Feb 2026 14:43:05 +0000 (09:43 -0500)] 
gh-139103: Improve namedtuple scaling in free-threaded build (gh-144332)

Add `_Py_type_getattro_stackref`, a variant of type attribute lookup
that returns `_PyStackRef` instead of `PyObject*`. This allows returning
deferred references in the free-threaded build, reducing reference count
contention when accessing type attributes.

This significantly improves scaling of namedtuple instantiation across
multiple threads.

* Add blurb

* Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef

* Apply suggestion from @vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>
* Apply suggestion from @vstinner

Co-authored-by: Victor Stinner <vstinner@python.org>
* format

* Update Include/internal/pycore_function.h

Co-authored-by: Victor Stinner <vstinner@python.org>
---------

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agoDocs: module pages should not link to themselves (#144505)
Ned Batchelder [Fri, 6 Feb 2026 11:48:27 +0000 (06:48 -0500)] 
Docs: module pages should not link to themselves (#144505)

* Docs: module pages should not link to themselves

* fix header punctuation

3 months agogh-141004: Reorganize and reword the 'Useful macros' section (GH-144471)
Petr Viktorin [Fri, 6 Feb 2026 10:55:11 +0000 (11:55 +0100)] 
gh-141004: Reorganize and reword the 'Useful macros' section (GH-144471)

- Group the macros
- Roughly order them to put the most important ones first
- Add expansions where it makes sense; especially if there's
  an equivalent in modern C or a common compiler

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 months agoDocs: Pull expat license from `Modules/expat/` in `license.rst` (#144488)
Stan Ulbrych [Fri, 6 Feb 2026 08:54:34 +0000 (08:54 +0000)] 
Docs: Pull expat license from `Modules/expat/` in `license.rst` (#144488)

Use license directly from Modules/expat/COPYING.

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-144493: Improve error message in _overlapped.BindLocal() (#144495)
David Lechner [Fri, 6 Feb 2026 08:51:19 +0000 (02:51 -0600)] 
gh-144493: Improve error message in _overlapped.BindLocal() (#144495)

Replace a confusing error message with one that actually explains what the error is in `_overlapped.BindLocal()`.

Fixes: https://github.com/python/cpython/issues/144493
3 months agogh-74453: Deprecate os.path.commonprefix (#144436)
Seth Michael Larson [Thu, 5 Feb 2026 20:37:05 +0000 (14:37 -0600)] 
gh-74453: Deprecate os.path.commonprefix (#144436)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 months agogh-77188: Add support for pickling private methods and nested classes (GH-21480)
Zackery Spytz [Thu, 5 Feb 2026 19:50:51 +0000 (11:50 -0800)] 
gh-77188: Add support for pickling private methods and nested classes (GH-21480)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 months agogh-144001: Support ignoring the invalid pad character in Base64 decoding (GH-144306)
Serhiy Storchaka [Thu, 5 Feb 2026 19:14:49 +0000 (21:14 +0200)] 
gh-144001: Support ignoring the invalid pad character in Base64 decoding (GH-144306)

3 months agogh-74955: Document that __all__ must contain strings in normalization form NFKC ...
Serhiy Storchaka [Thu, 5 Feb 2026 18:06:33 +0000 (20:06 +0200)] 
gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504)

3 months agoMore realistic lru_cache example (gh-144517)
Raymond Hettinger [Thu, 5 Feb 2026 18:04:12 +0000 (12:04 -0600)] 
More realistic lru_cache example (gh-144517)

3 months agogh-142407: Clarify copy performance on Windows in shutil docs (GH-142408)
NewUserHa [Thu, 5 Feb 2026 17:45:14 +0000 (01:45 +0800)] 
gh-142407: Clarify copy performance on Windows in shutil docs (GH-142408)

3 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

3 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.