]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks agogh-143641: Make `ready_to_import` always remove tempdir from `sys.path` (#143642)
Jeong, YunWon [Sat, 10 Jan 2026 09:51:42 +0000 (18:51 +0900)] 
gh-143641: Make `ready_to_import` always remove tempdir from `sys.path` (#143642)

Make ready_to_import always remove tempdir from sys.path

2 weeks agogh-143586: Add Counter comparison tests to enforce missing element semantics (gh...
Heikki Toivonen [Sat, 10 Jan 2026 06:17:57 +0000 (22:17 -0800)] 
gh-143586: Add Counter comparison tests to enforce missing element semantics (gh-143587)

2 weeks agogh-142764: Restore REPLACE_OPCODE_IF_EVALUATES_PURE optimization for some ops (GH...
Ken Jin [Fri, 9 Jan 2026 23:18:22 +0000 (07:18 +0800)] 
gh-142764: Restore REPLACE_OPCODE_IF_EVALUATES_PURE optimization for some ops (GH-143335)

2 weeks agogh-143421: Allocate all JIT state in one go (GH-143626)
Ken Jin [Fri, 9 Jan 2026 19:00:49 +0000 (03:00 +0800)] 
gh-143421: Allocate all JIT state in one go (GH-143626)

2 weeks agogh-141004: Document remaining constants from patchlevel.h (GH-143598)
Petr Viktorin [Fri, 9 Jan 2026 17:40:07 +0000 (18:40 +0100)] 
gh-141004: Document remaining constants from patchlevel.h (GH-143598)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-136438: Make sure `test_interpreters` pass with all optimization levels (GH-136499)
Semyon Moroz [Fri, 9 Jan 2026 17:06:54 +0000 (17:06 +0000)] 
gh-136438: Make sure `test_interpreters` pass with all optimization levels (GH-136499)

2 weeks agogh-143006: Fix and optimize mixed comparison of float and int (GH-143084)
Serhiy Storchaka [Fri, 9 Jan 2026 17:06:45 +0000 (19:06 +0200)] 
gh-143006: Fix and optimize mixed comparison of float and int (GH-143084)

When comparing negative non-integer float and int with the same number
of bits in the integer part, __neg__() in the int subclass returning
not an int caused an assertion error.

Now the integer is no longer negated. Also, reduced the number of
temporary created Python objects.

2 weeks agogh-143421: Lazily allocate tracer code and opt buffers (GH-143597)
Ken Jin [Fri, 9 Jan 2026 16:56:19 +0000 (00:56 +0800)] 
gh-143421: Lazily allocate tracer code and opt buffers (GH-143597)

2 weeks agogh-143460: Skip infinite recusion tests for infinite stack size (#143606)
Jan André Reuter [Fri, 9 Jan 2026 16:11:37 +0000 (17:11 +0100)] 
gh-143460: Skip infinite recusion tests for infinite stack size (#143606)

Avoid tests being killed due to OOM on Linux if a system is configured with
'ulimit -s unlimited' by skipping tests relying on infinite recursion.

While unclear if Python should support 'ulimit -s unlimited', we should at
least try to avoid failing a PGO build running tests due to an unlimited
stack size being set.

Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
2 weeks agogh-106318: Add examples for str.rfind() method (#143582)
Adorilson Bezerra [Fri, 9 Jan 2026 15:24:31 +0000 (15:24 +0000)] 
gh-106318: Add examples for str.rfind() method (#143582)

2 weeks ago gh-106318: Improve str.removeprefix() and str.removesuffix() docs (#143580)
Adorilson Bezerra [Fri, 9 Jan 2026 15:22:50 +0000 (15:22 +0000)] 
 gh-106318: Improve str.removeprefix() and str.removesuffix() docs (#143580)

Add doctest role and 'See also'.

2 weeks agogh-143191: Use _PyOS_MIN_STACK_SIZE in _thread.stack_size() (#143601)
Victor Stinner [Fri, 9 Jan 2026 15:08:40 +0000 (16:08 +0100)] 
gh-143191: Use _PyOS_MIN_STACK_SIZE in _thread.stack_size() (#143601)

The stack size must be at least _PyOS_MIN_STACK_SIZE+SYSTEM_PAGE_SIZE
bytes.

2 weeks agogh-142829: Fix use-after-free in `Context.__eq__` via re-entrant `ContextVar.set...
A.Ibrahim [Fri, 9 Jan 2026 12:27:34 +0000 (13:27 +0100)] 
gh-142829: Fix use-after-free in `Context.__eq__` via re-entrant `ContextVar.set` (#142905)

2 weeks agogh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future ...
AN Long [Fri, 9 Jan 2026 12:18:32 +0000 (21:18 +0900)] 
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (#143288)

2 weeks agogh-143547: Fix PyErr_FormatUnraisable() fallback (#143557)
Victor Stinner [Fri, 9 Jan 2026 12:16:22 +0000 (13:16 +0100)] 
gh-143547: Fix PyErr_FormatUnraisable() fallback (#143557)

Hold a strong reference to 'hook' while calling the default
unraisable took to log hook failure.

Fix test_sys.UnraisableHookTest: use the right decorator function to
disable colors. Previously, tests were always skipped.

2 weeks agogh-143378: Fix use-after-free when BytesIO is concurrently mutated during write opera...
zhong [Fri, 9 Jan 2026 11:50:56 +0000 (03:50 -0800)] 
gh-143378: Fix use-after-free when BytesIO is concurrently mutated during write operations (GH-143408)

PyObject_GetBuffer() can execute user code (e.g. via __buffer__), which may
close or otherwise mutate a BytesIO object while write() or writelines()
is in progress. This could invalidate the internal buffer and lead to a
use-after-free.

Ensure that PyObject_GetBuffer() is called before validation checks.

2 weeks agogh-143429: Use compile-time NaN encoding detection for test_struct (#143432)
Henry Chen [Fri, 9 Jan 2026 10:46:48 +0000 (18:46 +0800)] 
gh-143429: Use compile-time NaN encoding detection for test_struct (#143432)

2 weeks agogh-141004: Improve `make check-c-api-docs` (GH-143564)
Petr Viktorin [Fri, 9 Jan 2026 10:16:50 +0000 (11:16 +0100)] 
gh-141004: Improve `make check-c-api-docs` (GH-143564)

- Gather all documented names into a set in a single pass.
  This makes the check much faster.

- Do not match substrings (e.g. documenting `PyErr_WarnEx`
  doesn't mean that `PyErr_Warn` is documented)

- Consider `PY`-prefixed names (a lot of old macros use this)

2 weeks agoTest: remove unintended unittest.main() in live collector tests (#143590)
Yongtao Huang [Fri, 9 Jan 2026 08:49:54 +0000 (16:49 +0800)] 
Test: remove unintended unittest.main() in live collector tests (#143590)

2 weeks agogh-106318: Add examples for str.replace() method (GH-143581)
Adorilson Bezerra [Fri, 9 Jan 2026 08:01:00 +0000 (08:01 +0000)] 
gh-106318: Add examples for str.replace() method (GH-143581)

2 weeks agoGH-43374: Fix urlretrieve reporthook to report actual bytes read (#142653)
Savannah Ostrowski [Fri, 9 Jan 2026 00:32:05 +0000 (16:32 -0800)] 
GH-43374: Fix urlretrieve reporthook to report actual bytes read (#142653)

2 weeks agoGH-139686: Revert "gh-139686: Make reloading a lazy module no-op (GH-139857)" (#143584)
Brett Cannon [Thu, 8 Jan 2026 22:08:03 +0000 (14:08 -0800)] 
GH-139686: Revert "gh-139686: Make reloading a lazy module no-op (GH-139857)" (#143584)

This reverts commits 57db12514ac686f0a752ec8fe1c08b6daa0c6219 and 0a97941245f1dda6d838f9aaf0512104e5253929.

2 weeks agoAdd Emscripten test skips for recently added tests. (#143551)
Russell Keith-Magee [Thu, 8 Jan 2026 21:47:38 +0000 (05:47 +0800)] 
Add Emscripten test skips for recently added tests. (#143551)

Some recent changes introduced tests that can't run on Emscripten.
This change adds test skips for those tests.

2 weeks agogh-120321: Make gen.gi_frame.clear() thread-safe (gh-143112)
Sam Gross [Thu, 8 Jan 2026 19:45:54 +0000 (14:45 -0500)] 
gh-120321: Make gen.gi_frame.clear() thread-safe (gh-143112)

2 weeks agogh-143421: Move `JitOptContext` from stack allocation to per-thread heap allocation...
Hai Zhu [Thu, 8 Jan 2026 19:38:21 +0000 (03:38 +0800)] 
gh-143421: Move `JitOptContext` from stack allocation to per-thread heap allocation (GH-143536)

* move JitOptContext to _PyThreadStateImpl
* make _PyUOpInstruction buffer a part of _PyThreadStateImpl

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agogh-143445: Optimize deepcopy for 1.04x speedup (#143449)
Heikki Toivonen [Thu, 8 Jan 2026 15:28:02 +0000 (07:28 -0800)] 
gh-143445: Optimize deepcopy for 1.04x speedup (#143449)

Gains according to pyperformance:

```
deepcopy:
Mean +- std dev: 411 us +- 2 us -> 396 us +- 3 us: 1.04x faster
Significant (t=28.94)

deepcopy_reduce:
Mean +- std dev: 4.38 us +- 0.05 us -> 4.23 us +- 0.04 us: 1.04x faster
Significant (t=20.05)
```

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-142908: Don't use `DK_IS_UNICODE` in interpreter (gh-142909)
Sam Gross [Thu, 8 Jan 2026 14:32:20 +0000 (09:32 -0500)] 
gh-142908: Don't use `DK_IS_UNICODE` in interpreter (gh-142909)

`DK_IS_UNICODE()` includes split keys and we don't want to specialize on
those accesses..

2 weeks agogh-142095: Use thread local frame info in `py-bt` and `py-bt-full` when available...
Sam Gross [Thu, 8 Jan 2026 14:18:24 +0000 (09:18 -0500)] 
gh-142095: Use thread local frame info in `py-bt` and `py-bt-full` when available (gh-143371)

In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-143513: Clarify changed argument name of `ResourceReader.is_resource` (GH-143523)
Alex Willmer [Thu, 8 Jan 2026 13:40:17 +0000 (13:40 +0000)] 
gh-143513: Clarify changed argument name of `ResourceReader.is_resource` (GH-143523)

2 weeks agogh-143528: Fix test_time.test_thread_time() (#143558)
Victor Stinner [Thu, 8 Jan 2026 13:05:57 +0000 (14:05 +0100)] 
gh-143528: Fix test_time.test_thread_time() (#143558)

Tolerate 100 ms instead of 20 ms to support slow CIs.

2 weeks agogh-140025: Fix `queue.SimpleQueue.__sizeof__()` to return correct size (#143137)
Aniket [Thu, 8 Jan 2026 12:40:25 +0000 (18:10 +0530)] 
gh-140025: Fix `queue.SimpleQueue.__sizeof__()` to return correct size (#143137)

2 weeks agogh-143553: Add support for parametrized resources in regrtests (GH-143554)
Serhiy Storchaka [Thu, 8 Jan 2026 11:51:38 +0000 (13:51 +0200)] 
gh-143553: Add support for parametrized resources in regrtests (GH-143554)

For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.

2 weeks agogh-143517: Fix an edge case in rewriting stringified starred annotations (#143518)
Bartosz Sławecki [Thu, 8 Jan 2026 03:41:27 +0000 (04:41 +0100)] 
gh-143517: Fix an edge case in rewriting stringified starred annotations (#143518)

2 weeks agogh-143089: Fix ParamSpec default examples to use list instead of tuple (#143179)
VanshAgarwal24036 [Thu, 8 Jan 2026 03:32:44 +0000 (09:02 +0530)] 
gh-143089: Fix ParamSpec default examples to use list instead of tuple (#143179)

2 weeks agogh-129824: Fix data race on `runtime->gilstate.check_enabled` (gh-143530)
Sam Gross [Wed, 7 Jan 2026 22:56:14 +0000 (17:56 -0500)] 
gh-129824: Fix data race on `runtime->gilstate.check_enabled` (gh-143530)

2 weeks agoFix a typo in STORE_SLICE docs (#143500)
Tomas R. [Wed, 7 Jan 2026 22:36:22 +0000 (23:36 +0100)] 
Fix a typo in STORE_SLICE docs (#143500)

2 weeks agogh-143531: Use macro to check if PEP 523 is hooked (#143532)
Dino Viehland [Wed, 7 Jan 2026 21:26:19 +0000 (13:26 -0800)] 
gh-143531: Use macro to check if PEP 523 is hooked (#143532)

Use macro to check if PEP 523 is hooked

2 weeks agoGH-142950: Process format specifiers before colourization in argparse help (#142960)
Savannah Ostrowski [Wed, 7 Jan 2026 17:39:47 +0000 (09:39 -0800)] 
GH-142950: Process format specifiers before colourization in argparse help (#142960)

2 weeks agogh-117657: Remove remaining TSan suppressions (gh-143499)
Sam Gross [Wed, 7 Jan 2026 17:34:05 +0000 (12:34 -0500)] 
gh-117657: Remove remaining TSan suppressions (gh-143499)

2 weeks agogh-106318: Add examples for str.casefold() and str.lower() methods (#142154)
Adorilson Bezerra [Wed, 7 Jan 2026 16:16:25 +0000 (16:16 +0000)] 
gh-106318: Add examples for str.casefold() and str.lower() methods (#142154)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 weeks agogh-141536: Fix a crash when running test_capi *after* test_code in the same process...
T. Wouters [Wed, 7 Jan 2026 15:40:33 +0000 (16:40 +0100)] 
gh-141536: Fix a crash when running test_capi *after* test_code in the same process (#141537)

2 weeks agogh-138568: Make `help` mode in PyREPL not exit on empty line input (#143512)
Łukasz Langa [Wed, 7 Jan 2026 15:30:58 +0000 (16:30 +0100)] 
gh-138568: Make `help` mode in PyREPL not exit on empty line input (#143512)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2 weeks agogh-94172: delete mention of ssl_version from ftplib doc (#143515)
Giampaolo Rodola [Wed, 7 Jan 2026 14:11:50 +0000 (15:11 +0100)] 
gh-94172: delete mention of ssl_version from ftplib doc (#143515)

`FTP_TLS.ssl_version` class attribute was removed in https://github.com/python/cpython/commit/ef0e72b31d2.

2 weeks agogh-141671: PyMODINIT_FUNC: apply `__declspec(dllexport)` on Windows (GH-141672)
Petr Viktorin [Wed, 7 Jan 2026 12:09:48 +0000 (13:09 +0100)] 
gh-141671: PyMODINIT_FUNC: apply `__declspec(dllexport)` on Windows (GH-141672)

2 weeks agogh-75572: Fix test_xpickle and disable it by default (GH-143503)
Serhiy Storchaka [Tue, 6 Jan 2026 23:51:12 +0000 (01:51 +0200)] 
gh-75572: Fix test_xpickle and disable it by default (GH-143503)

2 weeks agogh-106318: Add example for str.index() (#137023)
Adorilson Bezerra [Tue, 6 Jan 2026 21:42:11 +0000 (21:42 +0000)] 
gh-106318: Add example for str.index()  (#137023)

2 weeks agogh-134584: Eliminate redundant refcounting from `TO_BOOL_STR` (GH-143417)
Nadeshiko Manju [Tue, 6 Jan 2026 21:11:53 +0000 (05:11 +0800)] 
gh-134584: Eliminate redundant refcounting from `TO_BOOL_STR` (GH-143417)

Signed-off-by: Manjusaka <me@manjusaka.me>
2 weeks agogh-132070: Fix PyObject_Realloc thread-safety in free threaded Python (gh-143441)
Sam Gross [Tue, 6 Jan 2026 20:55:37 +0000 (15:55 -0500)] 
gh-132070: Fix PyObject_Realloc thread-safety in free threaded Python (gh-143441)

The PyObject header reference count fields must be initialized using
atomic operations because they may be concurrently read by another
thread (e.g., from `_Py_TryIncref`).

2 weeks agogh-142982: Specialize CALL_FUNCTION_EX (GH-143391)
Ken Jin [Tue, 6 Jan 2026 20:34:08 +0000 (04:34 +0800)] 
gh-142982: Specialize CALL_FUNCTION_EX (GH-143391)

2 weeks agogh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage ...
Andrii Hrimov [Tue, 6 Jan 2026 20:18:37 +0000 (21:18 +0100)] 
gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (#143307)

2 weeks agoDoc: Fix missing closing parenthesis in argparse example (#143488)
Xiao Yuan [Tue, 6 Jan 2026 17:53:43 +0000 (19:53 +0200)] 
Doc: Fix missing closing parenthesis in argparse example (#143488)

2 weeks agogh-142863: optimize `list` and `set` calls with generator expressions (#142864)
Kumar Aditya [Tue, 6 Jan 2026 17:53:28 +0000 (23:23 +0530)] 
gh-142863: optimize `list` and `set` calls with generator expressions  (#142864)

2 weeks agogh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior...
ADITYA RAI [Tue, 6 Jan 2026 17:08:25 +0000 (22:38 +0530)] 
gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (#142338)

The documentation incorrectly stated that the file descriptor is not
inherited by child processes. In reality, the close-on-exec flag (when
available) only prevents inheritance across exec() calls, not fork().

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-75572: Forward-port test_xpickle from Python 2 to 3 (GH-22452)
Ken Jin [Tue, 6 Jan 2026 17:03:03 +0000 (01:03 +0800)] 
gh-75572: Forward-port test_xpickle from Python 2 to 3 (GH-22452)

Move data classes used in tests to separate file test_picklecommon.py,
so it can be imported in old Python versions.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks agogh-106318: Add examples for str.isprintable() (#140043)
Adorilson Bezerra [Tue, 6 Jan 2026 16:43:44 +0000 (16:43 +0000)] 
gh-106318: Add examples for str.isprintable()  (#140043)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 weeks agogh-131798: Support generator frames in the JIT optimizer (GH-143340)
Ken Jin [Tue, 6 Jan 2026 16:39:57 +0000 (00:39 +0800)] 
gh-131798: Support generator frames in the JIT optimizer (GH-143340)

2 weeks agogh-143469: enable `LOAD_ATTR_MODULE` specialization even if `__getattr__` is defined...
Kumar Aditya [Tue, 6 Jan 2026 16:39:18 +0000 (22:09 +0530)] 
gh-143469: enable `LOAD_ATTR_MODULE` specialization even if `__getattr__` is defined (#143470)

2 weeks agogh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket (#142993)
Gleb Smirnoff [Tue, 6 Jan 2026 16:25:29 +0000 (08:25 -0800)] 
gh-142991: socketmodule: fixed getsockaddrlen() for PF_DIVERT socket (#142993)

2 weeks agogh-134584: Eliminate redundant refcounting in TO_BOOL_ALWAYS_TRUE (GH-143427)
reiden [Tue, 6 Jan 2026 16:11:56 +0000 (00:11 +0800)] 
gh-134584: Eliminate redundant refcounting in TO_BOOL_ALWAYS_TRUE (GH-143427)

Co-authored-by: Ken Jin <kenjin@python.org>
2 weeks agogh-139038: Add macOS performance numbers for the JIT (GH-143479)
Ken Jin [Tue, 6 Jan 2026 15:19:35 +0000 (23:19 +0800)] 
gh-139038: Add macOS performance numbers for the JIT (GH-143479)

2 weeks agogh-143424: Fix assertion in _PyMutex_LockTimed (gh-143439)
Sam Gross [Tue, 6 Jan 2026 14:40:14 +0000 (09:40 -0500)] 
gh-143424: Fix assertion in _PyMutex_LockTimed (gh-143439)

The assertion doesn't necessarily hold for `threading.Lock`, so allow
the lock to be unlocked if `_PY_LOCK_PYTHONLOCK` is set on the flags.

2 weeks agogh-143474: Add `os.RWF_ATOMIC` constant (GH-143475)
Clay Dugo [Tue, 6 Jan 2026 14:35:51 +0000 (09:35 -0500)] 
gh-143474: Add `os.RWF_ATOMIC` constant (GH-143475)

2 weeks agogh-129824: Fix data race in _PyBuiltins_AddExceptions with subinterpreters (gh-143446)
Sam Gross [Tue, 6 Jan 2026 14:15:55 +0000 (09:15 -0500)] 
gh-129824: Fix data race in _PyBuiltins_AddExceptions with subinterpreters (gh-143446)

2 weeks agogh-143331: Schedule to remove format "N" for Decimal (#143372)
Semyon Moroz [Tue, 6 Jan 2026 13:12:05 +0000 (13:12 +0000)] 
gh-143331: Schedule to remove format "N" for Decimal (#143372)

2 weeks agoAllow Android to fail CI (GH-143471)
Hugo van Kemenade [Tue, 6 Jan 2026 12:31:21 +0000 (14:31 +0200)] 
Allow Android to fail CI (GH-143471)

2 weeks agogh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well (GH-143461)
Łukasz Langa [Tue, 6 Jan 2026 10:10:18 +0000 (11:10 +0100)] 
gh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well (GH-143461)

2 weeks agogh-41779: Allow defining any __slots__ for a class derived from tuple (GH-141763)
Serhiy Storchaka [Tue, 6 Jan 2026 09:36:00 +0000 (11:36 +0200)] 
gh-41779: Allow defining any __slots__ for a class derived from tuple (GH-141763)

2 weeks agogh-116738: make entering of `contextvars.Context` thread safe (#143074)
Kumar Aditya [Tue, 6 Jan 2026 06:54:02 +0000 (12:24 +0530)] 
gh-116738: make entering of `contextvars.Context` thread safe (#143074)

2 weeks agogh-134740: Document distribution discovery in importlib.metadata (#134751)
Emma Smith [Tue, 6 Jan 2026 01:25:30 +0000 (17:25 -0800)] 
gh-134740: Document distribution discovery in importlib.metadata (#134751)

Document the following items listed in `__all__` but missing from
documentation:

- `distributions()`: mentioned in doc strings as well
- `DistributionFinder`: mentioned but didn't have it's own :class:
  entry
- `DistributionFinder.Context`: mentioned but didn't have it's own :class:
  entry)
- `Distribution.discover()`: mentioned in doc strings

Closes #134740
Partially addresses #110937

---------

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2 weeks agogh-143394: filter for turning off automatic margins in test_no_newline (GH-143433)
Chris Eibl [Mon, 5 Jan 2026 21:46:08 +0000 (22:46 +0100)] 
gh-143394: filter for turning off automatic margins in test_no_newline (GH-143433)

2 weeks agogh-143108: Don't instrument some faulthandler related functions for TSan (#143450)
Sam Gross [Mon, 5 Jan 2026 21:13:29 +0000 (16:13 -0500)] 
gh-143108: Don't instrument some faulthandler related functions for TSan (#143450)

2 weeks agogh-143434: Fix typo in zstd documentation (#143437)
Ritam Pal [Mon, 5 Jan 2026 19:55:11 +0000 (01:25 +0530)] 
gh-143434: Fix typo in zstd documentation (#143437)

2 weeks agogh-138205: explicit mention to `mmap.mmap.resize` in "Porting to Python 3.15" notes...
Ori Avtalion [Mon, 5 Jan 2026 19:27:45 +0000 (21:27 +0200)] 
gh-138205: explicit mention to `mmap.mmap.resize` in "Porting to Python 3.15" notes (#143440)

2 weeks agogh-69605: In test_pyrepl.test_already_imported*, invalidate FS import caches (#143436)
Łukasz Langa [Mon, 5 Jan 2026 17:00:48 +0000 (18:00 +0100)] 
gh-69605: In test_pyrepl.test_already_imported*, invalidate FS import caches (#143436)

This makes the test robust against file systems with low timestamp resolution, which otherwise would fail to re-import in the tight loop of the test.

2 weeks agogh-69605: Check for already imported modules in PyREPL module completion (GH-139461)
Loïc Simon [Mon, 5 Jan 2026 15:18:54 +0000 (16:18 +0100)] 
gh-69605: Check for already imported modules in PyREPL module completion (GH-139461)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2 weeks agogh-143082: Make readline work when sys.stdin is explicitly passed to pdb (#143083)
Denizhan Dakılır [Mon, 5 Jan 2026 04:39:11 +0000 (07:39 +0300)] 
gh-143082: Make readline work when sys.stdin is explicitly passed to pdb (#143083)

2 weeks agogh-143309: fix `test_execve_env_concurrent_mutation_with_fspath_posix` buildbot failu...
Bénédikt Tran [Sun, 4 Jan 2026 20:44:47 +0000 (21:44 +0100)] 
gh-143309: fix `test_execve_env_concurrent_mutation_with_fspath_posix` buildbot failure (#143415)

2 weeks agogh-139757: Add BINARY_OP_SUBSCR_USTR_INT (GH-143389)
Chris Eibl [Sun, 4 Jan 2026 14:14:27 +0000 (15:14 +0100)] 
gh-139757: Add BINARY_OP_SUBSCR_USTR_INT (GH-143389)

2 weeks agogh-143403: Fix a UAF in `_BINARY_OP_INPLACE_ADD_UNICODE` (GH-143404)
Ken Jin [Sun, 4 Jan 2026 13:10:39 +0000 (21:10 +0800)] 
gh-143403: Fix a UAF in `_BINARY_OP_INPLACE_ADD_UNICODE` (GH-143404)

Fix a UAF in `_BINARY_OP_INPLACE_ADD_UNICODE`

2 weeks agogh-143309: fix UAF in `os.execve` when the environment is concurrently mutated (...
Bénédikt Tran [Sat, 3 Jan 2026 22:05:57 +0000 (23:05 +0100)] 
gh-143309: fix UAF in `os.execve` when the environment is concurrently mutated (#143314)

2 weeks agogh-143308: fix UAF when PickleBuffer is concurrently mutated in a callback (#143312)
Aaron Wieczorek [Sat, 3 Jan 2026 22:01:59 +0000 (22:01 +0000)] 
gh-143308: fix UAF when PickleBuffer is concurrently mutated in a callback (#143312)

Co-authored-by: Aaron Wieczorek <woz@Aarons-MacBook-Pro.local>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-142927: Clarify pstats file output in docs and CLI (#143388)
László Kiss Kollár [Sat, 3 Jan 2026 21:16:29 +0000 (21:16 +0000)] 
gh-142927: Clarify pstats file output in docs and CLI (#143388)

When running the `profiling.sampling` module in pstats mode, the output
can be emitted in two different ways: text to stdout or a binary file
when the `--output` argument is set.

The current documentation and help text is confusing as it does not
distinguish between these two output formats so it may be surprising to
the user to get different formats depending whether `--output` is set or not.

2 weeks agogh-141504: Factor out tracing and optimization heuristics into a single object (gh...
Donghee Na [Sat, 3 Jan 2026 15:22:14 +0000 (00:22 +0900)] 
gh-141504: Factor out tracing and optimization heuristics into a single object (gh-143381)

2 weeks agogh-143001: Add @cpython_only to test_threading.ThreadTests.test_PyThreadState_SetAsyn...
Jeong, YunWon [Sat, 3 Jan 2026 15:01:49 +0000 (00:01 +0900)] 
gh-143001: Add @cpython_only to test_threading.ThreadTests.test_PyThreadState_SetAsyncExc (gh-143002)

2 weeks agogh-138122: Skip threads on EPERM in blocking mode profiler (GH-143368)
Pablo Galindo Salgado [Sat, 3 Jan 2026 14:37:16 +0000 (14:37 +0000)] 
gh-138122: Skip threads on EPERM in blocking mode profiler (GH-143368)

When using blocking mode in the remote debugging profiler, ptrace calls
to seize threads can fail with EPERM if the thread has exited between
listing and attaching, is in a special kernel state, or is already being
traced. Previously this raised a RuntimeError that was caught by the
Python sampling loop,and retried indefinitely since EPERM is
a persistent condition that will not resolve on its own.

Treat EPERM the same as ESRCH by returning 1 (skip this thread) instead
of -1 (fatal error). This allows profiling to continue with the threads
that can be traced rather than entering an endless retry loop printing
the same error message repeatedly.

3 weeks agogh-136924: Suspend REPL colorizing when in a REPL interactive command (GH-136926)
Olga Matoula [Sat, 3 Jan 2026 13:35:34 +0000 (15:35 +0200)] 
gh-136924: Suspend REPL colorizing when in a REPL interactive command (GH-136926)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 weeks agoFix dunder name typo in compiler code comment (#143374)
Bartosz Sławecki [Sat, 3 Jan 2026 10:08:42 +0000 (11:08 +0100)] 
Fix dunder name typo in compiler code comment (#143374)

3 weeks agogh-140648: Make asyncio REPL respect the `-I` flag (isolated mode) (#143045)
Bartosz Sławecki [Sat, 3 Jan 2026 08:03:04 +0000 (09:03 +0100)] 
gh-140648: Make asyncio REPL respect the `-I` flag (isolated mode) (#143045)

3 weeks agogh-142615: disallow multiple initializations of `asyncio.Task` and `asyncio.Future...
Kumar Aditya [Sat, 3 Jan 2026 07:57:02 +0000 (13:27 +0530)] 
gh-142615: disallow multiple initializations of `asyncio.Task` and `asyncio.Future` (#142616)

3 weeks agogh-143361: Pass PY_VECTORCALL_ARGUMENTS_OFFSET in _Py_CallBuiltinClass_StackRefSteal...
Aaron Wieczorek [Fri, 2 Jan 2026 20:43:00 +0000 (20:43 +0000)] 
gh-143361: Pass PY_VECTORCALL_ARGUMENTS_OFFSET in _Py_CallBuiltinClass_StackRefSteal (GH-143367)

Co-authored-by: Aaron Wieczorek <woz@Aarons-MacBook-Pro.local>
3 weeks agogh-76187: Document the `c` typecode for `multiprocessing.Array`. (#132504)
Tomas R. [Fri, 2 Jan 2026 19:18:32 +0000 (20:18 +0100)] 
gh-76187: Document the `c` typecode for `multiprocessing.Array`. (#132504)

* Document the `c` typecode for `multiprocessing.Array`.

* Add quotes

* Mention that 'w' is not supported

3 weeks agogh-134584: JIT: Remove redundant refcount from STORE_FAST (GH-143336)
Ken Jin [Fri, 2 Jan 2026 18:22:21 +0000 (02:22 +0800)] 
gh-134584: JIT: Remove redundant refcount from STORE_FAST (GH-143336)

3 weeks agono-issue: Fix optimizer_generator.py to print abstract_uop_name properly (gh-143366)
Donghee Na [Fri, 2 Jan 2026 17:18:15 +0000 (02:18 +0900)] 
no-issue: Fix optimizer_generator.py to print abstract_uop_name properly (gh-143366)

3 weeks agogh-138897: Use `_pyrepl.pager` for `_sitebuiltins._Printer` (GH-138898)
Stan Ulbrych [Fri, 2 Jan 2026 15:24:48 +0000 (15:24 +0000)] 
gh-138897: Use `_pyrepl.pager` for `_sitebuiltins._Printer` (GH-138898)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 weeks agogh-139262: Prevent swallowing REPL input on Windows (GH-139263)
Chris Eibl [Fri, 2 Jan 2026 15:17:45 +0000 (16:17 +0100)] 
gh-139262: Prevent swallowing REPL input on Windows (GH-139263)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 weeks agogh-143148: Replace pre-commit with prek in CI (#143149)
Johann Christensen [Fri, 2 Jan 2026 14:58:23 +0000 (15:58 +0100)] 
gh-143148: Replace pre-commit with prek in CI (#143149)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 weeks agogh-128067: In test_pyrepl, discover escape sequences from terminfo instead of using...
Łukasz Langa [Fri, 2 Jan 2026 14:42:04 +0000 (15:42 +0100)] 
gh-128067: In test_pyrepl, discover escape sequences from terminfo instead of using hard-coded values (#143356)

3 weeks agogh-139757: Fix unintended bytecode specialization for non-ascii string (gh-143352)
Donghee Na [Fri, 2 Jan 2026 14:05:08 +0000 (23:05 +0900)] 
gh-139757: Fix unintended bytecode specialization for non-ascii string (gh-143352)

3 weeks agogh-128067: Fix pyrepl overriding printed output without newlines (#138732)
Jan-Eric Nitschke [Fri, 2 Jan 2026 13:04:37 +0000 (14:04 +0100)] 
gh-128067: Fix pyrepl overriding printed output without newlines (#138732)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
3 weeks agogh-142927: Hide _sync_coordinator frames from profiler output (#143337)
Pablo Galindo Salgado [Fri, 2 Jan 2026 12:09:36 +0000 (12:09 +0000)] 
gh-142927: Hide _sync_coordinator frames from profiler output (#143337)