]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
17 hours agogh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email...
Serhiy Storchaka [Tue, 26 May 2026 18:52:47 +0000 (21:52 +0300)] 
gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959)

19 hours agogh-149879: Fix test_embed on Cygwin (#150441)
Victor Stinner [Tue, 26 May 2026 16:33:08 +0000 (18:33 +0200)] 
gh-149879: Fix test_embed on Cygwin (#150441)

19 hours agogh-149879: Fix test_venv on Cygwin (#150483)
Victor Stinner [Tue, 26 May 2026 16:32:13 +0000 (18:32 +0200)] 
gh-149879: Fix test_venv on Cygwin (#150483)

In copy mode, venv now also copies the cygpython DLL.

Fix test_zippath_from_non_installed_posix(): copy also the cygpython
DLL.

20 hours agogh-148557: Use em-config to locate trampoline clang (#148556)
Clément Péron [Tue, 26 May 2026 15:57:08 +0000 (17:57 +0200)] 
gh-148557: Use em-config to locate trampoline clang (#148556)

When CC is wrapped by ccache, the Emscripten trampoline rule cannot derive the
matching clang path by treating CC as a single executable path. Query the active
LLVM toolchain path with em-config instead.

22 hours agoGH-126910: Make `_Py_get_machine_stack_pointer` return the actual stack pointer ...
Mark Shannon [Tue, 26 May 2026 14:14:17 +0000 (15:14 +0100)] 
GH-126910: Make `_Py_get_machine_stack_pointer` return the actual stack pointer (GH-149103)

* Make _Py_ReachedRecursionLimit inline again
* Remove _Py_MakeRecCheck replacing its use with _Py_ReachedRecursionLimit
* Move the check for C stack swtiching into _Py_CheckRecursiveCall

23 hours agogh-139310: Revert test skip for `test_aead_aes_gcm` (GH-139552) (GH-149687)
Petr Viktorin [Tue, 26 May 2026 12:36:36 +0000 (14:36 +0200)] 
gh-139310: Revert test skip for `test_aead_aes_gcm` (GH-139552) (GH-149687)

This reverts commit 41712c4e095b2cc988febfe3887616c2779c6210.

Anyone running tests on a kernel with the bug will now see a failure.

32 hours agogh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (#150444)
Russell Keith-Magee [Tue, 26 May 2026 03:39:34 +0000 (11:39 +0800)] 
gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (#150444)

Exclude explicit dup3 and pipe2 checks on iOS builds.

33 hours agogh-149879: Fix test_math and test_statistics on Cygwin (#150432)
Victor Stinner [Tue, 26 May 2026 02:39:22 +0000 (04:39 +0200)] 
gh-149879: Fix test_math and test_statistics on Cygwin (#150432)

* Skip tests which fail on Cygwin: when Python is linked to
  the newlib C library.
* Rename test_random() to test_fma_random().
* Move tests on large integer values from testLog2() to
  testLog2Exact().

34 hours agogh-149879: Fix test_strptime on Cygwin (#150438)
Victor Stinner [Tue, 26 May 2026 02:25:07 +0000 (04:25 +0200)] 
gh-149879: Fix test_strptime on Cygwin (#150438)

Skip my_MM and or_IN locales on multiple tests, since the tests fail
on Cygwin.

34 hours agogh-149879: Fix multiprocessing resource tracker tests on Cygwin (#150440)
Victor Stinner [Tue, 26 May 2026 02:23:52 +0000 (04:23 +0200)] 
gh-149879: Fix multiprocessing resource tracker tests on Cygwin (#150440)

Skip test_resource_tracker_sigterm() if signal.pthread_sigmask() is
missing.

35 hours agogh-149931: Fix memory leaks on failed realloc (#149932)
AN Long [Tue, 26 May 2026 00:37:14 +0000 (09:37 +0900)] 
gh-149931: Fix memory leaks on failed realloc (#149932)

38 hours agogh-149619: Harden _remote_debugging error paths (#150349)
Pablo Galindo Salgado [Mon, 25 May 2026 22:22:46 +0000 (23:22 +0100)] 
gh-149619: Harden _remote_debugging error paths (#150349)

38 hours agogh-149879: Fix test_ftplib on Cygwin (#150431)
Victor Stinner [Mon, 25 May 2026 22:09:41 +0000 (00:09 +0200)] 
gh-149879: Fix test_ftplib on Cygwin (#150431)

Skip test_abort() since MSG_OOB doesn't work properly on Cygwin. The
server gets b'\n' and then b'ABOR\r', instead of getting b'ABOR\r\n'.

38 hours agogh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) (...
Pablo Galindo Salgado [Mon, 25 May 2026 22:01:27 +0000 (23:01 +0100)] 
gh-149800: Fix macOS universal2 build of perf trampoline (GH-149894 follow-up) (#150364)

After the perf trampoline assembly was split into per-architecture files,
the macOS universal2 build failed at the lipo step:

    fatal error: lipo: Python/asm_trampoline_aarch64.o and
    Python/asm_trampoline_x86_64.o have the same architectures (x86_64)
    and can't be in the same fat output file

PY_CORE_CFLAGS on universal2 contains "-arch arm64 -arch x86_64", so each
.S file was assembled into a fat .o containing both slices (with one slice
empty because of the #ifdef guards). lipo then refused to merge two fat
objects that share architectures.

Compile each per-arch object with a single -arch flag before merging.

39 hours agogh-150114: Use get_process_memory_usage() in memory watchdog (#150402)
Victor Stinner [Mon, 25 May 2026 21:15:12 +0000 (23:15 +0200)] 
gh-150114: Use get_process_memory_usage() in memory watchdog (#150402)

In practice, this change adds Windows, FreeBSD and macOS support
to the memory watchdog.

39 hours agogh-149879: Fix test_concurrent_futures on Cygwin (#150415)
Victor Stinner [Mon, 25 May 2026 21:04:14 +0000 (23:04 +0200)] 
gh-149879: Fix test_concurrent_futures on Cygwin (#150415)

On Cygwin, skip tests using "forkserver" start method.

Don't check BrokenProcessPool.__cause__, it's not set on Cygwin.

39 hours agogh-150427: Remove unused `__linecnt` attribute from `_sitebuiltins` (#150428)
Angelo Licastro [Mon, 25 May 2026 20:56:27 +0000 (16:56 -0400)] 
gh-150427: Remove unused `__linecnt` attribute from `_sitebuiltins` (#150428)

39 hours agogh-149879: Fix test_asyncio on Cygwin (#150416)
Victor Stinner [Mon, 25 May 2026 20:54:01 +0000 (22:54 +0200)] 
gh-149879: Fix test_asyncio on Cygwin (#150416)

Skip tests on UNIX sockets since they hang on Cygwin.

39 hours agogh-149879: Fix test_ssl on Cygwin (#150419)
Victor Stinner [Mon, 25 May 2026 20:32:37 +0000 (22:32 +0200)] 
gh-149879: Fix test_ssl on Cygwin (#150419)

On Cygwin, ignore EAGAIN in SSLSocket._create() if getpeername() fails.

40 hours agogh-149879: Fix test_httpservers on Cygwin (#150417)
Victor Stinner [Mon, 25 May 2026 19:50:35 +0000 (21:50 +0200)] 
gh-149879: Fix test_httpservers on Cygwin (#150417)

42 hours agogh-150387: Fix hang in test_run_failed_script_live on slow buildbots (#150405)
Pablo Galindo Salgado [Mon, 25 May 2026 18:17:00 +0000 (19:17 +0100)] 
gh-150387: Fix hang in test_run_failed_script_live on slow buildbots (#150405)

42 hours agogh-131372: Fix a typo on "with_build_details_suffix" in configure (#150414)
Stefano Rivera [Mon, 25 May 2026 17:33:59 +0000 (10:33 -0700)] 
gh-131372: Fix a typo on "with_build_details_suffix" in configure (#150414)

Fix a typo in an error-handling path.

43 hours agogh-149879: Fix test_termios and test_ioctl on Cygwin (#150412)
Victor Stinner [Mon, 25 May 2026 17:06:28 +0000 (19:06 +0200)] 
gh-149879: Fix test_termios and test_ioctl on Cygwin (#150412)

Skip tests failing on Cygwin.

45 hours agogh-150114: Log the memory usage in regrtest on macOS (gh-150396)
Donghee Na [Mon, 25 May 2026 15:03:06 +0000 (08:03 -0700)] 
gh-150114: Log the memory usage in regrtest on macOS (gh-150396)

46 hours agogh-150114: Fix get_process_memory_usage() on Windows (#150399)
Victor Stinner [Mon, 25 May 2026 14:04:37 +0000 (16:04 +0200)] 
gh-150114: Fix get_process_memory_usage() on Windows (#150399)

Catch OSError if the process exited.

46 hours agogh-150114: Log the memory usage in regrtest on FreeBSD (#150280)
Victor Stinner [Mon, 25 May 2026 13:45:55 +0000 (15:45 +0200)] 
gh-150114: Log the memory usage in regrtest on FreeBSD (#150280)

Add _testcapi.get_process_memory_usage().
On FreeBSD, _testcapi is now linked to libkvm.

47 hours agogh-80198: Improve test_pwd and test_grp (GH-150380)
Serhiy Storchaka [Mon, 25 May 2026 13:17:38 +0000 (16:17 +0300)] 
gh-80198: Improve test_pwd and test_grp (GH-150380)

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.

47 hours agogh-149156: Fix perf trampoline crash after fork (#150347)
Pablo Galindo Salgado [Mon, 25 May 2026 12:45:58 +0000 (13:45 +0100)] 
gh-149156: Fix perf trampoline crash after fork (#150347)

47 hours agogh-131372: Configurable build-details.json name (#150098)
Stefano Rivera [Mon, 25 May 2026 12:37:50 +0000 (05:37 -0700)] 
gh-131372: Configurable build-details.json name (#150098)

* Configurable build-details.json name

Linux distributions that co-install multiple Python versions in the same
path (e.g. multiarch on Debian, debug builds, and free-threading) need a
way to place multiple build-details.jsons side-by-side.

PEP-739 is being updated [0] to recommend renaming in this situation. To
ensure some standardization, this PR generates appropriate names for
distributions that need to use this feature.

[0]: https://github.com/python/peps/pull/4889

* NEWS entry

* Document configure option and add to whatsnew

47 hours agogh-150208: Avoid double-quoting string values in sysconfigdata (#150209)
Stefano Rivera [Mon, 25 May 2026 12:30:07 +0000 (05:30 -0700)] 
gh-150208: Avoid double-quoting string values in sysconfigdata (#150209)

String values from ``pyconfig.h`` were rendered into ``sysconfigdata``
variables, retaining the quotes.

2 days agogh-150379: fix ref leak in C API monitoring events (#150381)
pengyu lee [Mon, 25 May 2026 10:42:33 +0000 (18:42 +0800)] 
gh-150379: fix ref leak in C API monitoring events (#150381)

2 days agogh-145896: Fix typos and stale docstrings in the traceback module (GH-145897)
devdanzin [Mon, 25 May 2026 09:45:02 +0000 (06:45 -0300)] 
gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897)

2 days agogh-150374: Fix double release of import lock in lazy import reification (#150376)
pengyu lee [Mon, 25 May 2026 09:09:38 +0000 (17:09 +0800)] 
gh-150374: Fix double release of import lock in lazy import reification (#150376)

2 days agogh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373)
Serhiy Storchaka [Mon, 25 May 2026 07:49:21 +0000 (10:49 +0300)] 
gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373)

2 days agogh-150285: Fix too long docstrings in some Python modules (GH-150366)
Serhiy Storchaka [Mon, 25 May 2026 07:33:54 +0000 (10:33 +0300)] 
gh-150285: Fix too long docstrings in some Python modules (GH-150366)

2 days agogh-72902: Speedup Fraction.from_decimal/float in typical cases (GH-133251)
Sergey B Kirpichev [Mon, 25 May 2026 07:04:56 +0000 (10:04 +0300)] 
gh-72902: Speedup Fraction.from_decimal/float in typical cases (GH-133251)

2 days agogh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (#150323)
Pieter Eendebak [Sun, 24 May 2026 16:17:38 +0000 (18:17 +0200)] 
gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (#150323)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 days agogh-150315: increase test coverage for `asyncio._FlowControlMixin.set_write_buffer_lim...
Mohammad Reza [Sun, 24 May 2026 14:20:55 +0000 (17:50 +0330)] 
gh-150315: increase test coverage for `asyncio._FlowControlMixin.set_write_buffer_limits` (#150317)

2 days agogh-110704: Recommend `distclean` target over `clean` when source tree is not clean...
James [Sun, 24 May 2026 13:32:48 +0000 (09:32 -0400)] 
gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610)

Recommend `distclean` target over `clean` when source tree is not clean

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 days agogh-150285: Fix too long docstrings in Argument Clinic code (GH-150338)
Serhiy Storchaka [Sun, 24 May 2026 13:16:12 +0000 (16:16 +0300)] 
gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338)

2 days agogh-149619: Fix `_remote_debugging` permissions error on Linux (#150012)
ivonastojanovic [Sun, 24 May 2026 13:12:05 +0000 (14:12 +0100)] 
gh-149619: Fix `_remote_debugging` permissions error on Linux (#150012)

When running profiling on Linux without sudo, attempts to read
process memory would fail with the misleading error 'Failed to find
the PyRuntime section in process <pid> on Linux platform'.

The actual issue is a permissions error because profiling was not
run with sudo. We were clearing the exception on Linux when trying
to read memory, instead, we should bubble up the permissions error
and show it properly.

3 days agogh-150285: Fix too long docstrings in the os module (GH-150296)
Serhiy Storchaka [Sun, 24 May 2026 12:04:01 +0000 (15:04 +0300)] 
gh-150285: Fix too long docstrings in the os module (GH-150296)

3 days agogh-150285: Fix too long docstrings in the pyexpat module (GH-150294)
Serhiy Storchaka [Sun, 24 May 2026 12:03:45 +0000 (15:03 +0300)] 
gh-150285: Fix too long docstrings in the pyexpat module (GH-150294)

3 days agogh-150285: Fix too long docstrings in builtins (GH-150293)
Serhiy Storchaka [Sun, 24 May 2026 12:03:32 +0000 (15:03 +0300)] 
gh-150285: Fix too long docstrings in builtins (GH-150293)

* gh-150285: Fix too long docstrings in builtins

* Revert bytes and bytearray class multiline docstrings to make IDLE happy.

3 days agogh-150285: Fix too long docstrings in the zstd module (GH-150291)
Serhiy Storchaka [Sun, 24 May 2026 12:03:22 +0000 (15:03 +0300)] 
gh-150285: Fix too long docstrings in the zstd module (GH-150291)

3 days agogh-150285: Fix too long docstrings in the sqlite3 module (GH-150290)
Serhiy Storchaka [Sun, 24 May 2026 12:02:58 +0000 (15:02 +0300)] 
gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290)

3 days agogh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289)
Serhiy Storchaka [Sun, 24 May 2026 12:02:43 +0000 (15:02 +0300)] 
gh-150285: Fix too long docstrings in the _remote_debugging module (GH-150289)

3 days agogh-150285: Fix too long docstrings in the decimal module (GH-150288)
Serhiy Storchaka [Sun, 24 May 2026 12:02:32 +0000 (15:02 +0300)] 
gh-150285: Fix too long docstrings in the decimal module (GH-150288)

3 days agogh-150285: Fix too long docstrings in the io module (GH-150287)
Serhiy Storchaka [Sun, 24 May 2026 12:02:21 +0000 (15:02 +0300)] 
gh-150285: Fix too long docstrings in the io module (GH-150287)

3 days agogh-150285: Fix too long docstrings in the curses module (GH-150286)
Serhiy Storchaka [Sun, 24 May 2026 12:02:12 +0000 (15:02 +0300)] 
gh-150285: Fix too long docstrings in the curses module (GH-150286)

3 days agogh-148932: Docs / `profiling.sampling` Windows limitations (#150272)
Eduardo Villalpando Mello [Sun, 24 May 2026 11:54:36 +0000 (04:54 -0700)] 
gh-148932: Docs / `profiling.sampling` Windows limitations (#150272)

3 days agogh-119949: Refactor test_exc() helper in test_format.py (GH-135452)
Sergey B Kirpichev [Sun, 24 May 2026 10:24:59 +0000 (13:24 +0300)] 
gh-119949: Refactor test_exc() helper in test_format.py (GH-135452)

Use assertRaisesRegex() context and fix
https://github.com/python/cpython/pull/119781#pullrequestreview-2088240959

* address review: minimize diff

3 days agogh-148444: Use "zero of any numeric type" instead of "numeric zero of all types"...
siliconforks [Sun, 24 May 2026 07:22:13 +0000 (04:22 -0300)] 
gh-148444: Use "zero of any numeric type" instead of "numeric zero of all types" (#148455)

3 days agogh-150244: Fix `test_create_subprocess_env_shell` to handle PATH with spaces (#150281)
Eduardo Villalpando Mello [Sun, 24 May 2026 06:45:56 +0000 (23:45 -0700)] 
gh-150244: Fix `test_create_subprocess_env_shell` to handle PATH with spaces (#150281)

3 days agogh-150258: Show relative percentage on Tachyon flamegraph (#150266)
Eduardo Villalpando Mello [Sat, 23 May 2026 12:31:26 +0000 (05:31 -0700)] 
gh-150258: Show relative percentage on Tachyon flamegraph (#150266)

When running profiling, users rarely care about the global percentage of
the runtime. Often, they want to select a function and measure child
percentages relative to that.

This PR updates the flamegraph tooltips to show both "Percentage" and
"Relative Percentage" when the user clicks a specific function.

4 days agogh-149800: Split perf trampoline assembly into per-architecture files (#149894)
stratakis [Sat, 23 May 2026 12:03:52 +0000 (14:03 +0200)] 
gh-149800: Split perf trampoline assembly into per-architecture files (#149894)

4 days agogh-145192: improve performance of `PySequence_GetSlice` (#145193)
Pieter Eendebak [Sat, 23 May 2026 10:15:50 +0000 (12:15 +0200)] 
gh-145192: improve performance of `PySequence_GetSlice` (#145193)

4 days agogh-149816: add missing critical section on self in buffered_iternext (#150295)
Kumar Aditya [Sat, 23 May 2026 08:57:13 +0000 (14:27 +0530)] 
gh-149816: add missing critical section on self in buffered_iternext (#150295)

4 days agogh-150116 Remove dead try/except in `asyncio.Lock._wake_up_first` (#150117)
deadlovelll [Sat, 23 May 2026 08:46:52 +0000 (11:46 +0300)] 
gh-150116 Remove dead try/except in `asyncio.Lock._wake_up_first` (#150117)

4 days agogh-150178: Fix refcount leaks in hamt allocation failure paths (#150179)
pengyu lee [Sat, 23 May 2026 08:33:40 +0000 (16:33 +0800)] 
gh-150178: Fix refcount leaks in hamt allocation failure paths (#150179)

4 days agogh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed...
Hai Zhu [Sat, 23 May 2026 08:25:44 +0000 (16:25 +0800)] 
gh-148450: `abc.register` needs to update `type_version` when `tp_flags` is changed (#148623)

4 days agogh-150232: update Thread group parameter doc (#150283)
My-ABC [Sat, 23 May 2026 08:22:44 +0000 (16:22 +0800)] 
gh-150232: update Thread group parameter doc (#150283)

4 days agogh-150114: Log the memory usage in regrtest on Windows (#150267)
Victor Stinner [Fri, 22 May 2026 22:04:51 +0000 (00:04 +0200)] 
gh-150114: Log the memory usage in regrtest on Windows (#150267)

Add _winapi.GetProcessMemoryInfo() function.

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
4 days agogh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269)
Omkar Kabde [Fri, 22 May 2026 21:02:56 +0000 (02:32 +0530)] 
gh-82907: Document mtime=0 for reproducible tarfile gzip output (GH-150269)

4 days agogh-150114: Log the memory usage in regrtest in sequential mode (#150264)
Victor Stinner [Fri, 22 May 2026 20:26:15 +0000 (22:26 +0200)] 
gh-150114: Log the memory usage in regrtest in sequential mode (#150264)

4 days agoRevert "gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix...
Victor Stinner [Fri, 22 May 2026 20:22:47 +0000 (22:22 +0200)] 
Revert "gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (#150025)" (#150261)

This reverts commit 57a0e570d36f41b953a91bbaf4262a5d05d0391b.

4 days agogh-149189: Revert "Modern defaults for `pprint` (#149190)" (#150249)
Hugo van Kemenade [Fri, 22 May 2026 20:22:03 +0000 (23:22 +0300)] 
gh-149189: Revert "Modern defaults for `pprint` (#149190)" (#150249)

4 days agogh-149879: Fix test_capi on Cygwin (#150252)
Victor Stinner [Fri, 22 May 2026 19:47:32 +0000 (21:47 +0200)] 
gh-149879: Fix test_capi on Cygwin (#150252)

Fix Test_Pep523AllowSpecialization tests of test_capi.test_misc.

On Cygwin, _PyEval_EvalFrameDefault in _testinternalcapi is not the
same as _PyEval_EvalFrameDefault in python.exe. So pass NULL
explicitly to use the default function (_PyEval_EvalFrameDefault).

4 days agogh-149879: Fix test_c_stack_unwind on Cygwin (#150084)
Victor Stinner [Fri, 22 May 2026 19:32:44 +0000 (21:32 +0200)] 
gh-149879: Fix test_c_stack_unwind on Cygwin (#150084)

On Cygwin, the Python library is called "cygpython3.16.dll".

4 days agogh-149879: Fix test__locale on Cygwin (#150248)
Victor Stinner [Fri, 22 May 2026 19:31:12 +0000 (21:31 +0200)] 
gh-149879: Fix test__locale on Cygwin (#150248)

On Cygwin with the LC_TIME locale "ja_JP", nl_langinfo(ALT_DIGITS)
returns 101 items instead of 100.

4 days agogh-150114: Log the memory usage in regrtest (#150255)
Victor Stinner [Fri, 22 May 2026 17:05:45 +0000 (19:05 +0200)] 
gh-150114: Log the memory usage in regrtest (#150255)

On Linux, log the total memory usage of all Python test processes.
Read the private memory in /proc/pid/smaps.

4 days agoRemove 'expat' dependency for Linux in `Misc/Brewfile` (#150118)
Brett Cannon [Fri, 22 May 2026 14:21:16 +0000 (07:21 -0700)] 
Remove 'expat' dependency for Linux in `Misc/Brewfile` (#150118)

4 days agogh-149879: Fix test_c_locale_coercion on Cygwin (#150250)
Victor Stinner [Fri, 22 May 2026 13:47:38 +0000 (15:47 +0200)] 
gh-149879: Fix test_c_locale_coercion on Cygwin (#150250)

5 days agogh-91372: Add mtime to gzip.open() (GH-32310)
Marin Misur [Fri, 22 May 2026 12:14:25 +0000 (14:14 +0200)] 
gh-91372: Add mtime to gzip.open() (GH-32310)

5 days agogh-149902: Remove dead packaging docs link and add a new section for external resourc...
Mia Albert [Fri, 22 May 2026 11:32:14 +0000 (07:32 -0400)] 
gh-149902: Remove dead packaging docs link and add a new section for external resources (#150030)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 days agogh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read()...
Serhiy Storchaka [Fri, 22 May 2026 09:17:34 +0000 (12:17 +0300)] 
gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222)

This has not been observed in practice, but we cannot be 100% sure that
it will not happen with some weird gzip data.

5 days agogh-133998: Fix gzip file creation when time is out of range (GH-134278)
adang1345 [Fri, 22 May 2026 07:20:08 +0000 (00:20 -0700)] 
gh-133998: Fix gzip file creation when time is out of range (GH-134278)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 days agogh-149995: Update typing.py docstrings and documentation (#149996)
Jelle Zijlstra [Fri, 22 May 2026 04:06:42 +0000 (21:06 -0700)] 
gh-149995: Update typing.py docstrings and documentation (#149996)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.

5 days agogh-148294: Make configure find g++ correctly (GH-148298)
sendaoYan [Fri, 22 May 2026 01:46:41 +0000 (09:46 +0800)] 
gh-148294: Make configure find g++ correctly (GH-148298)

The `AC_PATH_TOOL` calls had included a duplicated argument, causing a "`PATH`"
consisting of `notfound` to be searched instead of `$PATH`.

5 days agogh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPA...
Barry Warsaw [Thu, 21 May 2026 21:44:13 +0000 (14:44 -0700)] 
gh-149819: fix .pth and .start file processing in subprocess when inheriting PYTHONPATH (#150177)

* gh-149819: Fix .pth files not loaded in Python subprocesses

After PR gh-149583 (Fix double evaluation of .pth and .site files in
venvs), .pth files are no longer loaded in subprocesses started with
subprocess.run([sys.executable, ...]).  The root cause: main() seeds
known_paths from removeduppaths() with all sys.path entries inherited
from the parent process.  addsitedir() then skips .pth processing for
every directory already in known_paths.

Fix:
- main(): call removeduppaths() for dedup but start known_paths as a
  fresh empty set, so that addsitedir() processes .pth files in every
  site-packages directory regardless of inherited sys.path.
- addsitedir(): move known_paths.add() before the sys.path.append and
  guard the append with 'sitedir not in sys.path' to avoid creating
  duplicate entries when called with a fresh known_paths.

This preserves the gh-75723 dedup guarantee while allowing subprocesses
to load .pth files.

* Fill out the tests for GH#149888

* Extend _make_start() and _make_pth() to take an optional `basedir` which is used instead of
 `site.tmpdir` if given.
* Add test_pth_processed_when_sitedir_already_on_path() to test the core GH#149819 bug: .pth files
  in subprocesses aren't handled if PYTHONPATH pointing to the .pth directory is inherited.
* Similarly add test_start_processed_when_sitedir_already_on_path() to verify that .start files in
  the same circumstances are also now processed.

* Update Lib/site.py

Co-authored-by: scoder <stefan_ml@behnel.de>
* Oops!  Remove redundant code

---------

Co-authored-by: BugBounty Mind <bugbounty-mind@deepseek.tui>
Co-authored-by: scoder <stefan_ml@behnel.de>
5 days agogh-107398: Fix tarfile stream mode exception when process the file with the gzip...
Nadeshiko Manju [Thu, 21 May 2026 19:12:09 +0000 (03:12 +0800)] 
gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 days agoRemove accidentally added `Python/deepfreeze/deepfreeze.c` (gh-150192)
Stan Ulbrych [Thu, 21 May 2026 16:37:49 +0000 (17:37 +0100)] 
Remove accidentally added `Python/deepfreeze/deepfreeze.c` (gh-150192)

5 days agogh-149358: Generating JIT recorder transformers and stabilizing family layouts (GH...
Hai Zhu [Thu, 21 May 2026 16:06:52 +0000 (00:06 +0800)] 
gh-149358: Generating JIT recorder transformers and stabilizing family layouts (GH-149359)

5 days agogh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` ...
Hai Zhu [Thu, 21 May 2026 14:57:31 +0000 (22:57 +0800)] 
gh-149335: Avoid JIT trace buffer asserts with overhead above `FITNESS_INITIAL` (GH-149633)

5 days agogh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT (GH-149688)
Pieter Eendebak [Thu, 21 May 2026 14:54:46 +0000 (16:54 +0200)] 
gh-148871: Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT (GH-149688)

6 days agogh-149219: Test `frozendict` in `Lib/test/test_crossinterp.py` (#149220)
sobolevn [Thu, 21 May 2026 09:28:38 +0000 (12:28 +0300)] 
gh-149219: Test `frozendict` in `Lib/test/test_crossinterp.py` (#149220)

6 days agogh-149981: Test lazy import corner cases with module-level `__getattr__` (#149982)
sobolevn [Thu, 21 May 2026 09:21:45 +0000 (12:21 +0300)] 
gh-149981: Test lazy import corner cases with module-level `__getattr__` (#149982)

6 days agogh-150175: Fix ThreadingMock call_count race condition (#150176)
saisneha196 [Thu, 21 May 2026 07:38:07 +0000 (13:08 +0530)] 
gh-150175: Fix ThreadingMock call_count race condition (#150176)

ThreadingMock._increment_mock_call() was not thread-safe.
Multiple threads calling the mock simultaneously could lose
increments due to race conditions on call_count and other
attributes.

Fix by overriding _increment_mock_call in ThreadingMixin
and wrapping it with the existing _mock_calls_events_lock.

6 days agogh-143387: Add news blurb for importlib.metadata highlighting the change. (#150169)
Jason R. Coombs [Wed, 20 May 2026 19:40:15 +0000 (12:40 -0700)] 
gh-143387: Add news blurb for importlib.metadata highlighting the change. (#150169)

6 days agoAdd summary table to the `unicodedata` doc (#149957)
Stan Ulbrych [Wed, 20 May 2026 15:04:10 +0000 (16:04 +0100)] 
Add summary table to the `unicodedata` doc (#149957)

6 days agogh-150146: Fix NULL dereference in `_Py_subs_parameters` (#150147)
sobolevn [Wed, 20 May 2026 13:27:55 +0000 (16:27 +0300)] 
gh-150146: Fix NULL dereference in `_Py_subs_parameters` (#150147)

7 days agogh-149584: Fix excessive overhead in the Tachyon profiler regarding the cache behavio...
Pablo Galindo Salgado [Wed, 20 May 2026 11:32:08 +0000 (04:32 -0700)] 
gh-149584: Fix excessive overhead in the Tachyon profiler regarding the cache behavior (#149649)

Use exact remote reads for interpreter state, thread state, and
interpreter frame structs instead of pulling full remote pages into the
profiler page cache. This matches the core change from
python/cpython#149585.

The profiler clears the page cache between samples, so live entries are
always packed at the front. Track the live count and only clear/search
that prefix instead of scanning all 1024 slots on the hot path.

Use the frame cache to predict the next thread state and top frame
address, then batch interpreter/thread/frame reads with process_vm_readv
when profiling a Linux target. Reuse prefetched frame buffers in the
frame walker when the prediction is valid.

Cache the last FrameInfo tuple per code object/instruction offset, reuse
cached thread id objects, and append cached parent frames directly on
full frame-cache hits. This cuts Python allocation churn in the
steady-state profiler path.

7 days agogh-150034: Print JSONL filename when profiling finishes (#150035)
László Kiss Kollár [Wed, 20 May 2026 11:29:48 +0000 (04:29 -0700)] 
gh-150034: Print JSONL filename when profiling finishes (#150035)

7 days agogh-149807: Fix hash(frozendict): compute (key, value) pair hash (#149841)
Victor Stinner [Wed, 20 May 2026 11:22:57 +0000 (13:22 +0200)] 
gh-149807: Fix hash(frozendict): compute (key, value) pair hash (#149841)

7 days agogh-148260: Use at least 1 MiB stack size on musl (#149993)
Victor Stinner [Wed, 20 May 2026 11:21:59 +0000 (13:21 +0200)] 
gh-148260: Use at least 1 MiB stack size on musl (#149993)

On Linux when Python is linked to the musl C library, use a thread
stack size of at least 1 MiB instead of musl default which is 128
kiB.

7 days agogh-146406: add clear() cross-language hint for immutable types (GH-149927)
Matt Van Horn [Wed, 20 May 2026 03:01:15 +0000 (20:01 -0700)] 
gh-146406: add clear() cross-language hint for immutable types (GH-149927)

7 days agogh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (#134264)
Caleb [Wed, 20 May 2026 01:36:19 +0000 (21:36 -0400)] 
gh-134261: ZipFile - Don't rely on local time for reproducible builds & tests (#134264)

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
7 days agoPEP 810 - Update some error strings (#150126)
Tim Stumbaugh [Wed, 20 May 2026 00:47:44 +0000 (18:47 -0600)] 
PEP 810 - Update some error strings (#150126)

7 days agogh-149321: Remove lazy_imports=none startup mode (#149389)
Pablo Galindo Salgado [Tue, 19 May 2026 23:01:15 +0000 (16:01 -0700)] 
gh-149321: Remove lazy_imports=none startup mode (#149389)

7 days agogh-150042: queue.SimpleQueue.put: fix minor refleak. (GH-150043)
larryhastings [Tue, 19 May 2026 22:27:04 +0000 (15:27 -0700)] 
gh-150042: queue.SimpleQueue.put: fix minor refleak. (GH-150043)

If queue.SimpleQueue.put can't handoff the item to a
waiting thread, and fails to allocate memory when adding
the item to a ringbuf, it would leak a reference.  Fixed.