]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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)

5 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)

5 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.

5 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)

5 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).

5 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".

5 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.

5 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.

5 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)

5 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>
6 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>
6 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)

6 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)

6 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)

6 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.

7 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)

7 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)

7 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.

7 days agogh-149816: Fix UAF in Modules/_pickle.c (GH-150024)
Alexey Katsman [Tue, 19 May 2026 22:11:17 +0000 (15:11 -0700)] 
gh-149816: Fix UAF in Modules/_pickle.c (GH-150024)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
7 days agogh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115)
Sam Gross [Tue, 19 May 2026 21:36:31 +0000 (21:36 +0000)] 
gh-150114: Reduce memory usage of test_free_threading.test_iteration (gh-150115)

Reduce NUMITEMS from 100000 to 5000. Peak RSS for the full
test_free_threading suite drops from ~850 MB to ~175 MB.

7 days agoMark PRs as stale after 90 days (#150104)
Hugo van Kemenade [Tue, 19 May 2026 21:13:37 +0000 (00:13 +0300)] 
Mark PRs as stale after 90 days (#150104)

7 days agogh-134887: Add references to `locale` module for locale-aware number formatting refer...
Stefanie Molin [Tue, 19 May 2026 21:10:39 +0000 (17:10 -0400)] 
gh-134887: Add references to `locale` module for locale-aware number formatting references in `string` module docs (GH-134888)

7 days agogh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984)
AN Long [Tue, 19 May 2026 20:31:00 +0000 (05:31 +0900)] 
gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984)

7 days agogh-124111: Keep tests passing for Tcl prior to 9.0 (GH-150102)
Steve Dower [Tue, 19 May 2026 20:27:44 +0000 (21:27 +0100)] 
gh-124111: Keep tests passing for Tcl prior to 9.0 (GH-150102)

Also disables the UWP build in CI, since it was breaking (and is no longer released).

