]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 months agogh-138205: Remove the `resize` method on `mmap` object on platforms don't support...
AN Long [Sat, 6 Sep 2025 08:40:04 +0000 (17:40 +0900)] 
gh-138205: Remove the `resize` method on `mmap` object on platforms don't support it (#138276)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-116738: make `cProfile` module thread-safe (#138229)
Alper [Sat, 6 Sep 2025 07:49:14 +0000 (00:49 -0700)] 
gh-116738: make `cProfile` module thread-safe (#138229)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agogh-137706: make typing._is_unpacked_typevartuple check for `True` instead of truthy...
David Ellis [Sat, 6 Sep 2025 07:39:49 +0000 (08:39 +0100)] 
gh-137706: make typing._is_unpacked_typevartuple check for `True` instead of truthy (#137712)

2 months agoGH-95952: Require setting `HOSTRUNNER` when cross compiling for WASI (#138203)
Brett Cannon [Fri, 5 Sep 2025 22:48:16 +0000 (15:48 -0700)] 
GH-95952: Require setting `HOSTRUNNER` when cross compiling for WASI (#138203)

macOS by default doesn't have the requisite CLI tools to make a default value easy. Plus Tools/wasm/wasi takes care of setting HOSTRUNNER.

2 months agogh-93334: Fix homonym edge case in PathFinder.find_spec() (GH-98100)
Jacob Walls [Fri, 5 Sep 2025 22:41:01 +0000 (18:41 -0400)] 
gh-93334: Fix homonym edge case in PathFinder.find_spec() (GH-98100)

2 months agogh-137985: Correct description of Formatter's datefmt param in logging documentation...
W. H. Wang [Fri, 5 Sep 2025 21:07:04 +0000 (05:07 +0800)] 
gh-137985: Correct description of Formatter's datefmt param in logging documentation (GH-138530)

2 months agogh-138010: Fix `__init_subclass__` forwarding by `warnings.deprecated` (#138210)
Brian Schubert [Fri, 5 Sep 2025 20:44:50 +0000 (16:44 -0400)] 
gh-138010: Fix `__init_subclass__` forwarding by `warnings.deprecated` (#138210)

2 months agoGH-138465: Improve documentation for common sequence methods (#138474)
Adam Turner [Fri, 5 Sep 2025 19:55:02 +0000 (20:55 +0100)] 
GH-138465: Improve documentation for common sequence methods (#138474)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 months agogh-138191: Document ``frame.f_generator`` in the data model (#138540)
dbXD320 [Fri, 5 Sep 2025 17:07:29 +0000 (22:37 +0530)] 
gh-138191: Document ``frame.f_generator`` in the data model (#138540)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agogh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502)
Serhiy Storchaka [Fri, 5 Sep 2025 15:58:42 +0000 (18:58 +0300)] 
gh-88375, gh-111788: Fix parsing errors and normalization in robotparser (GH-138502)

* Don't fail trying to parse weird patterns.
* Don't fail trying to decode non-UTF-8 "robots.txt" files.
* No longer ignore trailing "?" in patterns and URLs.
* Distinguish raw special characters "?", "=" and "&" from the
  percent-encoded ones.
* Remove tests that do nothing.

2 months agogh-83424: Allow empty name if handle is non-null when create ctypes.CDLL on Windows...
AN Long [Fri, 5 Sep 2025 15:51:35 +0000 (00:51 +0900)] 
gh-83424: Allow empty name if handle is non-null when create ctypes.CDLL on Windows (GH-136878)

2 months agoannotationlib: add note on security to docs (#138508)
Jelle Zijlstra [Fri, 5 Sep 2025 15:26:58 +0000 (08:26 -0700)] 
annotationlib: add note on security to docs (#138508)

2 months agogh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)
Petr Viktorin [Fri, 5 Sep 2025 14:23:18 +0000 (16:23 +0200)] 
gh-137210: Add a struct, slot & function for checking an extension's ABI (GH-137212)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2 months agogh-57911: Sanitize symlink targets in tarfile on win32 (GH-138309)
Christoph Walcher [Fri, 5 Sep 2025 14:19:47 +0000 (16:19 +0200)] 
gh-57911: Sanitize symlink targets in tarfile on win32 (GH-138309)

2 months agogh-131178: Fix `test_unknown_flag` for platform CLI (#137816)
Semyon Moroz [Fri, 5 Sep 2025 11:29:46 +0000 (11:29 +0000)] 
gh-131178: Fix `test_unknown_flag` for platform CLI (#137816)

2 months agogh-138401: Check arg count>=0 in os.sendfile() (#138403)
Christoph Walcher [Fri, 5 Sep 2025 09:16:55 +0000 (11:16 +0200)] 
gh-138401: Check arg count>=0 in os.sendfile() (#138403)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agogh-138515: Include email module in Emscripten build (gh-138520)
Gyeongjae Choi [Fri, 5 Sep 2025 08:34:18 +0000 (16:34 +0800)] 
gh-138515: Include email module in Emscripten build (gh-138520)

2 months agogh-107194: Improved language of list.index in tutorial (gh-138518)
Ric [Fri, 5 Sep 2025 07:16:04 +0000 (15:16 +0800)] 
gh-107194: Improved language of list.index in tutorial (gh-138518)

2 months agogh-138516: fix typo in OrderedDict exception msg (#138517)
asas1asas200 [Fri, 5 Sep 2025 06:48:05 +0000 (14:48 +0800)] 
gh-138516: fix typo in OrderedDict exception msg (#138517)

2 months agodocs: add module-level `versionadded` for `annotationlib` (#138511)
Brian Schubert [Thu, 4 Sep 2025 20:45:21 +0000 (16:45 -0400)] 
docs: add module-level `versionadded` for `annotationlib` (#138511)

2 months agogh-138192: Fix Context initialization so that all subinterpreters are assigned the...
Donghee Na [Thu, 4 Sep 2025 17:19:30 +0000 (02:19 +0900)] 
gh-138192: Fix Context initialization so that all subinterpreters are assigned the MISSING value. (gh-138503)

---------

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 months agogh-87595: Fix the docs for mmap.size() (#138494)
Zackery Spytz [Thu, 4 Sep 2025 15:52:24 +0000 (08:52 -0700)] 
gh-87595: Fix the docs for mmap.size() (#138494)

Correct some parts of the docs added in 32032ee376 that weren't
written by me.

2 months agoAdd random_derangement recipe gh-138377
Raymond Hettinger [Thu, 4 Sep 2025 15:50:29 +0000 (10:50 -0500)] 
Add random_derangement recipe gh-138377

2 months agoDocs: Fix typo in `os.fwalk()` example (GH-138486)
William Andrea [Thu, 4 Sep 2025 12:33:51 +0000 (09:33 -0300)] 
Docs: Fix typo in `os.fwalk()` example (GH-138486)

2 months agogh-136599: Improve long_hash() (#136600)
Pieter Eendebak [Thu, 4 Sep 2025 12:27:26 +0000 (14:27 +0200)] 
gh-136599: Improve long_hash() (#136600)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 months agogh-132657: improve `deepcopy` and `copy` scaling on free-threading (#138429)
Pieter Eendebak [Thu, 4 Sep 2025 07:50:23 +0000 (09:50 +0200)] 
gh-132657: improve `deepcopy` and `copy` scaling on free-threading (#138429)

2 months agogh-138281: Remove unused `topsort` and bump minimal version in `peg_generator` (...
sobolevn [Wed, 3 Sep 2025 23:27:14 +0000 (02:27 +0300)] 
gh-138281: Remove unused `topsort` and bump minimal version in `peg_generator` (#138487)

2 months agogh-95844: Move help_url code to a help module function (#129971)
Stan Ulbrych [Wed, 3 Sep 2025 21:27:12 +0000 (22:27 +0100)] 
gh-95844: Move help_url code to a help module function (#129971)

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 months agoGH-101100: Resolve reference warnings in whatsnew/3.10.rst (#138408)
Adam Turner [Wed, 3 Sep 2025 20:48:39 +0000 (21:48 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.10.rst (#138408)

2 months agoFix Windows path in `venv` docs (GH-138476)
Zachary Ware [Wed, 3 Sep 2025 20:15:47 +0000 (15:15 -0500)] 
Fix Windows path in `venv` docs (GH-138476)

2 months agogh-72249: Correct wording of GH-101910 blurb (GH-138468)
Zachary Ware [Wed, 3 Sep 2025 18:19:54 +0000 (13:19 -0500)] 
gh-72249: Correct wording of GH-101910 blurb (GH-138468)

This incidentally corrects a reST issue reported by Daniel Nylander from the Swedish translation.

2 months agogh-138431: JIT Optimizer --- Fix round-tripping references for str and tuple (GH...
Ken Jin [Wed, 3 Sep 2025 18:05:06 +0000 (02:05 +0800)] 
gh-138431: JIT Optimizer --- Fix round-tripping references for str and tuple (GH-138458)

Co-authored-by: Mark Shannon <9448417+markshannon@users.noreply.github.com>
2 months agogh-138281: Run `ruff` on `Tools/peg_generator` (#138282)
sobolevn [Wed, 3 Sep 2025 17:45:29 +0000 (20:45 +0300)] 
gh-138281: Run `ruff` on `Tools/peg_generator` (#138282)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agoGH-101100: Resolve reference warnings in using/windows.rst (#138416)
Adam Turner [Wed, 3 Sep 2025 16:18:21 +0000 (17:18 +0100)] 
GH-101100: Resolve reference warnings in using/windows.rst (#138416)

2 months agoGH-101100: Resolve reference warnings in whatsnew/3.5.rst (#138412)
Adam Turner [Wed, 3 Sep 2025 15:38:05 +0000 (16:38 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.5.rst (#138412)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agogh-135676: Reword the Operators & Delimiters section(s) (GH-137713)
Petr Viktorin [Wed, 3 Sep 2025 15:29:15 +0000 (17:29 +0200)] 
gh-135676: Reword the Operators & Delimiters section(s) (GH-137713)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agoGH-101100: Resolve reference warnings in whatsnew/3.6.rst (#138411)
Adam Turner [Wed, 3 Sep 2025 15:22:17 +0000 (16:22 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.6.rst (#138411)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agogh-137136: Suppress build warnings when build on Windows with --experimental-jit...
AN Long [Wed, 3 Sep 2025 14:42:26 +0000 (23:42 +0900)] 
gh-137136: Suppress build warnings when build on Windows with --experimental-jit-interpreter (GH-137137)

2 months agogh-91214: Skip tests failing on Solaris (GH-31978)
Jakub Kulík [Wed, 3 Sep 2025 14:00:53 +0000 (16:00 +0200)] 
gh-91214: Skip tests failing on Solaris (GH-31978)

2 months agoGH-101100: Resolve reference warnings in extending/extending.rst (#138417)
Adam Turner [Wed, 3 Sep 2025 13:00:50 +0000 (14:00 +0100)] 
GH-101100: Resolve reference warnings in extending/extending.rst (#138417)

2 months agoDocs: Fix typo in test.support.linked_to_musl function name (#138406)
Marc Mueller [Wed, 3 Sep 2025 12:52:13 +0000 (14:52 +0200)] 
Docs: Fix typo in test.support.linked_to_musl function name (#138406)

2 months agogh-60462: Fix locale.strxfrm() on Solaris (GH-138242)
Serhiy Storchaka [Wed, 3 Sep 2025 12:49:28 +0000 (15:49 +0300)] 
gh-60462: Fix locale.strxfrm() on Solaris (GH-138242)

It should interpret the result of wcsxfrm() as a sequence of abstract
integers, not a sequence of Unicode code points or using other encoding
scheme that does not preserve ordering.

2 months agoGH-101100: Resolve reference warnings in whatsnew/3.4.rst (#138413)
Adam Turner [Wed, 3 Sep 2025 12:01:16 +0000 (13:01 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.4.rst (#138413)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agoGH-119169: Slightly speed up `os.walk(topdown=True)` (GH-121431)
Barney Gale [Wed, 3 Sep 2025 11:57:01 +0000 (12:57 +0100)] 
GH-119169: Slightly speed up `os.walk(topdown=True)` (GH-121431)

GH-119186: Slightly speed up `os.walk(topdown=True)`

When `os.walk()` traverses into subdirectories in top-down mode, call
`os.path.join()` once to add a trailing slash, and use string concatenation
thereafter to generate child paths.

2 months agoGH-101100: Resolve reference warnings in whatsnew/2.7.rst (#138415)
Adam Turner [Wed, 3 Sep 2025 11:33:13 +0000 (12:33 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/2.7.rst (#138415)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agogh-138307: Update the Ellipsis documentation (#138306)
Adorilson Bezerra [Wed, 3 Sep 2025 11:27:22 +0000 (12:27 +0100)] 
gh-138307: Update the Ellipsis documentation (#138306)

* Doc: Change Ellipsis doc at library/constants

* Doc: Change Ellipsis doc at library/stdtypes

* Doc: Add NumPy reference into Ellipsis doc at library/stdtypes

* Doc: Add Ellipsis reference into the pass statement section at tutorial

* Doc: Update Ellipsis doc concerns assignments at library/constants

* Update Doc/library/stdtypes.rst

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* Doc: Fix grammar on Ellipsis docs (library/constants.rst)

Co-authored-by: Éric <merwok@netwok.org>
* Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst)

Co-authored-by: Éric <merwok@netwok.org>
* Doc: Fix grammar on Ellipsis docs (library/stdtypes.rst)

Co-authored-by: Éric <merwok@netwok.org>
* Doc: Remove pretty printers reference from Ellipsis doc at library/stdtypes

* Doc: Update index concerns Ellipsis object and pass statement

* Doc: Improve Ellipsis doc at library/constants

* Doc: Improve Ellipsis doc at library/stdtypes

* Doc: Change the "..." glossary entry to mention the Ellipsis object

* Doc: Some improvements concern ellipsis into typing doc

* Minor update Doc/tutorial/controlflow.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* Update Doc/library/constants.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* Update Doc/library/stdtypes.rst

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
---------

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2 months agoGH-101100: Resolve reference warnings in whatsnew/3.8.rst (#138409)
Adam Turner [Wed, 3 Sep 2025 11:24:42 +0000 (12:24 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.8.rst (#138409)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 months agoGH-101100: Resolve reference warnings in whatsnew/3.3.rst (#138414)
Adam Turner [Wed, 3 Sep 2025 11:20:43 +0000 (12:20 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.3.rst (#138414)

2 months agoGH-123299: Copyedit 3.14 What's New: Move and consolidate Porting (#138400)
Adam Turner [Wed, 3 Sep 2025 11:10:12 +0000 (12:10 +0100)] 
GH-123299: Copyedit 3.14 What's New: Move and consolidate Porting (#138400)

2 months agogh-138013: Remove `test_io` load_tests namespace manipulation (#138366)
Cody Maloney [Wed, 3 Sep 2025 09:49:59 +0000 (02:49 -0700)] 
gh-138013: Remove `test_io` load_tests namespace manipulation (#138366)

Reduce what happens in `load_tests` so that the next change,
moving the `Buffered*` tests to `test_bufferdio` is purely mechanical
movement and updating imports.

This adds two classes, one per I/O implementation, to act as dispatch to
the implementation-specific mocks as well as module members. Previously
the mappings CTestCase and PyTestCase provide were injected directly
during `load_tests`.

CTestCase and PyTestCase inherit from `unittest.TestCase` so when the
split happens default test discovery will work for the classes in
`test_bufferedio`. `test_general` keeps a manual test list for this
refactoring; some of the tests (ex. `ProtocolsTest`) aren't currently
run and fixing that + helpers to not be picked up is out of my current
scope.

CTestCase and PyTestCase have an `io` class member which points to the
implementation meaning that can be removed from individual test cases
which now inherit from them.

This code is picking up `MockRawIO` which is defined globally in the
module but these should use the mock specific to the I/O implementation
being tested.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-138013: Move I/O tests to test_io (#138365)
Cody Maloney [Wed, 3 Sep 2025 09:37:06 +0000 (02:37 -0700)] 
gh-138013: Move I/O tests to test_io (#138365)

Centralize `io` tests into the `test_io` module so they are easier to
find and work on. This will make it easier to split `test_general` which
takes 30+ seconds in a debug build on my machine.

This renames `test_bufio` to be `test_bufferedio` so that it matches
the implementation file name (`bufferedio.c`).

Validation performed:
Tests are run in parallel after change:

```bash
./python.exe -m test test_io  -uall,largefile,extralargefile -M12G -j8
```

Docstring reformat in `test_io/__init__.py` looks reasonable:

```python
>>> import test.test_io
>>> help(test.test_io)
```

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agogh-78502: Add a trackfd parameter to mmap.mmap() on Windows (GH-138238)
Serhiy Storchaka [Wed, 3 Sep 2025 08:31:34 +0000 (11:31 +0300)] 
gh-78502: Add a trackfd parameter to mmap.mmap() on Windows (GH-138238)

If trackfd is False, the file handle corresponding to fileno
will not be duplicated.

2 months agogh-138264: Fix gcc 14 compiler warnings (GH-138265)
Serhiy Storchaka [Wed, 3 Sep 2025 08:26:56 +0000 (11:26 +0300)] 
gh-138264: Fix gcc 14 compiler warnings (GH-138265)

2 months agogh-116946: fully implement GC protocol for `_curses_panel.panel` (#138333)
Bénédikt Tran [Wed, 3 Sep 2025 08:17:17 +0000 (10:17 +0200)] 
gh-116946: fully implement GC protocol for `_curses_panel.panel` (#138333)

This commit fixes possible reference loops via `panel.set_userptr`
by implementing `tp_clear` and `tp_traverse` for panel objects.

2 months agogh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to `_random.Random` (#138341)
Bénédikt Tran [Wed, 3 Sep 2025 07:55:53 +0000 (09:55 +0200)] 
gh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to `_random.Random` (#138341)

2 months agoGH-101100: Resolve reference warnings in whatsnew/3.7.rst (#138410)
Adam Turner [Wed, 3 Sep 2025 06:20:16 +0000 (07:20 +0100)] 
GH-101100: Resolve reference warnings in whatsnew/3.7.rst (#138410)

Resolve reference warnings in whatsnew/3.7.rst

2 months agogh-101100: Resolve reference warnings in library/xml.sax.handler.rst (#136612)
Weilin Du [Wed, 3 Sep 2025 00:35:21 +0000 (08:35 +0800)] 
gh-101100: Resolve reference warnings in library/xml.sax.handler.rst (#136612)

2 months agoGH-135763: AC: Use ``Py_ssize_t(allow_negative=False)`` (#138394)
Adam Turner [Tue, 2 Sep 2025 20:29:05 +0000 (22:29 +0200)] 
GH-135763: AC: Use ``Py_ssize_t(allow_negative=False)`` (#138394)

2 months agogh-87595: Support mmap.size() for anonymous mapping on Unix (GH-24781)
Zackery Spytz [Tue, 2 Sep 2025 20:24:06 +0000 (13:24 -0700)] 
gh-87595: Support mmap.size() for anonymous mapping on Unix (GH-24781)

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

Also, raise ValueError instead of OSError for trackfd=False.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 months agoDoc: Track file downloads via plausible (#138393)
Jacob Coffee [Tue, 2 Sep 2025 19:02:00 +0000 (15:02 -0400)] 
Doc: Track file downloads via plausible (#138393)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agogh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to `select.poll` and `select.epoll` (#138340)
Bénédikt Tran [Tue, 2 Sep 2025 17:53:44 +0000 (19:53 +0200)] 
gh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to `select.poll` and `select.epoll` (#138340)

2 months agogh-138372: Fix SyntaxWarning for erroneous t-string subscription (#138375)
Brian Schubert [Tue, 2 Sep 2025 17:13:12 +0000 (13:13 -0400)] 
gh-138372: Fix SyntaxWarning for erroneous t-string subscription (#138375)

2 months agogh-138314: Add winreg.DeleteTree (GH-138388)
AN Long [Tue, 2 Sep 2025 17:04:57 +0000 (02:04 +0900)] 
gh-138314: Add winreg.DeleteTree (GH-138388)

2 months agogh-138122: Use ``profiling.sampling`` in the documentation (PEP 799) (#138389)
Adam Turner [Tue, 2 Sep 2025 16:45:00 +0000 (18:45 +0200)] 
gh-138122: Use ``profiling.sampling`` in the documentation (PEP 799) (#138389)

2 months agogh-136599: Add tests for long_hash (#138335)
Pieter Eendebak [Tue, 2 Sep 2025 16:42:12 +0000 (18:42 +0200)] 
gh-136599: Add tests for long_hash (#138335)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 months agogh-138204: Forbid expansion of a shared anonymous mmap on Linux (GH-138220)
Serhiy Storchaka [Tue, 2 Sep 2025 16:00:39 +0000 (19:00 +0300)] 
gh-138204: Forbid expansion of a shared anonymous mmap on Linux (GH-138220)

This is a Linux kernel bug which caused a bus error.
https://bugzilla.kernel.org/show_bug.cgi?id=8691

2 months agogh-138004: Fix setting a thread name on OpenIndiana (GH-138017)
jadonduff [Tue, 2 Sep 2025 15:26:25 +0000 (11:26 -0400)] 
gh-138004: Fix setting a thread name on OpenIndiana (GH-138017)

Encode Solaris/Illumos thread names to ASCII, since
OpenIndiana does not support non-ASCII names.

Add tests for setting non-ASCII name for the main thread.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 months agogh-138297 Point link in docs for `finally` to try/else, instead of if/else (#138298)
James Parrott [Tue, 2 Sep 2025 14:56:23 +0000 (15:56 +0100)] 
gh-138297 Point link in docs for `finally` to try/else, instead of if/else (#138298)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2 months agogh-127647: Fix and enable I/O protocol tests (#138369)
Sebastian Rittau [Tue, 2 Sep 2025 13:45:29 +0000 (15:45 +0200)] 
gh-127647: Fix and enable I/O protocol tests (#138369)

2 months agogh-133158: Adjust c-analyzer `max_sizes` for `typeobject.c` (GH-133159)
Sergey Miryanov [Tue, 2 Sep 2025 13:34:22 +0000 (06:34 -0700)] 
gh-133158: Adjust c-analyzer `max_sizes` for `typeobject.c` (GH-133159)

This also improves the error message for when a file is too large.

2 months agogh-110936: Reorder string literal definition in Lexical Analysis (GH-138063)
Stan Ulbrych [Tue, 2 Sep 2025 11:48:26 +0000 (12:48 +0100)] 
gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063)

3 months agogh-138253: Fix compatibility of sub-interpreters queues with queue.Queue (GH-138256)
Serhiy Storchaka [Tue, 2 Sep 2025 05:59:20 +0000 (08:59 +0300)] 
gh-138253: Fix compatibility of sub-interpreters queues with queue.Queue (GH-138256)

Add the block parameter in the put() and get() methods of
the concurrent.interpreters queues for compatibility with the
queue.Queue interface.

3 months agogh-61206: Support zstandard compression in the zipimport module (GH-138254)
Gregory P. Smith [Tue, 2 Sep 2025 00:14:23 +0000 (17:14 -0700)] 
gh-61206: Support zstandard compression in the zipimport module (GH-138254)

* gh-61206: support zstd in zipimport

* NEWS entry

* versionchanged doc

3 months agogh-135763: AC: Implement ``allow_negative`` for ``Py_ssize_t`` (#138150)
Christoph Walcher [Mon, 1 Sep 2025 21:55:22 +0000 (23:55 +0200)] 
gh-135763: AC: Implement ``allow_negative`` for ``Py_ssize_t`` (#138150)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 months agogh-138360: Fix `test_free_threading` for IO objects (#138359)
Andrey [Mon, 1 Sep 2025 19:53:13 +0000 (21:53 +0200)] 
gh-138360: Fix `test_free_threading` for IO objects (#138359)

Fix typo in test_io.py

3 months agogh-135755: Make Py_MAX_SCRIPT_PATH_SIZE private (#138350)
Victor Stinner [Mon, 1 Sep 2025 19:01:01 +0000 (21:01 +0200)] 
gh-135755: Make Py_MAX_SCRIPT_PATH_SIZE private (#138350)

3 months agogh-89905: Correct `-R` option doc (#137608)
Stan Ulbrych [Mon, 1 Sep 2025 17:58:25 +0000 (18:58 +0100)] 
gh-89905: Correct `-R` option doc (#137608)

3 months agogh-138302: Specialize int ops only if ints are compact (GH-138347)
Tapeline [Mon, 1 Sep 2025 17:33:15 +0000 (22:33 +0500)] 
gh-138302: Specialize int ops only if ints are compact (GH-138347)

3 months agogh-90548: Fix musl version detection with --strip-all (#137864)
Marc Mueller [Mon, 1 Sep 2025 16:58:45 +0000 (18:58 +0200)] 
gh-90548: Fix musl version detection with --strip-all (#137864)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 months agogh-138342: Use a common utility for visiting an object's type (GH-138343)
Peter Bierma [Mon, 1 Sep 2025 16:20:33 +0000 (12:20 -0400)] 
gh-138342: Use a common utility for visiting an object's type (GH-138343)

Add `_PyObject_VisitType` in place of `tp_traverse` functions that only visit the object's type.

3 months agogh-116738: Fix `test_json_mutating_exact_dict` (#138339)
Pieter Eendebak [Mon, 1 Sep 2025 16:14:19 +0000 (18:14 +0200)] 
gh-116738: Fix `test_json_mutating_exact_dict` (#138339)

Fix test_json_mutating_exact_dic

3 months agogh-54874: Expand unicodedata module documentation (#138301)
Stan Ulbrych [Mon, 1 Sep 2025 15:50:31 +0000 (16:50 +0100)] 
gh-54874: Expand unicodedata module documentation (#138301)

Closes #54874

Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>
3 months agogh-116946: Revert GC protocol for immutable empty heap types (GH-138266, GH-138288...
Bénédikt Tran [Mon, 1 Sep 2025 15:45:11 +0000 (17:45 +0200)] 
gh-116946: Revert GC protocol for immutable empty heap types (GH-138266, GH-138288, GH-138289) (#138338)

* Revert "gh-116946: fully implement GC protocol for `bz2` objects (#138266)"

This reverts commit 9be91f6a20ed2fd9b491c3e779dc45c7392f60ca.

* Revert "gh-116946: fully implement GC protocol for `lzma` objects (#138288)"

This reverts commit 3ea16f990f81e1e3b2892f1dfd213937b1df2a68.

* Revert "gh-116946: fully implement GC protocol for `_hashlib` objects (#138289)"

This reverts commit 6f1dd9551a69c8c76d066a04e94db6dbc6c7597c.

3 months agoReapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924...
Jason R. Coombs [Mon, 1 Sep 2025 15:27:01 +0000 (11:27 -0400)] 
Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924) (#137930)

* Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924)

This reverts commit 3706ef66eff2b9e24091dbe050f5dbc60785b481.

* Skip the triggering test on buildbots only.

3 months agogh-116946: fully implement GC protocol for `zlib` objects (#138290)
Bénédikt Tran [Mon, 1 Sep 2025 08:24:23 +0000 (10:24 +0200)] 
gh-116946: fully implement GC protocol for `zlib` objects (#138290)

3 months agogh-116946: fully implement GC protocol for `_hashlib` objects (#138289)
Bénédikt Tran [Mon, 1 Sep 2025 08:23:01 +0000 (10:23 +0200)] 
gh-116946: fully implement GC protocol for `_hashlib` objects (#138289)

3 months agogh-116946: fully implement GC protocol for `lzma` objects (#138288)
Bénédikt Tran [Mon, 1 Sep 2025 08:22:43 +0000 (10:22 +0200)] 
gh-116946: fully implement GC protocol for `lzma` objects (#138288)

3 months agogh-116946: fully implement GC protocol for `bz2` objects (#138266)
Bénédikt Tran [Mon, 1 Sep 2025 08:21:39 +0000 (10:21 +0200)] 
gh-116946: fully implement GC protocol for `bz2` objects (#138266)

3 months agogh-138130: Fix return value of libc_ver() on Emscripten (#138132)
Hood Chatham [Sun, 31 Aug 2025 22:50:29 +0000 (00:50 +0200)] 
gh-138130: Fix return value of libc_ver() on Emscripten (#138132)

Emscripten's libc is a hybrid of musl and llvm libc; but it reports that it is
"glibc". This modifies the return value of `platform.libc_ver()` to return
something that is Emscripten-specific.

3 months agogh-138286: Run ``ruff`` on ``Tools/i18n`` (#138287)
Stan Ulbrych [Sun, 31 Aug 2025 20:29:02 +0000 (21:29 +0100)] 
gh-138286: Run ``ruff`` on ``Tools/i18n`` (#138287)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
3 months agogh-138013: Make ``test.test_io`` into a package (#138153)
Cody Maloney [Sun, 31 Aug 2025 19:14:19 +0000 (12:14 -0700)] 
gh-138013: Make ``test.test_io`` into a package (#138153)

3 months agogh-138295: Fix a grammar issue in the descriptor HOWTO (GH-138296)
Fangyi Zhou [Sun, 31 Aug 2025 15:50:23 +0000 (16:50 +0100)] 
gh-138295: Fix a grammar issue in the descriptor HOWTO (GH-138296)

"an str" -> "a str"

3 months agogh-138279: Remove unused attr in RuleCollectorVisitor in parser_generator.py (#138280)
chemelnucfin [Sun, 31 Aug 2025 14:23:40 +0000 (07:23 -0700)] 
gh-138279: Remove unused attr in RuleCollectorVisitor in parser_generator.py (#138280)

3 months agogh-116738: Make `_json` module thread-safe in the free-threading (#119438)
Pieter Eendebak [Sun, 31 Aug 2025 04:12:45 +0000 (06:12 +0200)] 
gh-116738: Make `_json` module thread-safe in the free-threading (#119438)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
3 months agogh-133829: Remove some specifics from the ``zipimport`` example (#133835)
R Chintan Meher [Sun, 31 Aug 2025 00:50:56 +0000 (20:50 -0400)] 
gh-133829: Remove some specifics from the ``zipimport`` example (#133835)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
3 months agogh-138061: Exclude __pycache__ directory from the computed digest in the JIT stencil...
alm [Sat, 30 Aug 2025 21:21:25 +0000 (00:21 +0300)] 
gh-138061: Exclude __pycache__ directory  from the computed digest in the JIT stencils (#138131)

Exclude the __pycache__ directory when generating the digest in the JIT stencils

3 months agogh-132657: avoid locks and refcounting in `frozenset` lookups (#136107)
Pieter Eendebak [Sat, 30 Aug 2025 19:25:36 +0000 (21:25 +0200)] 
gh-132657: avoid locks and refcounting in `frozenset` lookups (#136107)

3 months agogh-138158: Use the `"data"` tarfile extraction filter in `Tools/ssl/multissltests...
Tommaso Bona [Sat, 30 Aug 2025 10:27:32 +0000 (12:27 +0200)] 
gh-138158: Use the `"data"` tarfile extraction filter in `Tools/ssl/multissltests.py` (#138147)

The `Tools/ssl/multissltests.py` script may extract a possibly untrusted tarball.
Since the script does not necessarily use Python 3.14 or later (where the `"data"`
filter became the default `tarfile` extraction filter), the user may theoretically
suffer from a path traversal attack.

Although the script should not be used in production and usually relies on downloading
trusted sources, the `"data"` extraction filter is now explicitly used wherever relevant.

3 months agogh-137197: Add `SSLContext.set_ciphersuites` to set TLSv1.3 ciphers (#137198)
Ron Frederick [Sat, 30 Aug 2025 09:32:11 +0000 (02:32 -0700)] 
gh-137197: Add `SSLContext.set_ciphersuites` to set TLSv1.3 ciphers (#137198)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 months agogh-138257: Fix internal `RuleCollectorVisitor` attribute name (#138208)
chemelnucfin [Sat, 30 Aug 2025 09:28:44 +0000 (02:28 -0700)] 
gh-138257: Fix internal `RuleCollectorVisitor` attribute name (#138208)

The internal `RuleCollectorVisitor` class had an attribute named "rulses"
instead of "rules" that other `GrammarVisitor` subclasses define.