]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 days agogh-140874: Upgrade bundled pip to 25.3 (GH-140876)
Damian Shaw [Sat, 1 Nov 2025 10:25:19 +0000 (06:25 -0400)] 
gh-140874: Upgrade bundled pip to 25.3 (GH-140876)

Upgrade bundled pip to 25.3

6 days agoGH-119668: expose importlib.machinery.NamespacePath (#119669)
Filipe Laíns [Sat, 1 Nov 2025 00:39:48 +0000 (00:39 +0000)] 
GH-119668: expose importlib.machinery.NamespacePath (#119669)

* GH-119668: expose importlib.NamespacePath

Signed-off-by: Filipe Laíns <lains@riseup.net>
* add news

Signed-off-by: Filipe Laíns <lains@riseup.net>
* add to docs

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Apply suggestions from code review

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Fix news (importlib.NamespacePath > importlib.machinery.NamespacePath)

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Link to module.__path__ in NamespacePath docs

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Mention the path argument in the documentation

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Simplify docs text

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Highlight argument names in docs text

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Lib/importlib/_bootstrap_external.py

Co-authored-by: Brett Cannon <brett@python.org>
* Rewrite NamespacePath's doc

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Specify path_finder's type in the NamespacePath docstring

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Fix doc tests

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Apply suggestions from code review

Co-authored-by: Barry Warsaw <barry@python.org>
* Fix doc lint

Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Doc/library/importlib.rst

Co-authored-by: Brett Cannon <brett@python.org>
---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
7 days agogh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837)
Serhiy Storchaka [Fri, 31 Oct 2025 15:44:02 +0000 (17:44 +0200)] 
gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837)

* the "plaintext" element
* the RAWTEXT elements "xmp", "iframe", "noembed" and "noframes"
* optionally RAWTEXT (if scripting=True) element "noscript"