8 days agogh-143387: Update docs to reflect the behavior and note the changed version. (#150095)
Jason R. Coombs [Tue, 19 May 2026 19:38:27 +0000 (12:38 -0700)] 
gh-143387: Update docs to reflect the behavior and note the changed version. (#150095)

8 days agogh-149816: Fix SNI callback callable race (GH-150018)
Kirill Ignatev [Tue, 19 May 2026 18:36:46 +0000 (11:36 -0700)] 
gh-149816: Fix SNI callback callable race (GH-150018)

8 days agogh-150027: Avoid copying during construction of `frozenset` objects (GH-150028)
Peter Bierma [Tue, 19 May 2026 17:57:37 +0000 (13:57 -0400)] 
gh-150027: Avoid copying during construction of `frozenset` objects (GH-150028)

8 days agogh-149473: Emit audit event on calling os.environ.clear() (#149768)
Victor Stinner [Tue, 19 May 2026 16:38:12 +0000 (18:38 +0200)] 
gh-149473: Emit audit event on calling os.environ.clear() (#149768)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
8 days agogh-149945: Fix potential OOM for gzip with large header (GH-149979)
Serhiy Storchaka [Tue, 19 May 2026 16:20:01 +0000 (19:20 +0300)] 
gh-149945: Fix potential OOM for gzip with large header (GH-149979)

Do not read the whole filename and comment to memory for calculating the CRC.

8 days agogh-148829: Make sentinels' repr and module customizable (#149654)
Jelle Zijlstra [Tue, 19 May 2026 16:18:56 +0000 (09:18 -0700)] 
gh-148829: Make sentinels' repr and module customizable (#149654)

Implementation of python/peps#4968; still needs SC approval.

8 days agogh-149879: Fix test_tempfile on Cygwin (#150081)
Victor Stinner [Tue, 19 May 2026 14:09:03 +0000 (16:09 +0200)] 
gh-149879: Fix test_tempfile on Cygwin (#150081)

On Cygwin, text files are not truncated at the first Ctrl+Z byte.

8 days agogh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)
Serhiy Storchaka [Tue, 19 May 2026 08:36:12 +0000 (11:36 +0300)] 
gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994)

Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
8 days agogh-145098: Use `macos-26-intel` instead of `macos-15-intel` (#149991)
Hugo van Kemenade [Tue, 19 May 2026 04:41:25 +0000 (07:41 +0300)] 
gh-145098: Use `macos-26-intel` instead of `macos-15-intel` (#149991)

This reverts commit cb76ab3819f778e55a3f49ddb1f681ee20978eda.

8 days agogh-86533: Make Path.mkdir parent_mode tests umask-independent (#150040)
Gregory P. Smith [Tue, 19 May 2026 01:19:06 +0000 (18:19 -0700)] 
gh-86533: Make Path.mkdir parent_mode tests umask-independent (#150040)

test_mkdir_with_parent_mode, test_mkdir_parent_mode_deep_hierarchy and
test_mkdir_parent_mode_same_as_mode assert exact directory mode bits but
did not pin the process umask.  On buildbots running with a restrictive
umask (e.g. 0o077) the 0o755 leaf was masked down to 0o700, failing the
assertions.  Wrap them in os_helper.temp_umask(0o022), matching the
other umask-aware mkdir tests in this file.

8 days agogh-69619: Clarify whitespace definition in str.strip docs (GH-150021)
Daniil [Tue, 19 May 2026 01:10:50 +0000 (04:10 +0300)] 
gh-69619: Clarify whitespace definition in str.strip docs (GH-150021)

8 days agogh-141968: Use `take_bytes` to remove copy in `_pyio.BytesIO.read()` (#149850)
Lukas Geiger [Tue, 19 May 2026 00:48:41 +0000 (01:48 +0100)] 
gh-141968: Use `take_bytes` to remove copy in `_pyio.BytesIO.read()` (#149850)

8 days agogh-79413: Add `qualname` parameter to `dataclass.make_dataclass`. (GH-150026)
Dan Shernicoff [Mon, 18 May 2026 23:55:47 +0000 (16:55 -0700)] 
gh-79413: Add `qualname` parameter to `dataclass.make_dataclass`. (GH-150026)

Added `qualname` parameter to `dataclasses.make_dataclass` in order to allow user to set `__qualname__` for the generated class.

8 days agogh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race...
Saul Cooperman [Mon, 18 May 2026 23:26:08 +0000 (16:26 -0700)] 
gh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (#150025)

Remove assertion that could fail in rare race condition.

Replace the coarse critical section wrapping the entire function with
fine-grained sections covering only PyDict_Next + Py_INCREF.
Also handle PyDict_Next returning 0 in the single-item fast path.

8 days agogh-149590: Remove faulthandler_traverse (#150023)
Armaan Vakharia [Mon, 18 May 2026 23:00:59 +0000 (16:00 -0700)] 
gh-149590: Remove faulthandler_traverse (#150023)

`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.

8 days agogh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011)
nessita [Mon, 18 May 2026 23:00:27 +0000 (20:00 -0300)] 
gh-86533: Restore os.makedirs() ability to apply *mode* recursively (GH-150011)

bpo-42367: Restore os.makedirs() and pathlib.mkdir() ability to apply *mode* recursively via a new parent_mode= keyword argument.

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
8 days agogh-149879: Fix multiprocessing tests on Cygwin (#150031)
Victor Stinner [Mon, 18 May 2026 22:45:35 +0000 (00:45 +0200)] 
gh-149879: Fix multiprocessing tests on Cygwin (#150031)

* Disable AF_UNIX connection family on Cygwin.
* forkserver start method is not available on Cygwin: update tests
  for that.
* test_logging calls multiprocessing.get_all_start_methods().

8 days agogh-72088: clarify `inspect.ismethod` and `inspect.isfunction` (and related) usage...
Stefanie Molin [Mon, 18 May 2026 22:42:55 +0000 (18:42 -0400)] 
gh-72088: clarify `inspect.ismethod` and `inspect.isfunction` (and related) usage with class-level access (GH-150013)

Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
9 days agogh-149980: Strip all trailing slashes from GNU long directory names in tarfile (GH...
ankhikarmakar [Mon, 18 May 2026 19:31:15 +0000 (12:31 -0700)] 
gh-149980: Strip all trailing slashes from GNU long directory names in tarfile (GH-150019)

9 days agogh-149977: Fix extra output of `-m test test_lazy_import` (#149978)
sobolevn [Mon, 18 May 2026 18:55:27 +0000 (21:55 +0300)] 
gh-149977: Fix extra output of `-m test test_lazy_import` (#149978)

9 days agogh-140344: ast: Add deprecation warnings (#140345)
Jeff Epler [Mon, 18 May 2026 18:20:49 +0000 (11:20 -0700)] 
gh-140344: ast: Add deprecation warnings (#140345)

These were all deprecated in 3.9 (bace59d8b8) but without
a runtime deprecation warning. Add it now, so that these
items can be removed in 3.21 per PEP 387.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
9 days agogh-95816: Fix TLS version range example in docs (GH-148574)
Jan Brasna [Mon, 18 May 2026 18:01:56 +0000 (20:01 +0200)] 
gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example

9 days agogh-149816: fix thread safety of deletion of list slice (#149936)
Kumar Aditya [Mon, 18 May 2026 16:38:37 +0000 (22:08 +0530)] 
gh-149816: fix thread safety of deletion of list slice (#149936)

9 days agogh-149816: fix `dict.clear()` race on split-table dict with non-embedded values ...
Kumar Aditya [Mon, 18 May 2026 16:09:45 +0000 (21:39 +0530)] 
gh-149816: fix `dict.clear()` race on split-table dict with non-embedded values (#149914)

9 days agogh-149816: Fix a RC in `_random.Random.__init__` method (#149824)
sobolevn [Mon, 18 May 2026 15:39:54 +0000 (18:39 +0300)] 
gh-149816: Fix a RC in `_random.Random.__init__` method (#149824)

9 days agogh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (#148032)
Hugo van Kemenade [Mon, 18 May 2026 14:57:02 +0000 (17:57 +0300)] 
gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (#148032)

9 days agogh-149464: Add `os.pidfd_getfd(pidfd, targetfd, flags=0)` function (#149465)
Maurycy Pawłowski-Wieroński [Mon, 18 May 2026 14:29:58 +0000 (16:29 +0200)] 
gh-149464: Add `os.pidfd_getfd(pidfd, targetfd, flags=0)` function (#149465)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
9 days agogh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900)
Nathan Goldbaum [Mon, 18 May 2026 13:24:06 +0000 (07:24 -0600)] 
gh-149887: Install python3t.lib for GIL-enabled Windows install (GH-149900)

9 days agogh-149953: Fix null pointer dereference order in `code_objects.c` (#149956)
Nezuko Agent [Mon, 18 May 2026 08:28:28 +0000 (15:28 +0700)] 
gh-149953: Fix null pointer dereference order in `code_objects.c` (#149956)

Move  check before

9 days agogh-144140: Optimize len for frozen dict/set constants in optimizer (#149969)
Lukas Geiger [Mon, 18 May 2026 06:50:42 +0000 (07:50 +0100)] 
gh-144140: Optimize len for frozen dict/set constants in optimizer (#149969)

9 days agogh-138325: steal list items in `INTRINSIC_LIST_TO_TUPLE` opcode (#149960)
Pieter Eendebak [Mon, 18 May 2026 06:37:12 +0000 (08:37 +0200)] 
gh-138325: steal list items in `INTRINSIC_LIST_TO_TUPLE` opcode (#149960)

10 days agogh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (#149922) 149613/head
AN Long [Sun, 17 May 2026 10:09:19 +0000 (19:09 +0900)] 
gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (#149922)

10 days agogh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (#146470)
Farhan Saif [Sun, 17 May 2026 09:05:27 +0000 (04:05 -0500)] 
gh-146452: Fix pickle segfault on concurrent mutation of dict in pickle (#146470)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
10 days agogh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917)
Serhiy Storchaka [Sun, 17 May 2026 08:06:35 +0000 (11:06 +0300)] 
gh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917)

10 days agogh-149857: Clarify multiprocessing Process argument wording (GH-149919)
Mani Salahmand [Sun, 17 May 2026 06:01:50 +0000 (08:01 +0200)] 
gh-149857: Clarify multiprocessing Process argument wording (GH-149919)

Use consistent 'picklable' wording

11 days agogh-67512: Document IMAP4.append() flags argument (#149907)
Savage Mechanic [Sat, 16 May 2026 18:24:41 +0000 (19:24 +0100)] 
gh-67512: Document IMAP4.append() flags argument (#149907)

11 days agogh-149879: Fix test_socket on Cygwin (#149913)
Victor Stinner [Sat, 16 May 2026 10:02:19 +0000 (12:02 +0200)] 
gh-149879: Fix test_socket on Cygwin (#149913)

Disable SCM_RIGHTS, recvmsg(), sendmsg() and sethostname() on Cygwin.

11 days agogh-149879: Fix test_os on Cygwin (#149910)
Victor Stinner [Sat, 16 May 2026 08:50:55 +0000 (10:50 +0200)] 
gh-149879: Fix test_os on Cygwin (#149910)

11 days agogh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (#149909)
sobolevn [Sat, 16 May 2026 08:37:34 +0000 (11:37 +0300)] 
gh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (#149909)

11 days agogh-149879: Fix test_resource on Cygwin (#149903)
Victor Stinner [Fri, 15 May 2026 23:09:36 +0000 (01:09 +0200)] 
gh-149879: Fix test_resource on Cygwin (#149903)

Setting RLIMIT_FSIZE or RLIMIT_CPU fails with EINVAL on Cygwin.

11 days agogh-149879: Don't import msvcrt in _pyio on Cygwin (#149899)
Victor Stinner [Fri, 15 May 2026 21:11:09 +0000 (23:11 +0200)] 
gh-149879: Don't import msvcrt in _pyio on Cygwin (#149899)

The msvcrt extension module cannot be built on Cygwin.

11 days agogh-149879: Fix test_tarfile on Cygwin (#149897)
Victor Stinner [Fri, 15 May 2026 20:49:37 +0000 (22:49 +0200)] 
gh-149879: Fix test_tarfile on Cygwin (#149897)

On Cygwin, there is no root user (uid 0).

Fix test_realpath_limit_attack(): the test fails with ELOOP on
Cygwin.

12 days agogh-149879: Fix test_signal on Cygwin (#149896)
Victor Stinner [Fri, 15 May 2026 19:32:10 +0000 (21:32 +0200)] 
gh-149879: Fix test_signal on Cygwin (#149896)

* Check for SIG_BLOCK instead of pthread_sigmask() to decide if
  SIG_BLOCK, SIG_UNBLOCK and SIG_SETMASK constants should be
  converted to enums.
* Skip ITIMER_VIRTUAL and ITIMER_PROF tests on Cygwin: setitimer()
  fails with ItimerError(EINVAL).

12 days agogh-149567: Remove deprecated `shutil.ExecError` (#149568)
Stan Ulbrych [Fri, 15 May 2026 17:54:05 +0000 (18:54 +0100)] 
gh-149567: Remove deprecated `shutil.ExecError` (#149568)

12 days agogh-149879: Set thread name max length on Cygwin (#149890)
Victor Stinner [Fri, 15 May 2026 16:57:05 +0000 (18:57 +0200)] 
gh-149879: Set thread name max length on Cygwin (#149890)

This change fix test_threading on Cygwin.

12 days agogh-149879: Fix test_pwd on Cygwin (#149880)
Victor Stinner [Fri, 15 May 2026 16:33:46 +0000 (18:33 +0200)] 
gh-149879: Fix test_pwd on Cygwin (#149880)

On Cygwin, pwd.getpwuid(-1) returns an user ('Unknown+User').

12 days agogh-142349: Add `help("lazy")` support (#149886)
sobolevn [Fri, 15 May 2026 16:30:40 +0000 (19:30 +0300)] 
gh-142349: Add `help("lazy")` support (#149886)

12 days agogh-149879: Fix sys.orig_argv[0] on Cygwin: add ".exe" suffix (#149885)
Victor Stinner [Fri, 15 May 2026 15:55:34 +0000 (17:55 +0200)] 
gh-149879: Fix sys.orig_argv[0] on Cygwin: add ".exe" suffix (#149885)

12 days agogh-149831: Fix ctypes DLL library name on Cygwin (#149832)
Carlo Bramini [Fri, 15 May 2026 14:29:26 +0000 (16:29 +0200)] 
gh-149831: Fix ctypes DLL library name on Cygwin (#149832)

Co-authored-by: Victor Stinner <vstinner@python.org>
12 days agoCI: Move Homebrew dependencies into Brewfile (#148335)
Hugo van Kemenade [Fri, 15 May 2026 14:03:46 +0000 (17:03 +0300)] 
CI: Move Homebrew dependencies into Brewfile (#148335)

Co-authored-by: Brett Cannon <brett@python.org>
12 days agogh-149833: Change DLL prefix to "cygpython" on Cygwin (#149834)
Carlo Bramini [Fri, 15 May 2026 13:54:08 +0000 (15:54 +0200)] 
gh-149833: Change DLL prefix to "cygpython" on Cygwin (#149834)

Co-authored-by: Victor Stinner <vstinner@python.org>
12 days agogh-149786: Fixes venvlauncher builds on Windows free-threaded (GH-149847)
Steve Dower [Fri, 15 May 2026 13:43:41 +0000 (14:43 +0100)] 
gh-149786: Fixes venvlauncher builds on Windows free-threaded (GH-149847)

12 days agogh-138489: Add build-details.json generation to PC/layout (GH-149153)
Steve Dower [Fri, 15 May 2026 12:51:27 +0000 (13:51 +0100)] 
gh-138489: Add build-details.json generation to PC/layout (GH-149153)

12 days agogh-148200: Update Modules/_hacl/ for Cygwin (#149802)
Victor Stinner [Fri, 15 May 2026 12:42:30 +0000 (14:42 +0200)] 
gh-148200: Update Modules/_hacl/ for Cygwin (#149802)

This pulls an updated version of HACL* that fixes Lib_Memzero0.c on
Cygwin, via an upstream fix.

12 days agogh-149816: Fix race condition in `memoryview` with free-threading (#149858)
sobolevn [Fri, 15 May 2026 12:38:51 +0000 (15:38 +0300)] 
gh-149816: Fix race condition in `memoryview` with free-threading (#149858)

12 days agogh-149801: Add IANA registered names and aliases with leading zeros (GH-149804)
Serhiy Storchaka [Fri, 15 May 2026 11:34:48 +0000 (14:34 +0300)] 
gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804)

Like IBM00858, CP00858, IBM01140, CP01140.