]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
8 weeks agogh-138669: Increase test coverage for difflib (GH-138670)
Jan-Eric Nitschke [Fri, 12 Sep 2025 09:33:38 +0000 (11:33 +0200)] 
gh-138669: Increase test coverage for difflib (GH-138670)

8 weeks agogh-138801: re-enable `pyrepl` tests on Windows (#138802)
Chris Eibl [Fri, 12 Sep 2025 07:47:43 +0000 (09:47 +0200)] 
gh-138801: re-enable `pyrepl` tests on Windows (#138802)

8 weeks agoRemove unused prototype `_PyPegen_set_source_in_metadata` (#138810)
Christoph Walcher [Fri, 12 Sep 2025 00:40:49 +0000 (02:40 +0200)] 
Remove unused prototype `_PyPegen_set_source_in_metadata` (#138810)

Remove unused prototype

8 weeks agoRevert "gh-116946: fully implement GC protocol for `_tkinter.Tk{app,tt}Object` (...
Peter Bierma [Thu, 11 Sep 2025 21:05:37 +0000 (17:05 -0400)] 
Revert "gh-116946: fully implement GC protocol for `_tkinter.Tk{app,tt}Object` (#138331)" (#138807)

This reverts commit 283380a9417eebf1bf9d3a1e941cef94149712bb.

8 weeks agocloses gh-138706: update Unicode to 17.0.0 (#138719)
Benjamin Peterson [Thu, 11 Sep 2025 16:58:39 +0000 (09:58 -0700)] 
closes gh-138706: update Unicode to 17.0.0 (#138719)

8 weeks agogh-138005: Document that CSV `skipinitialspace=True` and `delimiter=' '` require...
Maurycy Pawłowski-Wieroński [Thu, 11 Sep 2025 15:11:33 +0000 (17:11 +0200)] 
gh-138005: Document that CSV `skipinitialspace=True` and `delimiter=' '` require quotation for empty fields (#138006)

8 weeks agogh-116738: add multi-threaded tests for `resource` module on free-threading builds...
Alper [Thu, 11 Sep 2025 13:38:08 +0000 (06:38 -0700)] 
gh-116738: add multi-threaded tests for `resource` module on free-threading builds (#138504)

8 weeks agogh-138704: Add PermissionError messages to profiling.sampling (#138705)
Pablo Galindo Salgado [Thu, 11 Sep 2025 13:32:08 +0000 (14:32 +0100)] 
gh-138704: Add PermissionError messages to profiling.sampling (#138705)

8 weeks agogh-116946: fully implement GC protocol for `_tkinter.Tk{app,tt}Object` (#138331)
Bénédikt Tran [Thu, 11 Sep 2025 10:59:30 +0000 (12:59 +0200)] 
gh-116946: fully implement GC protocol for `_tkinter.Tk{app,tt}Object` (#138331)

8 weeks agogh-138756: Fix memory leak in PyInitConfig_Free() (#138759)
Victor Stinner [Thu, 11 Sep 2025 10:46:19 +0000 (12:46 +0200)] 
gh-138756: Fix memory leak in PyInitConfig_Free() (#138759)

Clear also memory of PyConfig members.

8 weeks agogh-138013: Move I/O test infrastructre to test_io.utils (#138475)
Cody Maloney [Thu, 11 Sep 2025 10:45:30 +0000 (03:45 -0700)] 
gh-138013: Move I/O test infrastructre to test_io.utils (#138475)

This moves test support code to `test_io.utils` via copy/paste
code movement then adjusts imports as needed
(remove unneded + add all required).

8 weeks agogh-138479: Ensure that `__typing_subst__` returns a tuple (GH-138482)
Peter Bierma [Thu, 11 Sep 2025 10:39:09 +0000 (06:39 -0400)] 
gh-138479: Ensure that `__typing_subst__` returns a tuple (GH-138482)

Raise an exception if __typing_subst__ returns a non-tuple object.

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
8 weeks agogh-71810: Fix corner case (length==0) for int.to_bytes() (#138739)
Sergey B Kirpichev [Thu, 11 Sep 2025 10:30:53 +0000 (13:30 +0300)] 
gh-71810: Fix corner case (length==0) for int.to_bytes() (#138739)

```pycon
>>> (0).to_bytes(0, 'big', signed=True)
b''
>>> (-1).to_bytes(0, 'big', signed=True)  # was b''
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    (-1).to_bytes(0, 'big', signed=True)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
OverflowError: int too big to convert
```

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
8 weeks agogh-138081: fix some dead links in InternalDocs (#138082)
yihong [Thu, 11 Sep 2025 08:54:16 +0000 (16:54 +0800)] 
gh-138081: fix some dead links in InternalDocs (#138082)

8 weeks agogh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to several internal types (#138582)
Bénédikt Tran [Thu, 11 Sep 2025 07:56:20 +0000 (09:56 +0200)] 
gh-116946: add `Py_TPFLAGS_IMMUTABLETYPE` to several internal types (#138582)

The following types are now immutable:

* `_curses_panel.panel`,
* `[posix,nt].ScandirIterator`, `[posix,nt].DirEntry` (exposed in `os.py`),
* `_remote_debugging.RemoteUnwinder`,
* `_tkinter.Tcl_Obj`, `_tkinter.tkapp`, `_tkinter.tktimertoken`,
* `zlib.Compress`, and `zlib.Decompress`.

8 weeks agogh-138432: Improved invalid path checking in zoneinfo.reset_tzpath() (GH-138433)
Stephen Morton [Thu, 11 Sep 2025 07:08:53 +0000 (00:08 -0700)] 
gh-138432: Improved invalid path checking in zoneinfo.reset_tzpath() (GH-138433)

* Improve error messages for path-like relative paths and path-like bytes paths.
* TZPATH is now always a tuple of strings.

8 weeks agoGH-138562: Remove ``sort()`` from the common sequence methods in the data model ...
Adam Turner [Wed, 10 Sep 2025 15:52:57 +0000 (16:52 +0100)] 
GH-138562: Remove ``sort()`` from the common sequence methods in the data model (#138563)

8 weeks agogh-138744: GitHub Actions: pin to `windows-2022` (#138743)
Hugo van Kemenade [Wed, 10 Sep 2025 14:28:27 +0000 (17:28 +0300)] 
gh-138744: GitHub Actions: pin to `windows-2022` (#138743)

8 weeks agogh-138349: Fix crash when combining module-level annotation and listcomp (#138363)
Jelle Zijlstra [Wed, 10 Sep 2025 13:18:39 +0000 (06:18 -0700)] 
gh-138349: Fix crash when combining module-level annotation and listcomp (#138363)

8 weeks agogh-138729: Cover `inspect.formatannotationrelativeto` with tests (#138730)
sobolevn [Wed, 10 Sep 2025 13:06:16 +0000 (16:06 +0300)] 
gh-138729: Cover `inspect.formatannotationrelativeto` with tests (#138730)

8 weeks agogh-138716: Fix `assert a := b` syntax error message (#138718)
sobolevn [Wed, 10 Sep 2025 13:05:16 +0000 (16:05 +0300)] 
gh-138716: Fix `assert a := b` syntax error message (#138718)

8 weeks agogh-138008: Fix segfaults in _ctypes due to invalid argtypes (GH-138285)
Dung Nguyen [Wed, 10 Sep 2025 12:01:19 +0000 (19:01 +0700)] 
gh-138008: Fix segfaults in _ctypes due to invalid argtypes (GH-138285)

Signed-off-by: Nguyen Viet Dung <29406816+magnified103@users.noreply.github.com>
Signed-off-by: Nguyen Viet Dung <dung@ekluster.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
8 weeks agogh-136006: fix `Py_NAN` expansion on Solaris systems (#136575)
Bénédikt Tran [Wed, 10 Sep 2025 09:11:04 +0000 (11:11 +0200)] 
gh-136006: fix `Py_NAN` expansion on Solaris systems (#136575)

On Solaris, `Py_NAN` may expand as a function address instead of a floating-point number.
This amends commit 7a3b03509e5e3e72d8c47137579cccb52548a318.

8 weeks agogh-134531: use `EVP_MAC` API for `_hashlib.HMAC` when possible (#135235)
Bénédikt Tran [Wed, 10 Sep 2025 08:35:01 +0000 (10:35 +0200)] 
gh-134531: use `EVP_MAC` API for `_hashlib.HMAC` when possible (#135235)

Use `EVP_MAC` API for HMAC on builds with OpenSSL 3.0 or later.

8 weeks agogh-137371: refactor and fortify `test.support.hashlib_helper` (#137375)
Bénédikt Tran [Wed, 10 Sep 2025 07:14:38 +0000 (09:14 +0200)] 
gh-137371: refactor and fortify `test.support.hashlib_helper` (#137375)

8 weeks agogh-138230: Remove dead code in code gen - codegen_check_annotation is only calle...
Dino Viehland [Wed, 10 Sep 2025 01:17:00 +0000 (18:17 -0700)] 
gh-138230: Remove dead code in code gen - codegen_check_annotation is only calle… (#138228)

Remove dead code in code gen - codegen_check_annotation is only called if future annotations are enabled, and if future annotations are enabled it does nothing.

8 weeks agogh-135953: Fix refleak in cache method (#138721)
Pablo Galindo Salgado [Wed, 10 Sep 2025 00:08:09 +0000 (01:08 +0100)] 
gh-135953: Fix refleak in cache method (#138721)

8 weeks agogh-135953: Add flamegraph reporter to sampling profiler (#138715)
László Kiss Kollár [Tue, 9 Sep 2025 22:06:45 +0000 (23:06 +0100)] 
gh-135953: Add flamegraph reporter to sampling profiler (#138715)

8 weeks agogh-136616: Improve `assert` syntax error messages (#136653)
sobolevn [Tue, 9 Sep 2025 20:26:22 +0000 (23:26 +0300)] 
gh-136616: Improve `assert` syntax error messages (#136653)

8 weeks agogh-85076: Document exceptions that can be raised by importlib.import_module (GH-94662)
Samuel Sloniker [Tue, 9 Sep 2025 19:52:00 +0000 (12:52 -0700)] 
gh-85076: Document exceptions that can be raised by importlib.import_module (GH-94662)

8 weeks agogh-88886: Remove excessive encoding name normalization (GH-137167)
Serhiy Storchaka [Tue, 9 Sep 2025 18:07:21 +0000 (21:07 +0300)] 
gh-88886: Remove excessive encoding name normalization (GH-137167)

The codecs lookup function now performs only minimal normalization of
the encoding name before passing it to the search functions:
all ASCII letters are converted to lower case, spaces are replaced
with hyphens.

Excessive normalization broke third-party codecs providers, like
python-iconv.

Revert "bpo-37751: Fix codecs.lookup() normalization (GH-15092)"

This reverts commit 20f59fe1f7748ae899aceee4cb560e5e1f528a1f.

8 weeks agogh-138535: Pass directly state to posix fill_time() (#138693)
Victor Stinner [Tue, 9 Sep 2025 14:31:13 +0000 (16:31 +0200)] 
gh-138535: Pass directly state to posix fill_time() (#138693)

Pass directly the module state instead of passing the module to avoid
a call to get_posix_state().

8 weeks agogh-133143: Use _Py_ID for the other literals in sys (GH-138698)
Petr Viktorin [Tue, 9 Sep 2025 12:57:07 +0000 (14:57 +0200)] 
gh-133143: Use _Py_ID for the other literals in sys (GH-138698)

Follow-up refactoring after GH-133143, where we use `_Py_ID` for "big" and "little"
in `abi_info.byteorder`.
This uses `_Py_ID` for `sys.byteorder`, but also `float_repr_style` and a module name.

8 weeks agogh-138577: Mention Unix-specific limitations of `getpass.getpass(echo_char=...)`...
yagggi [Tue, 9 Sep 2025 09:41:13 +0000 (17:41 +0800)] 
gh-138577: Mention Unix-specific limitations of `getpass.getpass(echo_char=...)` (#138677)

In bf8bbe9a813dd9fc2dd14be06df172b7d26ca1af, `getpass.getpass` gained
the ability to provide keyboard feedback through `echo_char`.

On Unix, line editing shortcuts such as Ctrl+U were previously handled
as the terminal operates in canonical mode (see termios(3)). However,
since keyboard feedback requires to switch to noncanonical mode, this
now results in an inconsistency when `getpass.getpass` uses `echo_char`
as those shortcuts are no more supported. This limitation is specific
to Unix and does not affect Windows users where line editing shortcuts
were never supported.

8 weeks agoAdd impl-detail block for PyLong_FromLong docs (#126422)
Sergey B Kirpichev [Tue, 9 Sep 2025 09:22:40 +0000 (12:22 +0300)] 
Add impl-detail block for PyLong_FromLong docs (#126422)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
8 weeks agogh-138535: Optimize fill_time for typical timestamps (#138537)
Jeffrey Bosboom [Tue, 9 Sep 2025 09:05:54 +0000 (02:05 -0700)] 
gh-138535: Optimize fill_time for typical timestamps (#138537)

While file timestamps can be anything the file system can store, most
lie between the recent past and the near future.  Optimize fill_time()
for typical timestamps in three ways:

- When possible, convert to nanoseconds with C arithmetic.
- When using C arithmetic and the seconds member is not required (for
  st_birthtime), avoid creating a long object.
- When using C arithmetic, reorder the code to avoid the null checks
  implied in Py_XDECREF().

Co-authored-by: Victor Stinner <vstinner@python.org>
8 weeks agogh-137838: Fix JIT trace buffer overrun by increasing possible exit stubs (gh-138177)
Donghee Na [Tue, 9 Sep 2025 00:51:08 +0000 (09:51 +0900)] 
gh-137838: Fix JIT trace buffer overrun by increasing possible exit stubs (gh-138177)

8 weeks agogh-138385: Sample all interpreters in the tachyon profiler (#138398)
Pablo Galindo Salgado [Mon, 8 Sep 2025 23:41:08 +0000 (00:41 +0100)] 
gh-138385: Sample all interpreters in the tachyon profiler (#138398)

8 weeks agogh-137242: Add a --no-randomize option, and use it in Android CI (#138649)
Victor Stinner [Mon, 8 Sep 2025 22:45:42 +0000 (00:45 +0200)] 
gh-137242: Add a --no-randomize option, and use it in Android CI (#138649)

Adds a --no-randomize option to the CI runner, so that randomisation can be easily
disabled for --fast-ci and --slow-ci configurations on single-threaded testing platforms
like Android, iOS, and Emscripten.

---------

Co-authored-by: Malcolm Smith <smith@chaquo.com>
8 weeks agoGH-101100: Remove some entries from ``nitpick_ignore`` (#138464)
Adam Turner [Mon, 8 Sep 2025 22:10:26 +0000 (23:10 +0100)] 
GH-101100: Remove some entries from ``nitpick_ignore`` (#138464)

8 weeks agogh-138679: Opcodes which consume no inputs should indicate they produced the val...
Dino Viehland [Mon, 8 Sep 2025 20:53:12 +0000 (13:53 -0700)] 
gh-138679: Opcodes which consume no inputs should indicate they produced the val… (#138678)

Opcodes which consume no inputs should indicate they produced the value, not an arbitrary local

8 weeks agogh-101100: Resolve reference warnings in reference/ (#138418)
Adam Turner [Mon, 8 Sep 2025 19:31:24 +0000 (20:31 +0100)] 
gh-101100: Resolve reference warnings in reference/ (#138418)

8 weeks agogh-133143: Condense the implementation for ``sys.abi_info`` (#138672)
Adam Turner [Mon, 8 Sep 2025 19:21:28 +0000 (20:21 +0100)] 
gh-133143: Condense the implementation for ``sys.abi_info`` (#138672)

8 weeks agogh-133879: Improve consistency of full stops and whitespace in What's New (#138635)
Bénédikt Tran [Mon, 8 Sep 2025 19:12:03 +0000 (21:12 +0200)] 
gh-133879: Improve consistency of full stops and whitespace in What's New (#138635)

8 weeks agogh-136234: Fix `SelectorSocketTransport.writelines` to be robust to connection loss...
Bruce Merry [Mon, 8 Sep 2025 16:09:52 +0000 (18:09 +0200)] 
gh-136234: Fix `SelectorSocketTransport.writelines` to be robust to connection loss (#136743)

8 weeks agogh-138665: Move `platform.invalidate_caches` docs (#138667)
Shamil [Mon, 8 Sep 2025 15:20:46 +0000 (18:20 +0300)] 
gh-138665: Move `platform.invalidate_caches` docs (#138667)

8 weeks agogh-133143: Add sys.abi_info (GH-137476)
Klaus Zimmermann [Mon, 8 Sep 2025 14:35:44 +0000 (16:35 +0200)] 
gh-133143: Add sys.abi_info (GH-137476)

This makes information about the interpreter ABI more accessible.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
8 weeks agogh-138659: Typo in the gc module docstring (#138660)
Aalaap Dey [Mon, 8 Sep 2025 14:16:33 +0000 (15:16 +0100)] 
gh-138659: Typo in the gc module docstring (#138660)

docs(gc): fix typo in get_threshold() docstring

Removes a duplicate "the" from the docstring for the `gc.get_threshold()` function.

2 months agogh-138644: Update c-api docs of `PyInterpreterState` about PEP-684 (#138651)
sobolevn [Mon, 8 Sep 2025 13:44:44 +0000 (16:44 +0300)] 
gh-138644: Update c-api docs of `PyInterpreterState` about PEP-684 (#138651)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 months agogh-57911: Fix failing symlink test in tarfile (GH-138626)
Christoph Walcher [Mon, 8 Sep 2025 13:42:54 +0000 (15:42 +0200)] 
gh-57911: Fix failing symlink test in tarfile (GH-138626)

2 months agogh-138318, PyREPL: builtins should not be highlighted when used as attribute names...
yihong [Mon, 8 Sep 2025 13:04:22 +0000 (21:04 +0800)] 
gh-138318, PyREPL: builtins should not be highlighted when used as attribute names (#138319)

2 months agoDoc: Apply keyword role around finally (in sys module doc) (GH-138544)
Adorilson Bezerra [Mon, 8 Sep 2025 12:02:36 +0000 (13:02 +0100)] 
Doc: Apply keyword role around finally (in sys module doc) (GH-138544)

2 months agogh-138633: fix Sphinx references in `ssl` documentation (#138648)
Bénédikt Tran [Mon, 8 Sep 2025 11:31:40 +0000 (13:31 +0200)] 
gh-138633: fix Sphinx references in `ssl` documentation (#138648)

2 months agogh-137210: Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h (GH-138545)
Petr Viktorin [Mon, 8 Sep 2025 10:02:13 +0000 (12:02 +0200)] 
gh-137210: Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h (GH-138545)

Move PYTHON_API_VERSION & PYTHON_ABI_VERSION to patchlevel.h

This allows removing #include "modsupport.h" from python_ver_rc.h,
which allows modsupport.h to use common helpers from Python.h --
specifically, `_Py_PACK_VERSION` for defining limited API.

2 months agogh-138633: synchronize documented signatures of SSL objects with runtime ones (#138639)
Bénédikt Tran [Mon, 8 Sep 2025 09:28:10 +0000 (11:28 +0200)] 
gh-138633: synchronize documented signatures of SSL objects with runtime ones (#138639)

2 months agogh-136264: Fix ``--relative-paths`` for PEP 739's build-details.json (#138510)
Adam Turner [Mon, 8 Sep 2025 09:14:05 +0000 (10:14 +0100)] 
gh-136264: Fix ``--relative-paths`` for PEP 739's build-details.json (#138510)

* KeyError is not raised for defaultdict
* Fix relative paths on different drives on Windows
* Add a round-trip test

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 months agogh-138252: Add support in SSL module for getting and setting TLS signature algorithms...
Ron Frederick [Mon, 8 Sep 2025 08:36:12 +0000 (01:36 -0700)] 
gh-138252: Add support in SSL module for getting and setting TLS signature algorithms (#138269)

The signature algorithms allowed for certificate-based client authentication or
for the server to complete the TLS handshake can be defined on a SSL context via
`ctx.set_client_sigalgs()` and `ctx.set_server_sigalgs()`.

With OpenSSL 3.4 or later, the list of available TLS algorithms can be retrieved
by `ssl.get_sigalgs()`.

With OpenSSL 3.5 or later, the selected signature algorithms can be retrieved from
SSL sockets via `socket.client_sigalg()` and `socket.server_sigalg()`.

This commit also partially amends 377b78761814e7d848361e642d376881739d5a29
by using `PyUnicode_DecodeFSDefault` instead of `PyUnicode_DecodeASCII` in
`_ssl._SSLContext.get_groups`, so that functions consistently decode strings
obtained from OpenSSL.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agoGH-123299: Copyedit 3.14 What's New: Build Changes (#138488)
Adam Turner [Mon, 8 Sep 2025 07:09:45 +0000 (08:09 +0100)] 
GH-123299: Copyedit 3.14 What's New: Build Changes (#138488)

2 months agogh-105487: Fix `__dir__` entries of `GenericAlias` (#138578)
sobolevn [Sun, 7 Sep 2025 21:33:24 +0000 (00:33 +0300)] 
gh-105487: Fix `__dir__` entries of `GenericAlias` (#138578)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2 months agogh-138584: Increase test coverage for `collections.UserList` (#138590)
dbXD320 [Sun, 7 Sep 2025 08:53:22 +0000 (14:23 +0530)] 
gh-138584: Increase test coverage for `collections.UserList` (#138590)

Some common tests in `test.list_tests.CommonTest` explicitly tested `list`
instead of testing the underlying list-like type defined in `type2test`.

---------

Co-authored-by: Devansh Baghla <devanshbaghla34@gmail.com>
2 months agoAdd Emma Smith to CODEOWNERS (#138588)
Emma Smith [Sun, 7 Sep 2025 08:11:19 +0000 (01:11 -0700)] 
Add Emma Smith to CODEOWNERS (#138588)

Added myself as a code owner for build system files, WASM platform files, and compression.zstd files.

2 months agogh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295)
Duane Griffin [Sun, 7 Sep 2025 07:49:54 +0000 (19:49 +1200)] 
gh-126631: gh-137996: fix pre-loading of `__main__` (GH-135295)

gh-126631: gh-137996: fix pre-loading of `__main__`

The `main_path` parameter was renamed `init_main_from_name`, update the
forkserver code accordingly.  This was leading to slower startup times when people
were trying to preload the main module.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 months agogh-118981: multiprocessing.popen_spawn_posix, fix potential hang (gh-118982)
Albert Zeyer [Sun, 7 Sep 2025 07:18:28 +0000 (09:18 +0200)] 
gh-118981: multiprocessing.popen_spawn_posix, fix potential hang (gh-118982)

fix potential hang.

It can happen that the child crashes right in the beginning for whatever reason. In this case, the parent will hang when writing into the pipe, because the child fd is not closed yet.

The normal pattern is to close the child fds right after the child proc is forked/executed/spawned, so when the child dies, then also the pipes will be closed, and there will be no hang (the parent gets SIGPIPE instead).

2 months agoDocs: Fix typo in `random_derangement` recipe (GH-138599)
Gilles Peiffer [Sat, 6 Sep 2025 20:53:49 +0000 (22:53 +0200)] 
Docs: Fix typo in `random_derangement` recipe (GH-138599)

2 months agogh-90548: Skip NODEV portion of test_makedev when linked to musl (GH-138593)
Zachary Ware [Sat, 6 Sep 2025 19:01:26 +0000 (14:01 -0500)] 
gh-90548: Skip NODEV portion of test_makedev when linked to musl (GH-138593)

2 months agogh-90548: Skip ctypes test_null_dlsym when linked to musl (GH-138592)
Zachary Ware [Sat, 6 Sep 2025 19:01:18 +0000 (14:01 -0500)] 
gh-90548: Skip ctypes test_null_dlsym when linked to musl (GH-138592)

The test relies on glibc-specific behavior.

2 months agogh-90548: Allow Alpine/MUSL to pass test_c_locale_coercion. (GH-134454)
R. David Murray [Sat, 6 Sep 2025 19:01:11 +0000 (15:01 -0400)] 
gh-90548: Allow Alpine/MUSL to pass test_c_locale_coercion. (GH-134454)

Like cygwin, MUSL defaults to utf-8 if no variables are set.  I have no
idea if the existing tests pass on cygwin, but I made the modifications
such that I shouldn't break it if is.  The additional checks needed for
MUSL are guarded by DEFAULT_LOCALE_IS_C being False.  Based on this
flag, we expect utf-8 for the encodings and no coercion message, as
long as LC_ALL is not set to C.  (That looks like a bit of an issue with
the test structure, but I'm not going to attempt to "fix" that.)
DEFAULT_ENCODING is intentionally not given a default since it is only
used when DEFAULT_LOCALE_IS_C is False, and if you use the flag you'll
need to set it.

After reading through issue 30672, looking at the source, and running a
test on Android, I *think* the current situation is that coercion will
be done if the local is set to POSIX regardless of platform.  However,
if the platform doesn't make POSIX equivalent to C, the encodings when
coercion is disabled will not be the same as for C (it is utf-8 on
android, for example).  This means the tests would fail if POSIX were
added unconditionally to the EXPECTED_C_LOCALE_EQUIVALENTS as envisioned
in the issue.  This *could* be fixed with another flag, but I'm not sure
it is worth the effort.  I'm not even sure Python is behaving optimally
in this case (assuming my analysis is correct).  So I just altered the
comment and add POSIX if and only if the platform is linux.

2 months agofix comment reference from man 7 signal to man 7 signal-safety (#138554)
mqudah [Sat, 6 Sep 2025 18:40:15 +0000 (21:40 +0300)] 
fix comment reference from man 7 signal to man 7 signal-safety (#138554)

docs: fix comment reference from man 7 signal to man 7 signal-safety

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>