]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
11 days agogh-140487: Fix Py_RETURN_NOTIMPLEMENTED in limited C API 3.11 (GH-140636)
Victor Stinner [Mon, 27 Oct 2025 11:59:56 +0000 (12:59 +0100)] 
gh-140487: Fix Py_RETURN_NOTIMPLEMENTED in limited C API 3.11 (GH-140636)

Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE have already been
fixed by commit 9258f3da9175134d03f2c8c7c7eed223802ad945 (issue gh-134989).

11 days agogh-134160: Add more comments for the xxlimited module (GH-140214)
Petr Viktorin [Mon, 27 Oct 2025 10:39:42 +0000 (11:39 +0100)] 
gh-134160: Add more comments for the xxlimited module (GH-140214)

11 days agoDocs: Replace "encoder" with "decoder" in `Doc/c-api/codec.rst` (#140613)
RayXu [Mon, 27 Oct 2025 09:43:24 +0000 (17:43 +0800)] 
Docs: Replace "encoder" with "decoder" in `Doc/c-api/codec.rst` (#140613)

11 days agogh-140633: AppleFrameworkLoader: Ignore AttributeError when setting __file__ (GH...
Petr Viktorin [Mon, 27 Oct 2025 09:09:22 +0000 (10:09 +0100)] 
gh-140633: AppleFrameworkLoader: Ignore AttributeError when setting __file__ (GH-140635)

11 days agoRemove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (#140637)
Shamil [Mon, 27 Oct 2025 08:55:57 +0000 (11:55 +0300)] 
Remove dead stores to 'size' in UTF-8 decoder (unicodeobject.c) (#140637)

11 days agoFix typo in TLS docs (#140640)
da-woods [Mon, 27 Oct 2025 04:58:30 +0000 (04:58 +0000)] 
Fix typo in TLS docs (#140640)

11 days agogh-138944: Fix `SyntaxError` message for invalid syntax following valid import-as...
Brian Schubert [Sun, 26 Oct 2025 22:35:21 +0000 (18:35 -0400)] 
gh-138944: Fix `SyntaxError` message for invalid syntax following valid import-as statement (#138945)

12 days agogh-140609: delete unused `_stdlib_enums` in enum.py (#140618)
yihong [Sun, 26 Oct 2025 17:37:31 +0000 (01:37 +0800)] 
gh-140609: delete unused `_stdlib_enums` in enum.py (#140618)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
12 days agogh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
Bartosz Sławecki [Sun, 26 Oct 2025 14:48:03 +0000 (15:48 +0100)] 
gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)

12 days agogh-140593: Fix a memory leak in function `my_ElementDeclHandler` of `pyexpat` (#140602)
Sebastian Pipping [Sun, 26 Oct 2025 13:45:32 +0000 (14:45 +0100)] 
gh-140593: Fix a memory leak in function `my_ElementDeclHandler` of `pyexpat` (#140602)

Ensure that the memory allocated for the content model
passed to `my_ElementDeclHandler` is freed in all error
paths.

12 days agogh-133346: add tests for `_colorize.Theme` (#139687)
Bénédikt Tran [Sun, 26 Oct 2025 12:07:31 +0000 (13:07 +0100)] 
gh-133346: add tests for `_colorize.Theme` (#139687)

12 days agogh-133346: make `_colorize.Argparse` kw-only constructible (#140620)
Bénédikt Tran [Sun, 26 Oct 2025 11:33:57 +0000 (12:33 +0100)] 
gh-133346: make `_colorize.Argparse` kw-only constructible (#140620)

Other themes are kw-only constructible.

12 days agogh-76007: Deprecate `__version__` attribute in `decimal` (#140302)
Stan Ulbrych [Sun, 26 Oct 2025 11:01:04 +0000 (11:01 +0000)] 
gh-76007: Deprecate `__version__` attribute in `decimal` (#140302)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 days agoDocs: Fix a grammatical error in `Doc/c-api/codec.rst` (#140612)
RayXu [Sun, 26 Oct 2025 09:39:32 +0000 (17:39 +0800)] 
Docs: Fix a grammatical error in `Doc/c-api/codec.rst` (#140612)

12 days agogh-124694: Add versionadded note to InterpreterPoolExecutor (#140468)
Zachary Ware [Sat, 25 Oct 2025 23:29:46 +0000 (18:29 -0500)] 
gh-124694: Add versionadded note to InterpreterPoolExecutor (#140468)

13 days agoFix typo in `Doc/c-api/code.rst` (#140586)
RayXu [Sat, 25 Oct 2025 15:34:45 +0000 (23:34 +0800)] 
Fix typo in `Doc/c-api/code.rst` (#140586)

13 days agoRemove unreachable break statements in _ctypes_test.c (#140585)
Shamil [Sat, 25 Oct 2025 14:59:12 +0000 (17:59 +0300)] 
Remove unreachable break statements in _ctypes_test.c (#140585)

13 days agogh-140544: use faster `_PyInterpreterState_GET` for type lock (#140584)
Kumar Aditya [Sat, 25 Oct 2025 14:53:26 +0000 (20:23 +0530)] 
gh-140544: use faster `_PyInterpreterState_GET` for type lock (#140584)

13 days agogh-140544: store pointer to interpreter state as a thread local for fast access ...
Kumar Aditya [Sat, 25 Oct 2025 14:26:07 +0000 (19:56 +0530)] 
gh-140544: store pointer to interpreter state as a thread local for fast access (#140573)

13 days agoDocs: Fix a grammatical error in `Doc/c-api/capsule.rst` (GH-140577)
RayXu [Sat, 25 Oct 2025 13:54:52 +0000 (21:54 +0800)] 
Docs: Fix a grammatical error in `Doc/c-api/capsule.rst` (GH-140577)

"who" -> "which"

13 days agoAdd missing NEWS entry for gh-140517 (GH-140560)
Mikhail Efimov [Fri, 24 Oct 2025 19:53:00 +0000 (22:53 +0300)] 
Add missing NEWS entry for gh-140517 (GH-140560)

2 weeks agogh-136327: Fix inconsistent ``TypeError`` messages regarding invalid values after...
Tapeline [Fri, 24 Oct 2025 19:12:49 +0000 (00:12 +0500)] 
gh-136327: Fix inconsistent ``TypeError`` messages regarding invalid values after * and ** (#136395)

2 weeks agogh-140482: Preserve and restore `stty echo` as a test environment (#140519)
Barry Warsaw [Fri, 24 Oct 2025 18:07:08 +0000 (11:07 -0700)] 
gh-140482: Preserve and restore `stty echo` as a test environment (#140519)

gh-140482: Restore `stty echo` as a test environment

2 weeks agogh-140463: Fix typo in xmlrpc.client documentation (GH-140552)
Miša Jakovljević [Fri, 24 Oct 2025 16:04:43 +0000 (18:04 +0200)] 
gh-140463: Fix typo in xmlrpc.client documentation (GH-140552)

Fix typo in xmlrpc.client documentation

2 weeks agogh-140517: fix leak in `map_next` in strict mode (#140543)
Mikhail Efimov [Fri, 24 Oct 2025 15:59:16 +0000 (18:59 +0300)] 
gh-140517: fix leak in `map_next` in strict mode (#140543)

2 weeks agogh-140414: add fastpath for current running loop in `asyncio.all_tasks` (#140542)
Kumar Aditya [Fri, 24 Oct 2025 14:32:17 +0000 (20:02 +0530)] 
gh-140414: add fastpath for current running loop in `asyncio.all_tasks` (#140542)

Optimize `asyncio.all_tasks()` for the common case where the event loop is running in the current thread by avoiding stop-the-world pauses and locking.

This optimization is already present for `asyncio.current_task()` so we do the same for `asyncio.all_tasks()`.

2 weeks agogh-140544: cleanup `HAVE_THREAD_LOCAL` checks in pystate.c (#140547)
Kumar Aditya [Fri, 24 Oct 2025 14:23:06 +0000 (19:53 +0530)] 
gh-140544: cleanup `HAVE_THREAD_LOCAL` checks in pystate.c (#140547)

2 weeks agoDocument that PyModule_GetDef can return NULL with or without setting an exception...
Petr Viktorin [Fri, 24 Oct 2025 13:28:48 +0000 (15:28 +0200)] 
Document that PyModule_GetDef can return NULL with or without setting an exception (GH-140529)

2 weeks agoDocs: Fix a grammatical error in `Doc/c-api/arg.rst` (GH-140525)
RayXu [Fri, 24 Oct 2025 12:17:52 +0000 (20:17 +0800)] 
Docs: Fix a grammatical error in `Doc/c-api/arg.rst` (GH-140525)

"have" -> "has"

2 weeks agogh-136535: Tests: Correct `Py_TPFLAGS_MANAGED_DICT` in `test_class.py` (gh-136538)
Jiseok CHOI [Fri, 24 Oct 2025 11:20:09 +0000 (20:20 +0900)] 
gh-136535: Tests: Correct `Py_TPFLAGS_MANAGED_DICT` in `test_class.py` (gh-136538)

2 weeks agogh-138857: Improve error message for `case` outside of `match` (#138858)
sobolevn [Fri, 24 Oct 2025 09:20:54 +0000 (12:20 +0300)] 
gh-138857: Improve error message for `case` outside of `match` (#138858)

* gh-138857: Improve error message for `case` outside of `match`

---------

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks agogh-133390: sqlite3 CLI completion for tables, columns, indices, triggers, views,...
Tan Long [Fri, 24 Oct 2025 06:26:36 +0000 (14:26 +0800)] 
gh-133390: sqlite3 CLI completion for tables, columns, indices, triggers, views, functions, schemata (GH-136101)

2 weeks agogh-83714: Set os.statx().stx_mode to None if missing from stx_mask (#140484)
Victor Stinner [Thu, 23 Oct 2025 20:35:17 +0000 (22:35 +0200)] 
gh-83714: Set os.statx().stx_mode to None if missing from stx_mask (#140484)

* Set stx_mode to None if STATX_TYPE|STATX_MODE is missing from
  stx_mask.
* Enhance os.statx() tests.
* statx_result structure: remove atime_sec, btime_sec, ctime_sec and
  mtime_sec members. Compute them on demand when stx_atime,
  stx_btime, stx_ctime and stx_mtime are read.
* Doc: fix statx members sorting.

2 weeks agogh-140443: Use `fma` in `loghelper` to improve accuracy of log for very large integer...
Abhishek Tiwari [Thu, 23 Oct 2025 17:05:12 +0000 (22:35 +0530)] 
gh-140443: Use `fma` in `loghelper` to improve accuracy of log for very large integers (#140469)

* gh-140443:use fma in loghelper to improve accuracy of log for very large integers

Use fused multiply-add in log_helper() for huge ints.

Saving a rounding here is remarkably effective. Across some millions
of randomized test cases with ints up to a billion bits, on Windows
and using log10, the ULP error distribution was dramatically
flattened, and its range was nearly cut in half. In fact, the largest
error Tim saw was under 0.6 ULP.

---------

Co-authored-by: abhi210 <27881020+Abhi210@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 weeks agogh-135125: Fix Py_STACKREF_DEBUG build (GH-139475)
Mikhail Efimov [Thu, 23 Oct 2025 16:00:23 +0000 (19:00 +0300)] 
gh-135125: Fix Py_STACKREF_DEBUG build (GH-139475)

* Use the same pattern of refcounting for stackrefs as in production build

2 weeks agoGH-135904: JIT compiler: Support 19 bit branch instructions on AArch64 for Mach-O...
Mark Shannon [Thu, 23 Oct 2025 15:45:57 +0000 (16:45 +0100)] 
GH-135904: JIT compiler: Support 19 bit branch instructions on AArch64 for Mach-O. (GH-140453)

* Insert labels into assembly for custom relocation during stencil creation.

2 weeks agogh-140471: Fix buffer overflow in AST node initialization with malformed `_fields...
Stan Ulbrych [Thu, 23 Oct 2025 15:35:21 +0000 (16:35 +0100)] 
gh-140471: Fix buffer overflow in AST node initialization with malformed `_fields` (#140506)

2 weeks agogh-140438: properly run the asyncio REPL tests (#140298)
Bartosz Sławecki [Thu, 23 Oct 2025 15:23:23 +0000 (17:23 +0200)] 
gh-140438: properly run the asyncio REPL tests (#140298)

2 weeks agogh-140431: Fix GC crash due to partially initialized coroutines (gh-140470)
Sam Gross [Thu, 23 Oct 2025 14:18:13 +0000 (10:18 -0400)] 
gh-140431: Fix GC crash due to partially initialized coroutines (gh-140470)

The `make_gen()` function creates and tracks generator/coro objects, but
doesn't fully initialize all the fields. At a minimum, we need to
initialize all the fields that may be accessed by gen_traverse because
the call to `compute_cr_origin()` can trigger a GC.

2 weeks agogh-138774: use `value` to `ast.unparse` code when `str` is `None` in `ast.Interpolati...
George Ogden [Thu, 23 Oct 2025 13:56:05 +0000 (14:56 +0100)] 
gh-138774: use `value` to `ast.unparse` code when `str` is `None` in `ast.Interpolation` (#139415)

2 weeks agogh-137627: Make `csv.Sniffer.sniff()` delimiter detection 1.6x faster (#137628)
Maurycy Pawłowski-Wieroński [Thu, 23 Oct 2025 12:28:29 +0000 (14:28 +0200)] 
gh-137627: Make `csv.Sniffer.sniff()` delimiter detection 1.6x faster (#137628)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-140474: Fix memory leak in `array.array` (GH-140478)
Stan Ulbrych [Thu, 23 Oct 2025 09:49:27 +0000 (10:49 +0100)] 
gh-140474: Fix memory leak in `array.array` (GH-140478)

2 weeks agoGH-140472: Create a WASI devcontainer configuration (GH-140473)
Brett Cannon [Wed, 22 Oct 2025 23:11:48 +0000 (16:11 -0700)] 
GH-140472: Create a WASI devcontainer configuration (GH-140473)

2 weeks agoGH-140475: Support WASI SDK 25 (#140477)
Brett Cannon [Wed, 22 Oct 2025 21:34:37 +0000 (14:34 -0700)] 
GH-140475: Support WASI SDK 25 (#140477)

As well, bump the version of Wasmtime used in CI.

2 weeks agogh-140253: Improve the syntax error from an ill-positioned double-star subpattern...
Bartosz Sławecki [Wed, 22 Oct 2025 18:29:14 +0000 (20:29 +0200)] 
gh-140253: Improve the syntax error from an ill-positioned double-star subpattern (#140254)

2 weeks agogh-130317: Fix SNaN broken tests on HP PA RISC (#140452)
Stefano Rivera [Wed, 22 Oct 2025 16:36:12 +0000 (09:36 -0700)] 
gh-130317: Fix SNaN broken tests on HP PA RISC (#140452)

While looking at #140028, I found some unrelated test regressions in the
3.14 cycle. These seem to all come from #130317. From what I can tell,
that made Python more correct than it was before. According to [0], HP PA
RISC uses 1 for SNaN and thus a 0 for QNaN.

[0]: https://grouper.ieee.org/groups/1788/email/msg03272.html

2 weeks agogh-140448: Default `suggest_on_error` to `True` in `argparse.ArgumentParser` (#140450)
Jakob [Wed, 22 Oct 2025 16:15:26 +0000 (18:15 +0200)] 
gh-140448: Default `suggest_on_error` to `True` in `argparse.ArgumentParser` (#140450)

2 weeks agogh-116738: Add critical section to dbm/gdbm context manager (gh-140391)
Alper [Wed, 22 Oct 2025 15:16:28 +0000 (08:16 -0700)] 
gh-116738: Add critical section to dbm/gdbm context manager (gh-140391)

2 weeks agoGH-139193: Fix dump_stack when PYTHON_LLTRACE=4 (GH-139384)
Sergey Miryanov [Wed, 22 Oct 2025 13:14:25 +0000 (18:14 +0500)] 
GH-139193: Fix dump_stack when PYTHON_LLTRACE=4 (GH-139384)

2 weeks agogh-83714: Only use STATX_MNT_ID & STATX_SUBVOL if they're defined (GH-140446)
Petr Viktorin [Wed, 22 Oct 2025 10:42:51 +0000 (12:42 +0200)] 
gh-83714: Only use STATX_MNT_ID & STATX_SUBVOL if they're defined (GH-140446)

2 weeks agogh-83714: Use "stx_" prefix for all os.statx_result members (#140432)
Victor Stinner [Wed, 22 Oct 2025 09:48:37 +0000 (11:48 +0200)] 
gh-83714: Use "stx_" prefix for all os.statx_result members (#140432)

Rename stx_birthtime to stx_btime, and rename stx_birthtime_ns to
stx_btime_ns.

2 weeks agogh-116738: Make _suggestions module thread-safe (gh-140321)
Alper [Wed, 22 Oct 2025 00:14:48 +0000 (17:14 -0700)] 
gh-116738: Make _suggestions module thread-safe (gh-140321)

2 weeks agogh-55258: Skip tests of stdout status on mobile platforms (#140401)
Russell Keith-Magee [Tue, 21 Oct 2025 23:12:26 +0000 (07:12 +0800)] 
gh-55258: Skip tests of stdout status on mobile platforms (#140401)

Skip tests of stdout status on mobile platforms.

2 weeks agogh-132835: Add defensive NULL checks to MRO resolution (GH-134763)
Emma Smith [Tue, 21 Oct 2025 21:48:29 +0000 (14:48 -0700)] 
gh-132835: Add defensive NULL checks to MRO resolution (GH-134763)

Currently, there are a few places where tp_mro could theoretically
become NULL, but do not in practice. This commit adds defensive checks for
NULL values to ensure that any changes do not introduce a crash and that
state invariants are upheld.

The assertions added in this commit are all instances where a NULL value would get passed to something not expecting a NULL, so it is better to catch an assertion failure than crash later on.

There are a few cases where it is OK for the return of lookup_tp_mro to be NULL, such as when passed to is_subtype_with_mro, which handles this explicitly.

2 weeks agogh-69528: Distinguish between file modes "wb+" and "rb+" (GH-137834)
Stan Ulbrych [Tue, 21 Oct 2025 17:33:30 +0000 (18:33 +0100)] 
gh-69528: Distinguish between file modes "wb+" and "rb+" (GH-137834)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
2 weeks agogh-83714: Check for struct statx members in configure (#140402)
Jeffrey Bosboom [Tue, 21 Oct 2025 16:13:14 +0000 (09:13 -0700)] 
gh-83714: Check for struct statx members in configure (#140402)

Some systems have the definitions of the mask bits without having the
corresponding members in struct statx.  Add configure checks for members
added after Linux 4.11 (when statx itself was added).

2 weeks agoUse ``sphinxext-opengraph`` v0.13.0 (GH-140425)
Adam Turner [Tue, 21 Oct 2025 16:02:43 +0000 (17:02 +0100)] 
Use ``sphinxext-opengraph`` v0.13.0 (GH-140425)

2 weeks agogh-138764: annotationlib: Make `call_annotate_function` fallback to using `VALUE...
David Ellis [Tue, 21 Oct 2025 15:57:43 +0000 (16:57 +0100)] 
gh-138764: annotationlib: Make `call_annotate_function` fallback to using `VALUE` annotations if both the requested format and `VALUE_WITH_FAKE_GLOBALS` are not implemented (#138803)

2 weeks agogh-140239: Check for statx on Android (#140395)
Jeffrey Bosboom [Tue, 21 Oct 2025 15:54:00 +0000 (08:54 -0700)] 
gh-140239: Check for statx on Android (#140395)

Android has Linux's statx, but MACHDEP is "android" on Android, so
configure doesn't check for statx on Android.  Base the check for statx
on ac_sys_system instead, which is "Linux-android" on Android, "Linux"
on other Linux distributions, and "AIX" on AIX (which has an
incompatible function named statx).

2 weeks agoGH-139951: Fix major GC performance regression (GH-140262)
Mark Shannon [Tue, 21 Oct 2025 14:22:15 +0000 (15:22 +0100)] 
GH-139951: Fix major GC performance regression (GH-140262)

* Count number of actually tracked objects, instead of trackable objects. This ensures that untracking tuples has the desired effect of reducing GC overhead

* Do not track most untrackable tuples during creation. This prevents large numbers of small tuples causing execessive GCs.

2 weeks agoGH-139436: Remove references to downloadable PDF documentation (#140416)
Adam Turner [Tue, 21 Oct 2025 12:37:06 +0000 (13:37 +0100)] 
GH-139436: Remove references to downloadable PDF documentation (#140416)

2 weeks agogh-140406: Fix memory leak upon `__hash__` returning a non-integer (GH-140411)
Peter Bierma [Tue, 21 Oct 2025 12:10:01 +0000 (08:10 -0400)] 
gh-140406: Fix memory leak upon `__hash__` returning a non-integer (GH-140411)

2 weeks agogh-83714: Fix os.statx() tests on tmpfs: st_birthtime can be None (#140407)
Victor Stinner [Tue, 21 Oct 2025 10:24:49 +0000 (12:24 +0200)] 
gh-83714: Fix os.statx() tests on tmpfs: st_birthtime can be None (#140407)

2 weeks agogh-133951: Add venv changes to documentation and whatsnew (GH-139704)
Cycloctane [Tue, 21 Oct 2025 08:52:57 +0000 (16:52 +0800)] 
gh-133951: Add venv changes to documentation and whatsnew (GH-139704)

2 weeks agogh-140398: fix memory leaks in `readline` module when `PySys_Audit` fails (#140400)
Shamil [Tue, 21 Oct 2025 07:54:34 +0000 (10:54 +0300)] 
gh-140398: fix memory leaks in `readline` module when `PySys_Audit` fails (#140400)

2 weeks agogh-139707: Better `ModuleNotFoundError` message for missing stdlib modules (GH-140219)
Stan Ulbrych [Tue, 21 Oct 2025 07:12:04 +0000 (08:12 +0100)] 
gh-139707: Better `ModuleNotFoundError` message for missing stdlib modules (GH-140219)

2 weeks agogh-140358: Bring back elapsed time and unreachable count to gc debug output (#140359)
Pål Grønås Drange [Mon, 20 Oct 2025 23:54:44 +0000 (01:54 +0200)] 
gh-140358: Bring back elapsed time and unreachable count to gc debug output (#140359)

2 weeks agogh-133601: Remove deprecated `typing.no_type_check_decorator` (#133602)
sobolevn [Mon, 20 Oct 2025 21:10:44 +0000 (00:10 +0300)] 
gh-133601: Remove deprecated `typing.no_type_check_decorator` (#133602)

2 weeks ago[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() ...
Sam Bull [Mon, 20 Oct 2025 20:09:33 +0000 (21:09 +0100)] 
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (#139565)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 weeks agogh-138891: fix star-unpack in get_annotations (#138951)
Christoph Walcher [Mon, 20 Oct 2025 19:55:08 +0000 (21:55 +0200)] 
gh-138891: fix star-unpack in get_annotations (#138951)

2 weeks agogh-133656: Remove unused import and private global in `Lib/zipimport.py` (GH-140325)
yihong [Mon, 20 Oct 2025 19:43:10 +0000 (03:43 +0800)] 
gh-133656: Remove unused import and private global in `Lib/zipimport.py` (GH-140325)

2 weeks agogh-63161: Fix tokenize.detect_encoding() (GH-139446)
Serhiy Storchaka [Mon, 20 Oct 2025 17:08:47 +0000 (20:08 +0300)] 
gh-63161: Fix tokenize.detect_encoding() (GH-139446)

* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified.
* Detect decoding error for non-UTF-8 encoding.
* Detect null bytes in source code.

2 weeks agogh-83714: Set os.statx() members to None if missing from stx_mask (#140216)
Victor Stinner [Mon, 20 Oct 2025 15:59:12 +0000 (17:59 +0200)] 
gh-83714: Set os.statx() members to None if missing from stx_mask (#140216)

2 weeks agoDocs: replace an esoteric Von Neumann mention (#137598)
Ned Batchelder [Mon, 20 Oct 2025 14:01:20 +0000 (10:01 -0400)] 
Docs: replace an esoteric Von Neumann mention (#137598)

* Docs: replace an esoteric Von Neumann mention

* oops, don't need to edit topics.py

2 weeks agogh-140263: Fix data race in test_lock_two_threads (gh-140264)
Sam Gross [Mon, 20 Oct 2025 13:58:05 +0000 (09:58 -0400)] 
gh-140263: Fix data race in test_lock_two_threads (gh-140264)

Clang-20 detects a data race between the unlock and the non-atomic
read of the lock state. Use a relaxed load for the assertion to avoid
the race.

2 weeks agogh-140166: Use `application/texinfo` as sole MIME type for `.texi` and `.texinfo...
Charlie Lin [Mon, 20 Oct 2025 13:14:23 +0000 (09:14 -0400)] 
gh-140166: Use `application/texinfo` as sole MIME type for `.texi` and `.texinfo` files (#140165)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks agogh-76007: Deprecate `__version__` attribute in `imaplib` (#140299)
Hugo van Kemenade [Mon, 20 Oct 2025 12:20:44 +0000 (15:20 +0300)] 
gh-76007: Deprecate `__version__` attribute in `imaplib` (#140299)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-66646: Explain __base__ attribute in the docs (GH-102554)
Furkan Onder [Mon, 20 Oct 2025 12:15:30 +0000 (21:15 +0900)] 
gh-66646: Explain __base__ attribute in the docs (GH-102554)

Co-authored-by: Éric <merwok@netwok.org>
2 weeks agogh-139951: Test on GC collection disabled if threshold is zero (GH-140304)
Mikhail Efimov [Mon, 20 Oct 2025 10:45:07 +0000 (13:45 +0300)] 
gh-139951: Test on GC collection disabled if threshold is zero (GH-140304)

2 weeks agogh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (#140303)
Shamil [Mon, 20 Oct 2025 09:29:23 +0000 (12:29 +0300)] 
gh-140301: Fix memory leak in subinterpreter `PyConfig` cleanup (#140303)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agofix typo in comments PyOS_CallInputHook -> PyOS_InputHook (#140237)
mdehoon [Mon, 20 Oct 2025 08:55:57 +0000 (17:55 +0900)] 
fix typo in comments PyOS_CallInputHook -> PyOS_InputHook (#140237)

2 weeks agoRemove typo in ``functools.lru_cache`` docs (#140278)
Brandon Hubacher [Mon, 20 Oct 2025 08:55:01 +0000 (03:55 -0500)] 
Remove typo in ``functools.lru_cache`` docs (#140278)

2 weeks agoFix typo in PyIter_Send docs (#140336)
Peter Holloway [Mon, 20 Oct 2025 08:53:57 +0000 (09:53 +0100)] 
Fix typo in PyIter_Send docs (#140336)

2 weeks agogh-101100: Fix sphinx warnings in `library/resource.rst` (#140023)
Weilin Du [Mon, 20 Oct 2025 07:15:40 +0000 (15:15 +0800)] 
gh-101100: Fix sphinx warnings in `library/resource.rst` (#140023)

2 weeks ago`zlib.rst`: Link to constants and deduplicate text (GH-140115)
Stan Ulbrych [Mon, 20 Oct 2025 04:22:39 +0000 (05:22 +0100)] 
`zlib.rst`: Link to constants and deduplicate text (GH-140115)

* Link to compression setting constants from compression functions
* De-duplicate descriptions of the constants

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agodocs: be clearer that glob results are unordered (#140184)
Ned Batchelder [Sun, 19 Oct 2025 20:16:35 +0000 (16:16 -0400)] 
docs: be clearer that glob results are unordered (#140184)

* docs: be clearer that glob results are unordered

* trim down the opening paragraph

2 weeks agogh-140306: Fix memory leaks in cross-interpreter data handling (GH-140307)
Shamil [Sun, 19 Oct 2025 19:24:28 +0000 (22:24 +0300)] 
gh-140306: Fix memory leaks in cross-interpreter data handling (GH-140307)

2 weeks agogh-101525: [BOLT] Add GCC's LTO-generated function clones, with computed gotos, to...
stratakis [Sun, 19 Oct 2025 14:23:49 +0000 (16:23 +0200)] 
gh-101525: [BOLT] Add GCC's LTO-generated function clones, with computed gotos, to BOLT skip list (gh-139840)

2 weeks ago`Lib/idlelib/idle_test/__init__.py`: remove commented out duplicate code (#140259)
Stan Ulbrych [Sun, 19 Oct 2025 04:16:13 +0000 (05:16 +0100)] 
`Lib/idlelib/idle_test/__init__.py`: remove commented out duplicate code (#140259)

2 weeks agogh-138997: Remove false justify `fill` option from Tkinter docs (#139023)
Marat Khagazheev [Sun, 19 Oct 2025 03:45:52 +0000 (06:45 +0300)] 
gh-138997: Remove false justify `fill` option from Tkinter docs (#139023)

Co-authored-by: marat <khagazheev@artlebedev.ru>
2 weeks agogh-139269: Fix unaligned memory access in JIT code patching functions (GH-139271)
Shamil [Sat, 18 Oct 2025 23:20:04 +0000 (02:20 +0300)] 
gh-139269: Fix unaligned memory access in JIT code patching functions (GH-139271)

* Use memcpy for patching values instead of direct assignment

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-128571: Document UTF-16/32 native byte order (#139974)
Parham MohammadAlizadeh [Sat, 18 Oct 2025 18:47:04 +0000 (19:47 +0100)] 
gh-128571: Document UTF-16/32 native byte order (#139974)

Closes #128571

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 weeks agogh-140251: colorize import statement formatting in asyncio console (#140252)
Frost Ming [Sat, 18 Oct 2025 14:35:24 +0000 (22:35 +0800)] 
gh-140251: colorize import statement formatting in asyncio console (#140252)

2 weeks agogh-140067: Fix memory leak in sub-interpreter creation (#140111) (#140261)
Kumar Aditya [Sat, 18 Oct 2025 11:06:58 +0000 (16:36 +0530)] 
gh-140067: Fix memory leak in sub-interpreter creation (#140111)  (#140261)

Fix memory leak in sub-interpreter creation caused by overwriting of the previously used `_malloced` field. Now the pointer is stored in the first word of the memory block to avoid it being overwritten accidentally.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agogh-140257: fix data race on eval_breaker during finalization (#140265)
Shamil [Sat, 18 Oct 2025 11:01:53 +0000 (14:01 +0300)] 
gh-140257: fix data race on eval_breaker during finalization (#140265)

2 weeks agogh-140241: Fix documentation for the registry parameter of warnings.warn_explicit...
Serhiy Storchaka [Sat, 18 Oct 2025 10:55:26 +0000 (13:55 +0300)] 
gh-140241: Fix documentation for the registry parameter of warnings.warn_explicit() (GH-140242)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 weeks agoMove the NEWS entry for gh-140272 to the correct place (GH-140290)
Serhiy Storchaka [Sat, 18 Oct 2025 10:54:40 +0000 (13:54 +0300)] 
Move the NEWS entry for gh-140272 to the correct place (GH-140290)

2 weeks agogh-140272: Fix memory leak in _gdbm.gdbm.clear() (GH-140274)
Shamil [Sat, 18 Oct 2025 09:27:58 +0000 (12:27 +0300)] 
gh-140272: Fix memory leak in _gdbm.gdbm.clear() (GH-140274)

2 weeks agoGH-139174: Prepare `pathlib.Path.info` for new methods (part 2) (#140155)
Barney Gale [Sat, 18 Oct 2025 01:13:25 +0000 (02:13 +0100)] 
GH-139174: Prepare `pathlib.Path.info` for new methods (part 2) (#140155)

Merge `_Info`, `_StatResultInfo` and `_DirEntryInfo` into a single `_Info`
class. No other changes.

This will allow us to use a cached `os.stat()` result from our upcoming
`_Info.stat()` method even when we have a backing `os.DirEntry`.

2 weeks agoGH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (#133831)
Barney Gale [Fri, 17 Oct 2025 21:57:51 +0000 (22:57 +0100)] 
GH-133789: Fix unpickling of pathlib objects pickled in Python 3.13 (#133831)

In Python 3.13 (but not 3.12 or 3.14), pathlib classes are defined in
`pathlib._local` rather than `pathlib`. In hindsight this was a mistake,
but it was difficult to predict how the abstract/local split would pan out.

In this patch we re-introduce `pathlib._local` as a stub module that
re-exports the classes from `pathlib`. This allows path objects pickled in
3.13 to be unpicked in 3.14+