]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 months agoGH-135904: Implement assembler optimization for AArch64. (GH-139855)
Mark Shannon [Fri, 17 Oct 2025 10:26:17 +0000 (11:26 +0100)] 
GH-135904: Implement assembler optimization for AArch64. (GH-139855)

2 months agogh-133059: Fix `Tools/build/deepfreeze.py` for new nsmallposints (#139906)
Albert N [Fri, 17 Oct 2025 08:48:53 +0000 (11:48 +0300)] 
gh-133059: Fix `Tools/build/deepfreeze.py` for new nsmallposints (#139906)

2 months agoStandardize translation of `Doc/bugs.rst` (GH-137449)
Stan Ulbrych [Fri, 17 Oct 2025 06:55:12 +0000 (07:55 +0100)] 
Standardize translation of `Doc/bugs.rst` (GH-137449)

2 months agogh-116738: test `uuid` module thread safety in free-threading (#140068)
Alper [Thu, 16 Oct 2025 18:27:51 +0000 (11:27 -0700)] 
gh-116738: test `uuid` module thread safety in free-threading (#140068)

2 months agoRemove duplicate words in the documentation (#140221)
Tan Long [Thu, 16 Oct 2025 17:27:00 +0000 (01:27 +0800)] 
Remove duplicate words in the documentation (#140221)

2 months agogh-140149: Use PyBytesWriter in _build_concatenated_bytes() (#140150)
Maurycy Pawłowski-Wieroński [Thu, 16 Oct 2025 17:24:34 +0000 (19:24 +0200)] 
gh-140149: Use PyBytesWriter in _build_concatenated_bytes() (#140150)

Use PyBytesWriter in action_helpers.c _build_concatenated_bytes().
3x faster bytes concat in the parser.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-140078: fix typo in tkinter docs (#140081)
wangxiaolei [Thu, 16 Oct 2025 15:02:38 +0000 (23:02 +0800)] 
gh-140078: fix typo in tkinter docs (#140081)

Remove extraneous word.

2 months agogh-138859: Account for `ParamSpec` defaults that are not lists … (#138868)
bzoracler [Thu, 16 Oct 2025 12:30:36 +0000 (01:30 +1300)] 
gh-138859: Account for `ParamSpec` defaults that are not lists … (#138868)

2 months agogh-83714: Check for struct statx.stx_atomic_write_unit_max_opt in configure (#140185)
Jeffrey Bosboom [Thu, 16 Oct 2025 11:40:47 +0000 (04:40 -0700)] 
gh-83714: Check for struct statx.stx_atomic_write_unit_max_opt in configure (#140185)

stx_atomic_write_unit_max_opt was added in Linux 6.16, but is controlled
by the STATX_WRITE_ATOMIC mask bit added in Linux 6.11.  That's safe at
runtime because all kernels clear the reserved space in struct statx and
zero is a valid value for stx_atomic_write_unit_max_opt, and it avoids
allocating another mask bit, which are a limited resource.  But it also
means the kernel headers don't provide a way to check whether
stx_atomic_write_unit_max_opt exists, so add a configure check.

2 months agogh-139817: Fix refleak in TypeAliasType(qualname=non_string) (GH-140197)
Petr Viktorin [Thu, 16 Oct 2025 11:04:04 +0000 (13:04 +0200)] 
gh-139817: Fix refleak in TypeAliasType(qualname=non_string) (GH-140197)

2 months agoSet type names earlier in posixmodule.c (#140168)
Victor Stinner [Thu, 16 Oct 2025 10:54:57 +0000 (12:54 +0200)] 
Set type names earlier in posixmodule.c (#140168)

2 months agogh-140170: Fix test_site with -s flag (GH-140179)
Stan Ulbrych [Thu, 16 Oct 2025 09:49:08 +0000 (10:49 +0100)] 
gh-140170: Fix test_site with -s flag (GH-140179)

Commit

2 months agogh-130567: Remove optimistic allocation in locale.strxfrm() (GH-137143)
Serhiy Storchaka [Thu, 16 Oct 2025 07:54:41 +0000 (10:54 +0300)] 
gh-130567: Remove optimistic allocation in locale.strxfrm() (GH-137143)

On modern systems, the result of wcsxfrm() is much larger the size of
the input string (from 4+2*n on Windows to 4+5*n on Linux for simple
ASCII strings), so optimistic allocation of the buffer of the same size
never works.

The exception is if the locale is "C" (or unset), but in that case the `wcsxfrm`
call should be fast (and calling `locale.strxfrm()` doesn't make too much
sense in the first place).

2 months agogh-140120: Refresh HACL* to fix an hmac memory leak (GH-140188)
Jonathan Protzenko [Thu, 16 Oct 2025 05:25:51 +0000 (13:25 +0800)] 
gh-140120: Refresh HACL* to fix an hmac memory leak (GH-140188)

This pulls an updated version of HACL* that fixes the memory leak reported in #140120, via an upstream fix.

2 months agogh-140041: Fix import of `ctypes` on Android and Cygwin when ABI flags are present...
Malcolm Smith [Wed, 15 Oct 2025 21:40:39 +0000 (22:40 +0100)] 
gh-140041: Fix import of `ctypes` on Android and Cygwin when ABI flags are present (#140178)

Use sysconfig to determine the full name of libpython, rather than hardcoding
a library name that doesn't have ABI flags.

2 months agogh-139817: typing docs: Fix indentation of `.. versionadded::` note for `TypeAliasTyp...
Alex Waygood [Wed, 15 Oct 2025 20:18:39 +0000 (21:18 +0100)] 
gh-139817: typing docs: Fix indentation of `.. versionadded::` note for `TypeAliasType.__qualname__` (#140177)

2 months agogh-140141: Properly break exception chain in `importlib.metadata.Distribution.from_na...
Bartosz Sławecki [Wed, 15 Oct 2025 16:49:14 +0000 (18:49 +0200)] 
gh-140141: Properly break exception chain in `importlib.metadata.Distribution.from_name` (#140142)

2 months agogh-139817: Attribute `__qualname__` is added to `TypeAliasType` (#139919)
Mikhail Efimov [Wed, 15 Oct 2025 16:08:17 +0000 (19:08 +0300)] 
gh-139817: Attribute `__qualname__` is added to `TypeAliasType` (#139919)

2 months agogh-83714: Disable os.statx_result.stx_atomic_write_unit_max_opt (#140162)
Victor Stinner [Wed, 15 Oct 2025 15:38:34 +0000 (17:38 +0200)] 
gh-83714: Disable os.statx_result.stx_atomic_write_unit_max_opt (#140162)

Fix building on Centos 9 x86-64 buildbot.

2 months agogh-140065: Lexical analysis: Correct note about leading zeros in floating point numbe...
Stan Ulbrych [Wed, 15 Oct 2025 15:15:45 +0000 (16:15 +0100)] 
gh-140065: Lexical analysis: Correct note about leading zeros in floating point numbers (GH-140066)

2 months agogh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (#140158)
Victor Stinner [Wed, 15 Oct 2025 14:36:49 +0000 (16:36 +0200)] 
gh-140153: Fix Py_REFCNT() definition on limited C API 3.11-3.13 (#140158)

2 months agogh-140135: Use `PyBytesWriter` in `io.RawIOBase.readall()`; 4x faster (#140139)
Maurycy Pawłowski-Wieroński [Wed, 15 Oct 2025 14:04:17 +0000 (16:04 +0200)] 
gh-140135: Use `PyBytesWriter` in `io.RawIOBase.readall()`; 4x faster (#140139)

2 months agogh-140137: Handle empty collections in profiling.sampling (#140154)
Pablo Galindo Salgado [Wed, 15 Oct 2025 13:59:12 +0000 (14:59 +0100)] 
gh-140137: Handle empty collections in profiling.sampling (#140154)

2 months agogh-140080: Clear `atexit` callbacks when memory allocation fails during finalization...
yihong [Wed, 15 Oct 2025 13:49:55 +0000 (21:49 +0800)] 
gh-140080: Clear `atexit` callbacks when memory allocation fails during finalization (GH-140103)

This fixes a regression introduced by GH-136004, in which finalization would hang while executing atexit handlers if the system was out of memory.

---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-140061: Use `_PyObject_IsUniquelyReferenced()` to check if objects are uniquely...
Sergey Miryanov [Wed, 15 Oct 2025 13:48:21 +0000 (18:48 +0500)] 
gh-140061: Use `_PyObject_IsUniquelyReferenced()` to check if objects are uniquely referenced (gh-140062)

The previous `Py_REFCNT(x) == 1` checks can have data races in the free
threaded build. `_PyObject_IsUniquelyReferenced(x)` is a more conservative
check that is safe in the free threaded build and is identical to
`Py_REFCNT(x) == 1` in the default GIL-enabled build.

2 months agogh-83714: Implement os.statx() function (#139178)
Jeffrey Bosboom [Wed, 15 Oct 2025 13:44:08 +0000 (06:44 -0700)] 
gh-83714: Implement os.statx() function (#139178)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-139327: consolidate `sqlite3_finalize` and `sqlite3_reset` usages (GH-139329)
Bénédikt Tran [Wed, 15 Oct 2025 13:18:07 +0000 (15:18 +0200)] 
gh-139327: consolidate `sqlite3_finalize` and `sqlite3_reset` usages (GH-139329)

2 months agogh-129813: Enhance PyBytesWriter documentation (#140152)
Victor Stinner [Wed, 15 Oct 2025 12:54:18 +0000 (14:54 +0200)] 
gh-129813: Enhance PyBytesWriter documentation (#140152)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
2 months agogh-76007: Deprecate `zlib.__version__` attribute (#140130)
Stan Ulbrych [Wed, 15 Oct 2025 11:18:48 +0000 (12:18 +0100)] 
gh-76007: Deprecate `zlib.__version__` attribute (#140130)

2 months agogh-129559: Remove extra dot in bytearray.resize AC (#140134) 140148/head
Cody Maloney [Wed, 15 Oct 2025 02:39:17 +0000 (19:39 -0700)] 
gh-129559: Remove extra dot in bytearray.resize AC (#140134)

2 months agoRevert "gh-140067: Fix memory leak in sub-interpreter creation (#140111)" (#140140)
Peter Bierma [Wed, 15 Oct 2025 01:46:43 +0000 (21:46 -0400)] 
Revert "gh-140067: Fix memory leak in sub-interpreter creation  (#140111)" (#140140)

This reverts commit 59547a251f7069dc6e08cb6082dd21872671e381.

2 months agogh-140126: Fix compile error if --with-assertions is enabled (#140133)
Neil Schemenauer [Tue, 14 Oct 2025 23:34:30 +0000 (16:34 -0700)] 
gh-140126: Fix compile error if --with-assertions is enabled (#140133)

The `types_world_is_stopped()` function needs to be defined if NDEBUG
is not defined.

2 months agoUpdate documented minimum required zlib library version (#140116)
Stan Ulbrych [Tue, 14 Oct 2025 22:16:00 +0000 (23:16 +0100)] 
Update documented minimum required zlib library version (#140116)

2 months agoImprove the comment in URLError (#139874)
SarahPythonista [Tue, 14 Oct 2025 19:31:21 +0000 (12:31 -0700)] 
Improve the comment in URLError (#139874)

Clarify that it It overrides `__init__` and `__str__`.

2 months agogh-139877: Use PyBytesWriter in pycore_blocks_output_buffer.h (#139976)
Emma Smith [Tue, 14 Oct 2025 17:03:55 +0000 (10:03 -0700)] 
gh-139877: Use PyBytesWriter in pycore_blocks_output_buffer.h (#139976)

Previously, the _BlocksOutputBuffer code creates a list of bytes objects to handle the output data from compression libraries. This ends up being slow due to the output buffer code needing to copy each bytes element of the list into the final bytes object buffer at the end of compression.

The new PyBytesWriter API introduced in PEP 782 is an ergonomic and fast method of writing data into a buffer that will later turn into a bytes object. Benchmarks show that using the PyBytesWriter API is 10-30% faster for decompression across a variety of settings. The performance gains are greatest when the decompressor is very performant, such as for Zstandard (and likely zlib-ng). Otherwise the decompressor can bottleneck decompression and the gains are more modest, but still sizable (e.g. 10% faster for zlib)!

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agoAdd mention of other fixed bug in the gh-139640 NEWS entry (GH-140122)
Serhiy Storchaka [Tue, 14 Oct 2025 15:56:19 +0000 (18:56 +0300)] 
Add mention of other fixed bug in the gh-139640 NEWS entry (GH-140122)

2 months agoCorrect a simple NULL-check in `optimizer.c`'s `uop_item()` (GH-140069)
Maurycy Pawłowski-Wieroński [Tue, 14 Oct 2025 15:18:20 +0000 (17:18 +0200)] 
Correct a simple NULL-check in `optimizer.c`'s `uop_item()` (GH-140069)

2 months agogh-139640: Fix swallowing syntax warnings in different modules (GH-139755)
Serhiy Storchaka [Tue, 14 Oct 2025 14:48:09 +0000 (17:48 +0300)] 
gh-139640: Fix swallowing syntax warnings in different modules (GH-139755)

Revert GH-131993.

Fix swallowing some syntax warnings in different modules if they accidentally
have the same message and are emitted from the same line.

2 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 14 Oct 2025 14:45:22 +0000 (17:45 +0300)] 
Merge branch 'main' of https://github.com/python/cpython

2 months agogh-140067: Fix memory leak in sub-interpreter creation (#140111)
Shamil [Tue, 14 Oct 2025 14:42:17 +0000 (17:42 +0300)] 
gh-140067: Fix memory leak in sub-interpreter creation  (#140111)

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

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 14 Oct 2025 14:41:22 +0000 (17:41 +0300)] 
Merge branch 'main' of https://github.com/python/cpython

2 months agoPost 3.15.0a1
Hugo van Kemenade [Tue, 14 Oct 2025 14:36:01 +0000 (17:36 +0300)] 
Post 3.15.0a1

2 months agogh-106318: Add examples for str.istitle() (#140046)
Adorilson Bezerra [Tue, 14 Oct 2025 14:19:27 +0000 (11:19 -0300)] 
gh-106318: Add examples for str.istitle()  (#140046)

2 months agogh-101828: Fix `jisx0213` codecs removing null characters (gh-139340)
Stan Ulbrych [Tue, 14 Oct 2025 13:55:00 +0000 (14:55 +0100)] 
gh-101828: Fix `jisx0213` codecs removing null characters (gh-139340)

2 months agoGH-140058: Clear key and value if `PyTuple_New` fails in `dictiter_iternextitem`...
Sergey Miryanov [Tue, 14 Oct 2025 12:45:39 +0000 (17:45 +0500)] 
GH-140058: Clear key and value if `PyTuple_New` fails in `dictiter_iternextitem` (#140059)

2 months agogh-102431: Clarify constraints on operands of Decimal logical operations (GH-102836)
Sergey B Kirpichev [Tue, 14 Oct 2025 11:02:02 +0000 (14:02 +0300)] 
gh-102431: Clarify constraints on operands of Decimal logical operations (GH-102836)

Sync C/Python implementation of the decimal: logical_ops for contexts.

2 months agoPython 3.15.0a1 v3.15.0a1
Hugo van Kemenade [Tue, 14 Oct 2025 10:45:53 +0000 (13:45 +0300)] 
Python 3.15.0a1

2 months agogh-133879: Copyedit "What's new in Python 3.15" (#140007)
Hugo van Kemenade [Tue, 14 Oct 2025 10:32:55 +0000 (13:32 +0300)] 
gh-133879: Copyedit "What's new in Python 3.15" (#140007)

2 months agogh-137634: Modernize `calendar.HTMLCalendar` output (#137635)
Wulian233 [Tue, 14 Oct 2025 10:25:12 +0000 (18:25 +0800)] 
gh-137634: Modernize `calendar.HTMLCalendar` output (#137635)

2 months agogh-139958: Add TOML MIME type (#139959)
Gil Forcada Codinachs [Tue, 14 Oct 2025 10:20:14 +0000 (12:20 +0200)] 
gh-139958: Add TOML MIME type (#139959)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2 months agogh-90949: Recommend `hasattr` with Expat security methods (#139800)
Sebastian Pipping [Tue, 14 Oct 2025 10:18:09 +0000 (12:18 +0200)] 
gh-90949: Recommend `hasattr` with Expat security methods (#139800)

2 months agogh-114827: clarify `threading.Event.wait` timeout behavior (#114834)
Doug Hoskisson [Tue, 14 Oct 2025 08:34:53 +0000 (01:34 -0700)] 
gh-114827: clarify `threading.Event.wait` timeout behavior (#114834)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 months agogh-82575: Adjust `time.get_clock_info` *adjustable* attribute doc (#135920)
Stan Ulbrych [Tue, 14 Oct 2025 08:30:56 +0000 (09:30 +0100)] 
gh-82575: Adjust `time.get_clock_info` *adjustable* attribute doc (#135920)

2 months agogh-137871: Clarify cmath.nan documentation by linking to math module (#137876)
Aziz [Tue, 14 Oct 2025 08:24:43 +0000 (10:24 +0200)] 
gh-137871: Clarify cmath.nan documentation by linking to math module (#137876)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 months agogh-97914: Reword misleading sentence on conditional expressions (#139064)
Irit Katriel [Tue, 14 Oct 2025 08:21:13 +0000 (09:21 +0100)] 
gh-97914: Reword misleading sentence on conditional expressions (#139064)

Co-authored-by: Gilles Peiffer <gilles.peiffer.yt@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2 months agogh-138072: Fix typos and grammatical errors and improve clarity in asyncio howto...
Morteza24 [Tue, 14 Oct 2025 08:19:35 +0000 (11:49 +0330)] 
gh-138072: Fix typos and grammatical errors and improve clarity in asyncio howto document (#138895)

2 months agogh-102247: Improve documentation of http.HTTPStatus members update (#133190)
Loïc Simon [Tue, 14 Oct 2025 08:18:17 +0000 (10:18 +0200)] 
gh-102247: Improve documentation of http.HTTPStatus members update (#133190)

2 months agogh-138993: Dedent `credits` text (#138994)
Stan Ulbrych [Tue, 14 Oct 2025 08:15:17 +0000 (09:15 +0100)] 
gh-138993: Dedent `credits` text (#138994)

2 months agogh-101100: Fix sphinx warnings in `library/smtplib.rst` (#139991)
Weilin Du [Tue, 14 Oct 2025 08:12:24 +0000 (16:12 +0800)] 
gh-101100: Fix sphinx warnings in `library/smtplib.rst` (#139991)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agogh-70765: Remove unnecessary extra backtick from Changelog entry (#140071)
Rafael Fontenelle [Tue, 14 Oct 2025 08:05:59 +0000 (05:05 -0300)] 
gh-70765: Remove unnecessary extra backtick from Changelog entry (#140071)

2 months agogh-115119: Update macOS installer to use libmpdecimal 4.0.1. (#140077)
Ned Deily [Tue, 14 Oct 2025 04:48:27 +0000 (05:48 +0100)] 
gh-115119: Update macOS installer to use libmpdecimal 4.0.1. (#140077)

2 months agogh-124111: Update macOS installer to use Tcl/Tk 9.0.2. (#140076)
Ned Deily [Tue, 14 Oct 2025 04:42:23 +0000 (05:42 +0100)] 
gh-124111: Update macOS installer to use Tcl/Tk 9.0.2. (#140076)

2 months agogh-132339: Update macOS installer version of OpenSSL to 3.5.4. (#140075)
Ned Deily [Tue, 14 Oct 2025 04:28:46 +0000 (05:28 +0100)] 
gh-132339: Update macOS installer version of OpenSSL to 3.5.4. (#140075)

2 months agogh-124111: test macOS CI with Tk 9 (#137424)
Hugo van Kemenade [Tue, 14 Oct 2025 04:00:58 +0000 (07:00 +0300)] 
gh-124111: test macOS CI with Tk 9 (#137424)

Co-authored-by: Ned Deily <nad@python.org>
2 months agogh-140000: Traverse `name` attribute for `TypeVar`, `TypeVarTuple`, `TypeAliasType...
Mikhail Efimov [Mon, 13 Oct 2025 20:10:39 +0000 (23:10 +0300)] 
gh-140000: Traverse `name` attribute for `TypeVar`, `TypeVarTuple`, `TypeAliasType`, `ParamSpec` (#140016)

2 months agogh-139810: Always generate -dev tags for PyManager packages (GH-139814)
Steve Dower [Mon, 13 Oct 2025 19:43:14 +0000 (20:43 +0100)] 
gh-139810: Always generate -dev tags for PyManager packages (GH-139814)

2 months agogh-125996: fix thread safety of `collections.OrderedDict` (#133734)
Kumar Aditya [Mon, 13 Oct 2025 17:25:07 +0000 (22:55 +0530)] 
gh-125996: fix thread safety of `collections.OrderedDict` (#133734)

2 months agogh-138772: Fix and improve documentation for turtle color functions (GH-139325)
Serhiy Storchaka [Mon, 13 Oct 2025 15:32:16 +0000 (18:32 +0300)] 
gh-138772: Fix and improve documentation for turtle color functions (GH-139325)

Use multiple signatures for clarity.
Explain different forms of bgcolor() in details.
Fix outdated docstrings.

2 months agoUsing Python on Windows: Free-threaded is supported from 3.14 (#139992)
Hugo van Kemenade [Mon, 13 Oct 2025 14:18:45 +0000 (17:18 +0300)] 
Using Python on Windows: Free-threaded is supported from 3.14 (#139992)

2 months agogh-139823: Check if `zlib` is available in `ensurepip` (GH-139954)
Stan Ulbrych [Mon, 13 Oct 2025 14:01:06 +0000 (15:01 +0100)] 
gh-139823: Check if `zlib` is available in `ensurepip` (GH-139954)

2 months agogh-107073: fix relevant typo in `PyObject_ClearManagedDict` (#140032)
Mikhail Efimov [Mon, 13 Oct 2025 11:23:09 +0000 (14:23 +0300)] 
gh-107073: fix relevant typo in `PyObject_ClearManagedDict` (#140032)

2 months agogh-140001: Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c (GH...
mdehoon [Mon, 13 Oct 2025 10:29:42 +0000 (19:29 +0900)] 
gh-140001: Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c (GH-139998)

Co-authored-by: Michiel Jan Laurens de Hoon <mdehoon@Michiels-MacBook-Air.local>
2 months agogh-140009: Improve performance of `list_extend_dictitems` by using `PyTuple_FromArray...
Pieter Eendebak [Mon, 13 Oct 2025 10:28:25 +0000 (12:28 +0200)] 
gh-140009: Improve performance of `list_extend_dictitems` by using `PyTuple_FromArray` (#140010)

2 months agogh-131189: Remove `curses` mention from `PYTHON_BASIC_REPL` docs (#140022)
Bartosz Sławecki [Mon, 13 Oct 2025 08:40:39 +0000 (10:40 +0200)] 
gh-131189: Remove `curses` mention from `PYTHON_BASIC_REPL` docs (#140022)

The `curses` dependency for the default REPL has been removed
in 09dfb50f1b7c23bc48d86bd579671761bb8ca48b.

2 months agogh-136438: Make sure test.test_pydoc.test_pydoc pass with all optimization levels...
Arseniy Krupchik [Sun, 12 Oct 2025 22:17:41 +0000 (02:17 +0400)] 
gh-136438: Make sure test.test_pydoc.test_pydoc pass with all optimization levels (#136479)

test_pydoc.test_pydoc now passes with -OO

2 months agogh-112075: Remove _PyObject_SetManagedDict() function (#139737)
Victor Stinner [Sun, 12 Oct 2025 17:32:10 +0000 (19:32 +0200)] 
gh-112075: Remove _PyObject_SetManagedDict() function (#139737)

Move it to the internal C API and no longer export it.

2 months agoGH-139979: Add @force_not_colorized_test_class to TestOptionalHelpVersionActions...
Savannah Ostrowski [Sun, 12 Oct 2025 16:51:13 +0000 (09:51 -0700)] 
GH-139979: Add @force_not_colorized_test_class to TestOptionalHelpVersionActions (#139980)

2 months agogh-139155: Remove "dictionaries are sorted by key" note in `pprint` docs (GH-139159)
Bartosz Sławecki [Sun, 12 Oct 2025 16:48:22 +0000 (18:48 +0200)] 
gh-139155: Remove "dictionaries are sorted by key" note in `pprint` docs (GH-139159)

2 months agogh-139988: fix a leak when failing to create a Union type (#139990)
Bénédikt Tran [Sun, 12 Oct 2025 10:51:44 +0000 (12:51 +0200)] 
gh-139988: fix a leak when failing to create a Union type (#139990)

2 months agogh-116738: test `dbm.gnu` module on FT Python build (#138467)
Alper [Sun, 12 Oct 2025 07:42:10 +0000 (00:42 -0700)] 
gh-116738: test `dbm.gnu` module on FT Python build (#138467)

2 months agogh-138044: Fix `importlib.resources.files` deprecation docs (#139632)
sobolevn [Sat, 11 Oct 2025 22:52:01 +0000 (01:52 +0300)] 
gh-138044: Fix `importlib.resources.files` deprecation docs (#139632)

2 months agogh-139482: Add `posix._clearenv()` function (#139965)
Victor Stinner [Sat, 11 Oct 2025 20:58:43 +0000 (22:58 +0200)] 
gh-139482: Add `posix._clearenv()` function (#139965)

2 months agogh-111489: Remove _PyTuple_FromArray() alias (#139973)
Victor Stinner [Sat, 11 Oct 2025 20:58:14 +0000 (22:58 +0200)] 
gh-111489: Remove _PyTuple_FromArray() alias (#139973)

Replace _PyTuple_FromArray() with PyTuple_FromArray().
Remove pycore_tuple.h includes.

2 months agogh-101100: Fix Sphinx warnings in `Doc/library/signal.rst` (GH-139930)
Weilin Du [Sat, 11 Oct 2025 18:26:48 +0000 (02:26 +0800)] 
gh-101100: Fix Sphinx warnings in `Doc/library/signal.rst` (GH-139930)

2 months agogh-139929: fix incorrect OpenSSL version-based guard in `_ssl.c` (GH-139945)
Bénédikt Tran [Sat, 11 Oct 2025 17:34:08 +0000 (19:34 +0200)] 
gh-139929: fix incorrect OpenSSL version-based guard in `_ssl.c` (GH-139945)

fix OpenSSL version-based guards

2 months agogh-139905: Provide suggestion in error message if `Generic.__init_subclass__` was...
Stan Ulbrych [Sat, 11 Oct 2025 15:14:29 +0000 (16:14 +0100)] 
gh-139905: Provide suggestion in error message if `Generic.__init_subclass__` was not called (#139943)

2 months agogh-139935: do not skip test on real errors in `os.getlogin` (#139953)
Bénédikt Tran [Sat, 11 Oct 2025 14:31:34 +0000 (16:31 +0200)] 
gh-139935: do not skip test on real errors in `os.getlogin` (#139953)

2 months agogh-139935: fix `test_os.test_getlogin` on some platforms (#139936)
yihong [Sat, 11 Oct 2025 12:32:57 +0000 (20:32 +0800)] 
gh-139935: fix `test_os.test_getlogin` on some platforms (#139936)

This amends 4e7e2dd043c1da85b0c157d3ed24866b77e83a4f to catch errors
that `os.getlogin` can raise as specified by POSIX and Linux/glibc [1].

[1]: https://man7.org/linux/man-pages/man3/getlogin.3.html#ERRORS

---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 months agogh-96491: Deduplicate version in IDLE shell title (#139841)
Stan Ulbrych [Sat, 11 Oct 2025 01:37:48 +0000 (02:37 +0100)] 
gh-96491: Deduplicate version in IDLE shell title (#139841)

Saving to a file added both the filename and repeated the version.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 months agogh-139924: Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function watchers...
Dino Viehland [Fri, 10 Oct 2025 22:25:38 +0000 (15:25 -0700)] 
gh-139924: Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function watchers (#139925)

Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function watchers

2 months agogh-139001: Fix thread-safety issue in `pathlib.Path` (gh-139066)
Sam Gross [Fri, 10 Oct 2025 21:20:18 +0000 (17:20 -0400)] 
gh-139001: Fix thread-safety issue in `pathlib.Path` (gh-139066)

Don't cache the joined path in `_raw_path` because the caching isn't thread safe.

2 months agogh-138843: Removing "Unpacking" section from Download page (GH-139918)
Stan Ulbrych [Fri, 10 Oct 2025 19:22:34 +0000 (20:22 +0100)] 
gh-138843: Removing "Unpacking" section from Download page (GH-139918)

2 months agopathlib ABCs: restore `relative_to()` and `is_relative_to()` (#138853)
Barney Gale [Fri, 10 Oct 2025 18:08:55 +0000 (19:08 +0100)] 
pathlib ABCs: restore `relative_to()` and `is_relative_to()` (#138853)

Restore `JoinablePath.[is_]relative_to()`, which were deleted in
ef63cca494571f50906baae1d176469a3dcf8838. These methods are too useful to
forgo. Restore old tests, and add new tests covering path classes with
non-overridden `__eq__()` and `__hash__()`.

Slightly simplify `PurePath.relative_to()` while we're in the area.

No change to public APIs, because the pathlib ABCs are still private.

2 months agogh-139894: fix incorrect sharing of current task while forking in `asyncio` (#139897)
Kumar Aditya [Fri, 10 Oct 2025 16:28:23 +0000 (21:58 +0530)] 
gh-139894: fix incorrect sharing of current task while forking in `asyncio`  (#139897)

Fix incorrect sharing of current task with the forked child process by clearing thread state's current task and current loop in `PyOS_AfterFork_Child`.

2 months agogh-101100: Document `zlib` public constants to fix reference warnings (#139835)
Stan Ulbrych [Fri, 10 Oct 2025 15:32:44 +0000 (16:32 +0100)] 
gh-101100: Document `zlib` public constants to fix reference warnings (#139835)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 months agogh-139843: Document signals (SIGSTOP, SIGVTALRM, SIGPROF) to fix sphinx references...
Weilin Du [Fri, 10 Oct 2025 15:28:38 +0000 (23:28 +0800)] 
gh-139843: Document signals (SIGSTOP, SIGVTALRM, SIGPROF) to fix sphinx references (GH-139896)

2 months agogh-139065: Fix trailing space before long word in textwrap (GH-139070)
Serhiy Storchaka [Fri, 10 Oct 2025 13:29:18 +0000 (16:29 +0300)] 
gh-139065: Fix trailing space before long word in textwrap (GH-139070)

Fix trailing space before a wrapped long word if the line length with
a space is exactly "width".

2 months agogh-63161: Fix PEP 263 support (GH-139481)
Serhiy Storchaka [Fri, 10 Oct 2025 12:51:19 +0000 (15:51 +0300)] 
gh-63161: Fix PEP 263 support (GH-139481)

* Support non-UTF-8 shebang and comments if non-UTF-8 encoding is specified.
* Detect decoding error in comments for UTF-8 encoding.
* Include the decoding error position for default encoding in SyntaxError.

2 months agogh-129813: Fix PyBytesWriter tests (#139892)
Victor Stinner [Fri, 10 Oct 2025 11:01:06 +0000 (13:01 +0200)] 
gh-129813: Fix PyBytesWriter tests (#139892)

2 months agogh-139353: Add Objects/unicode_format.c file (#139491)
Victor Stinner [Fri, 10 Oct 2025 10:52:59 +0000 (12:52 +0200)] 
gh-139353: Add Objects/unicode_format.c file (#139491)

* Move PyUnicode_Format() implementation from unicodeobject.c
  to unicode_format.c.
* Replace unicode_modifiable() with _PyUnicode_IsModifiable()
* Add empty lines to have two empty lines between functions.