7 days agogh-140212: Add html for year-month option in Calendar (#140230)
Pål Grønås Drange [Fri, 31 Oct 2025 15:28:53 +0000 (16:28 +0100)] 
gh-140212: Add html for year-month option in Calendar (#140230)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
7 days agogh-81313: Add the math.integer module (PEP-791) (GH-133909)
Serhiy Storchaka [Fri, 31 Oct 2025 14:13:43 +0000 (16:13 +0200)] 
gh-81313: Add the math.integer module (PEP-791) (GH-133909)

7 days agogh-136063: fix quadratic-complexity parsing in `email.message._parseparam` (GH-136072)
Bénédikt Tran [Fri, 31 Oct 2025 13:50:40 +0000 (14:50 +0100)] 
gh-136063: fix quadratic-complexity parsing in `email.message._parseparam` (GH-136072)

7 days agogh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952)
Serhiy Storchaka [Fri, 31 Oct 2025 13:49:51 +0000 (15:49 +0200)] 
gh-136065: Fix quadratic complexity in os.path.expandvars() (GH-134952)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
7 days agogh-57665: Remove 'response_class' from getresponse docstring. (#140707)
R. David Murray [Fri, 31 Oct 2025 13:09:22 +0000 (09:09 -0400)] 
gh-57665: Remove 'response_class' from getresponse docstring. (#140707)

Remove 'response_class' from getresponse docstring.

This variable is not documented as part of the API in the standard
library documentation; it should be considered as an implementation
detail and as such should not be included in the doc string.

Closes #57665.

7 days agogh-131885: Document `*` for `code.InteractiveConsole` (#132029)
Semyon Moroz [Fri, 31 Oct 2025 10:16:32 +0000 (14:16 +0400)] 
gh-131885: Document `*` for `code.InteractiveConsole` (#132029)

7 days agogh-140373: Correctly emit `PY_UNWIND` event when generator is closed (GH-140767)
Mikhail Efimov [Fri, 31 Oct 2025 10:09:22 +0000 (13:09 +0300)] 
gh-140373: Correctly emit `PY_UNWIND` event when generator is closed (GH-140767)

7 days agoMove WASI CI over to Arm runners (GH-140810)
Brett Cannon [Thu, 30 Oct 2025 22:29:39 +0000 (15:29 -0700)] 
Move WASI CI over to Arm runners (GH-140810)

8 days agoMake printing log lines to the terminal a little cleaner when building WASI (GH-140772)
Brett Cannon [Thu, 30 Oct 2025 17:35:53 +0000 (10:35 -0700)] 
Make printing log lines to the terminal a little cleaner when building WASI (GH-140772)

8 days agogh-140766: [Enum] add `show_flag_values` and `bin` to `enum.__all__` (GH-140765)
Guo Ci [Thu, 30 Oct 2025 17:32:55 +0000 (13:32 -0400)] 
gh-140766: [Enum] add `show_flag_values` and `bin` to `enum.__all__` (GH-140765)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
8 days agoGH-140768: Warn when the WASI SDK version doesn't match the supported version (GH...
Brett Cannon [Thu, 30 Oct 2025 16:32:18 +0000 (09:32 -0700)] 
GH-140768: Warn when the WASI SDK version doesn't match the supported version (GH-140769)

8 days agogh-139246: zero-width word paste can be wrong in default repl (GH-139254)
yihong [Thu, 30 Oct 2025 15:14:06 +0000 (23:14 +0800)] 
gh-139246: zero-width word paste can be wrong in default repl (GH-139254)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: grayjk <grayjk@gmail.com>
8 days agogh-55531: Implement `normalize_encoding` in C (#136643)
Stan Ulbrych [Thu, 30 Oct 2025 14:31:47 +0000 (14:31 +0000)] 
gh-55531: Implement `normalize_encoding` in C (#136643)

Closes gh-55531

8 days agogh-135801: Improve filtering by module in warn_explicit() without module argument...
Serhiy Storchaka [Thu, 30 Oct 2025 13:55:39 +0000 (15:55 +0200)] 
gh-135801: Improve filtering by module in warn_explicit() without module argument (GH-140151)

* Try to match the module name pattern with module names constructed
  starting from different parent directories of the filename.
  E.g., for "/path/to/package/module" try to match with
  "path.to.package.module", "to.package.module", "package.module" and
  "module".
* Ignore trailing "/__init__.py".
* Ignore trailing ".pyw" on Windows.
* Keep matching with the full filename (without optional ".py" extension)
  for compatibility.
* Only ignore the case of the ".py" extension on Windows.

8 days agogh-139353: Add Objects/unicode_writer.c file (#139911)
Victor Stinner [Thu, 30 Oct 2025 13:36:15 +0000 (14:36 +0100)] 
gh-139353: Add Objects/unicode_writer.c file (#139911)

Move the public PyUnicodeWriter API and the private _PyUnicodeWriter
API to a new Objects/unicode_writer.c file.

Rename a few helper functions to share them between unicodeobject.c
and unicode_writer.c, such as resize_compact() or unicode_result().

8 days agogh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749)
Petr Viktorin [Thu, 30 Oct 2025 11:14:17 +0000 (12:14 +0100)] 
gh-140748: socket_helper.transient_internet: Unwrap UrlError.__cause__ (GH-140749)

8 days agogh-139188: Remove `Tools/tz/zdump.py` script (GH-139189)
Stan Ulbrych [Thu, 30 Oct 2025 11:12:45 +0000 (11:12 +0000)] 
gh-139188: Remove `Tools/tz/zdump.py` script (GH-139189)

8 days agogh-140481: Improve error message when trying to iterate a Tk widget, image or font...
Serhiy Storchaka [Thu, 30 Oct 2025 11:11:56 +0000 (13:11 +0200)] 
gh-140481: Improve error message when trying to iterate a Tk widget, image or font (GH-140501)

8 days agogh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642)
Serhiy Storchaka [Thu, 30 Oct 2025 11:00:42 +0000 (13:00 +0200)] 
gh-131927: Do not emit PEP 765 warnings in ast.parse() (GH-139642)

ast.parse() no longer emits syntax warnings for
return/break/continue in finally (see PEP-765) -- they are only
emitted during compilation.

8 days agogh-131885: Update unicodedata function signatures to use `/` (#140270)
Stan Ulbrych [Thu, 30 Oct 2025 10:54:03 +0000 (10:54 +0000)] 
gh-131885: Update unicodedata function signatures to use `/` (#140270)

8 days agogh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra...
Serhiy Storchaka [Thu, 30 Oct 2025 10:52:02 +0000 (12:52 +0200)] 
gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511)

8 days agogh-139198: Remove `Tools/scripts/checkpip.py` script (GH-139199)
Stan Ulbrych [Thu, 30 Oct 2025 10:50:16 +0000 (10:50 +0000)] 
gh-139198: Remove `Tools/scripts/checkpip.py` script (GH-139199)

Commit

8 days agogh-137821: Improve Argument Clinic definitions in the ``_json`` module (#140780)
Donghee Na [Thu, 30 Oct 2025 10:32:08 +0000 (19:32 +0900)] 
gh-137821: Improve Argument Clinic definitions in the ``_json`` module (#140780)

8 days agogh-129117: Add unicodedata.isxidstart() function (#140269)
Stan Ulbrych [Thu, 30 Oct 2025 10:18:12 +0000 (10:18 +0000)] 
gh-129117: Add unicodedata.isxidstart() function (#140269)

Expose `_PyUnicode_IsXidContinue/Start` in `unicodedata`:
add isxidstart() and isxidcontinue() functions.

Co-authored-by: Victor Stinner <vstinner@python.org>
8 days agogh-137821: Convert _json module to use Argument Clinic (gh-140778)
Yoonho Hann [Thu, 30 Oct 2025 09:42:09 +0000 (18:42 +0900)] 
gh-137821: Convert _json module to use Argument Clinic (gh-140778)

9 days agogh-120057: add `os.reload_environ` to `__all__` (#140763)
Guo Ci [Wed, 29 Oct 2025 21:21:26 +0000 (17:21 -0400)] 
gh-120057: add `os.reload_environ` to `__all__` (#140763)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
9 days agogh-140741: Fix test added in gh-140745 (#140760)
Stan Ulbrych [Wed, 29 Oct 2025 16:10:58 +0000 (16:10 +0000)] 
gh-140741: Fix test added in gh-140745 (#140760)

Commit

9 days agogh-140576: Fixed crash produced by lexer in case of dedented zero byte (#140583)
Mikhail Efimov [Wed, 29 Oct 2025 13:27:35 +0000 (16:27 +0300)] 
gh-140576: Fixed crash produced by lexer in case of dedented zero byte (#140583)

9 days agogh-140082: Forward colorizing from libregrtest to unittest (#140083)
Cody Maloney [Wed, 29 Oct 2025 12:33:44 +0000 (05:33 -0700)] 
gh-140082: Forward colorizing from libregrtest to unittest (#140083)

libregrtest redirects test output to a file as part of its operation.
When `unittest` checks to see if it should colorize with
`isatty(sys.stdout)` that fails resulting in no colorizing of the
unittest output.

Update `libregrtest` to set `FORCE_COLOR=1` when redirecting test output
so that unittest will do color printing.

Co-authored-by: Victor Stinner <vstinner@python.org>
9 days agogh-140702: Log color and GHA env vars in test.pythoninfo (#140747)
Victor Stinner [Wed, 29 Oct 2025 12:29:10 +0000 (13:29 +0100)] 
gh-140702: Log color and GHA env vars in test.pythoninfo (#140747)

9 days agogh-140741: Fix `profiling.sampling` handling of error raised by target (#140745)
Stan Ulbrych [Wed, 29 Oct 2025 11:38:28 +0000 (11:38 +0000)] 
gh-140741: Fix `profiling.sampling` handling of error raised by target (#140745)

9 days agogh-140551: Fix `dict` crash if `clear` is called at `lookup` stage (#140558)
Mikhail Efimov [Wed, 29 Oct 2025 09:06:23 +0000 (12:06 +0300)] 
gh-140551: Fix `dict` crash if `clear` is called at `lookup` stage (#140558)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
9 days agogh-140702: Add test skip for Unix Datagram tests on iOS when on Github Actions (...
Russell Keith-Magee [Wed, 29 Oct 2025 08:33:04 +0000 (16:33 +0800)] 
gh-140702: Add test skip for Unix Datagram tests on iOS when on Github Actions (#140740)

Exposes the GITHUB_ACTIONS environment variable to iOS simulator test runs, and
uses this variable to skip a Unix Datagram socketserver test that is unreliable
in the iOS GitHub Actions environment.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 days agogh-139940: Handle RuntimeError when attaching to a non-existing process in pdb. ...
Frost Ming [Wed, 29 Oct 2025 06:12:12 +0000 (14:12 +0800)] 
gh-139940: Handle RuntimeError when attaching to a non-existing process in pdb. (#139941)

9 days agogh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (#140377)
tconley1428 [Wed, 29 Oct 2025 06:06:22 +0000 (23:06 -0700)] 
gh-140228: Avoid making unnecessary syscalls in linecache for frozen modules (#140377)

10 days agogh-139588: Increase maximum LaTeX list depth (#140709)
Maciej Olko [Tue, 28 Oct 2025 19:56:23 +0000 (20:56 +0100)] 
gh-139588: Increase maximum LaTeX list depth (#140709)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
10 days agogh-140657: Don't rerun test_import single phase init test (GH-140712)
Victor Stinner [Tue, 28 Oct 2025 17:05:03 +0000 (18:05 +0100)] 
gh-140657: Don't rerun test_import single phase init test (GH-140712)

test_basic_multiple_interpreters_main_no_reset() leaks memory:
import_in_subinterp() is called with postcleanup=False.

10 days agogh-125434: Fix non-ASCII thread names in faulthandler on Windows (#140700)
Victor Stinner [Tue, 28 Oct 2025 13:41:51 +0000 (14:41 +0100)] 
gh-125434: Fix non-ASCII thread names in faulthandler on Windows (#140700)

Add _Py_DumpWideString() function to dump a wide string as ASCII. It
supports surrogate pairs.

Replace _Py_EncodeLocaleRaw() with _Py_DumpWideString()
in write_thread_name().

10 days agogh-140544: Always assume that thread locals are available (GH-140690)
Peter Bierma [Tue, 28 Oct 2025 13:07:19 +0000 (09:07 -0400)] 
gh-140544: Always assume that thread locals are available (GH-140690)

Python has required thread local support since 3.12 (see GH-103324). By assuming that thread locals are always supported, we can improve the performance of third-party extensions by allowing them to access the attached thread and interpreter states directly.

10 days agogh-139951: Tests on tuple GC tracking (#140575)
Mikhail Efimov [Tue, 28 Oct 2025 09:55:41 +0000 (12:55 +0300)] 
gh-139951: Tests on tuple GC tracking (#140575)

10 days agoGH-140590: Fix setstate for functools.partial C-module (GH-140671)
Sergey Miryanov [Tue, 28 Oct 2025 09:28:32 +0000 (14:28 +0500)] 
GH-140590: Fix setstate for functools.partial C-module (GH-140671)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
10 days agogh-140189: Add CI job to test iOS builds. (#140190)
Russell Keith-Magee [Tue, 28 Oct 2025 05:46:38 +0000 (13:46 +0800)] 
gh-140189: Add CI job to test iOS builds. (#140190)

Adds a CI configuration to test iOS builds on every build.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
11 days agogh-140544: fix build for including `pycore_pystate.h` when `HAVE_THREAD_LOCAL` is... 140694/head
Kumar Aditya [Mon, 27 Oct 2025 20:10:41 +0000 (01:40 +0530)] 
gh-140544: fix build for including `pycore_pystate.h` when `HAVE_THREAD_LOCAL` is not defined (#140623)

11 days agogh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667)
Serhiy Storchaka [Mon, 27 Oct 2025 19:42:32 +0000 (21:42 +0200)] 
gh-140634: Fix a reference counting bug in os.sched_param.__reduce__() (GH-140667)

11 days agogh-140104: Set next_instr properly in the JIT during exceptions (GH-140233)
Ken Jin [Mon, 27 Oct 2025 18:26:47 +0000 (02:26 +0800)] 
gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
11 days agogh-140607: Validate returned byte count in RawIOBase.read (#140611)
Cody Maloney [Mon, 27 Oct 2025 18:06:46 +0000 (11:06 -0700)] 
gh-140607: Validate returned byte count in RawIOBase.read (#140611)

While `RawIOBase.readinto` should return a count of bytes between 0 and
the length of the given buffer, it is not required to. Add validation
inside RawIOBase.read() that the returned byte count is valid.

Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
11 days agogh-125434: Display thread name in faulthandler on Windows (#140675)
Victor Stinner [Mon, 27 Oct 2025 17:41:18 +0000 (18:41 +0100)] 
gh-125434: Display thread name in faulthandler on Windows (#140675)

11 days agogh-138050: [WIP] JIT - Streamline MAKE_WARM - move coldness check to executor creatio...
alm [Mon, 27 Oct 2025 16:37:37 +0000 (18:37 +0200)] 
gh-138050: [WIP] JIT - Streamline MAKE_WARM - move coldness check to executor creation (GH-138240)

11 days agogh-79922: Remove always false test skips in `test_time` (#136202)
Stan Ulbrych [Mon, 27 Oct 2025 15:09:25 +0000 (15:09 +0000)] 
gh-79922: Remove always false test skips in `test_time` (#136202)

11 days agogh-116738: Use PyMutex for bz2 module (gh-140555)
Alper [Mon, 27 Oct 2025 13:52:30 +0000 (06:52 -0700)] 
gh-116738: Use PyMutex for bz2 module (gh-140555)

The methods are already wrapped with a lock, which makes them thread-safe in
free-threaded build. This replaces `PyThread_acquire_lock` with `PyMutex` and
removes some macros and allocation handling code.

Also add a test for free-threading to ensure we aren't getting data races and
that the locking is working.

11 days agogh-140641: Break out of inittab search on match (GH-140642)
Itamar Oren [Mon, 27 Oct 2025 13:18:58 +0000 (06:18 -0700)] 
gh-140641: Break out of inittab search on match (GH-140642)

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"

2 weeks 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