]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 days agoDocs: Upgrade Sphinx to 9.0 (#142114)
Adam Turner [Mon, 1 Dec 2025 11:16:37 +0000 (11:16 +0000)] 
Docs: Upgrade Sphinx to 9.0 (#142114)

2 days agogh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH...
Gregory P. Smith [Mon, 1 Dec 2025 02:50:05 +0000 (18:50 -0800)] 
gh-141473: Document not calling Popen.wait after Popen.communicate times out. (GH-142101)

Document not calling Popen.wait after Popen.communicate times out.

Closes #141473

2 days agogh-142066: Fix grammar in multiprocessing Pipes and Queues (GH-142121)
Tadej Magajna [Mon, 1 Dec 2025 02:14:20 +0000 (03:14 +0100)] 
gh-142066: Fix grammar in multiprocessing Pipes and Queues (GH-142121)

docs: Fix grammar in multiprocessing Pipes and Queues (gh-142066)

2 days agogh-142067: Add missing default value for param in `multiprocessing.Pipe`'s doc (GH...
flovent [Sun, 30 Nov 2025 21:10:01 +0000 (05:10 +0800)] 
gh-142067: Add missing default value for param in `multiprocessing.Pipe`'s doc (GH-142109)

3 days agoImprove clarity in tutorial introduction (#140669)
Thierry Martos [Sun, 30 Nov 2025 12:47:31 +0000 (04:47 -0800)] 
Improve clarity in tutorial introduction (#140669)

3 days agogh-141999: Handle KeyboardInterrupt when sampling in the new tachyon profiler (#142000)
yihong [Sun, 30 Nov 2025 02:49:13 +0000 (10:49 +0800)] 
gh-141999: Handle KeyboardInterrupt when sampling in the new tachyon profiler (#142000)

3 days agogh-138122: Add thread status statistics to flamegraph profiler (#141900)
Pablo Galindo Salgado [Sun, 30 Nov 2025 01:42:39 +0000 (01:42 +0000)] 
gh-138122: Add thread status statistics to flamegraph profiler (#141900)

Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
3 days agogh-133146: Add the old public `get_value` method to documentation and refactor code...
Duprat [Sat, 29 Nov 2025 22:12:48 +0000 (23:12 +0100)] 
gh-133146: Add the old public `get_value` method to documentation and refactor code. (GH-133301)

also uses it within the internals in a few places.

3 days agoGH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows...
Chris Eibl [Sat, 29 Nov 2025 20:43:06 +0000 (21:43 +0100)] 
GH-141808: Do not generate the jit stencils twice in case of PGO builds on Windows. (GH-142043)

* do not build the jit stencils twice in case of PGO builds on Windows

* blurb it

4 days agoDocs: Prepare for Sphinx 9 (#142057)
Adam Turner [Sat, 29 Nov 2025 14:49:37 +0000 (14:49 +0000)] 
Docs: Prepare for Sphinx 9 (#142057)

4 days agoGH-121970: Remove Docutils list monkeypatch (#142056)
Adam Turner [Sat, 29 Nov 2025 14:28:23 +0000 (14:28 +0000)] 
GH-121970: Remove Docutils list monkeypatch (#142056)

4 days agoGH-141963: Clarify argparse documentation (GH-141964)
Moshe Kaplan [Sat, 29 Nov 2025 07:23:34 +0000 (02:23 -0500)] 
GH-141963: Clarify argparse documentation (GH-141964)

Clarify argparse documentation

Tightens the phrasing for several argparse actions.

4 days agoDocs: multi-disk ZIP files -> multipart ZIP files (GH-141962)
Hugo van Kemenade [Sat, 29 Nov 2025 07:11:59 +0000 (09:11 +0200)] 
Docs: multi-disk ZIP files -> multipart ZIP files (GH-141962)

* Remove some old currentlies
* multi-disk -> multipart
* Sentence case headings

4 days agogh-141994: Warn of XXE vulnerability in documentation of SAX feature `xml.sax.handler...
Sebastian Pipping [Sat, 29 Nov 2025 07:08:17 +0000 (08:08 +0100)] 
gh-141994: Warn of XXE vulnerability in documentation of SAX feature `xml.sax.handler.feature_external_ges` (GH-141996)

Doc/library/xml.sax.handler.rst: Warn of XXE with feature_external_ges

Related to commit baa9f338971c6a13433a8232db77cd45e6b87b77

4 days agoFix multiprocessing queue test_get() (GH-142024)
Victor Stinner [Sat, 29 Nov 2025 07:00:14 +0000 (08:00 +0100)] 
Fix multiprocessing queue test_get() (GH-142024)

* Replace sleep() with support.sleeping_retry().
* Test get_nowait() first.
* Restore previously disabled test.

Fix the failure:

FAIL: test_get (test.test_multiprocessing_spawn.test_processes.WithProcessesTestQueue.test_get)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/_test_multiprocessing.py", line 1208, in test_get
    self.assertEqual(queue_empty(queue), False)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: True != False

4 days agogh-87512: Fix `subprocess` using `timeout=` on Windows blocking with a large `input...
Gregory P. Smith [Sat, 29 Nov 2025 06:07:03 +0000 (22:07 -0800)] 
gh-87512: Fix `subprocess` using `timeout=` on Windows blocking with a large `input=` (GH-142058)

On Windows, Popen._communicate() previously wrote to stdin synchronously, which could block indefinitely if the subprocess didn't consume input= quickly and the pipe buffer filled up. The timeout= parameter was only checked when joining the reader threads, not during the stdin write.

This change moves the Windows stdin writing to a background thread (similar to how stdout/stderr are read in threads), allowing the timeout to be properly enforced. If timeout expires, TimeoutExpired is raised promptly and the writer thread continues in the background. Subsequent calls to communicate() will join the existing writer thread.

Adds test_communicate_timeout_large_input to verify that TimeoutExpired is raised promptly when communicate() is called with large input and a timeout, even when the subprocess doesn't consume stdin quickly.

This test already passed on POSIX (where select() is used) but failed on Windows where the stdin write blocks without checking the timeout.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
4 days agogh-74389: gh-70560: subprocess.Popen.communicate() now ignores stdin.flush error...
Gregory P. Smith [Sat, 29 Nov 2025 05:03:06 +0000 (21:03 -0800)] 
gh-74389: gh-70560: subprocess.Popen.communicate() now ignores stdin.flush error when closed (GH-142061)

gh-70560: gh-74389: subprocess.Popen.communicate() now ignores stdin.flush error when closed

with a unittest and news entry.

4 days agoGH-134453: Fix subprocess memoryview input handling on POSIX (GH-134949)
Gregory P. Smith [Sat, 29 Nov 2025 04:25:06 +0000 (20:25 -0800)] 
GH-134453: Fix subprocess memoryview input handling on POSIX (GH-134949)

Fix inconsistent subprocess.Popen.communicate() behavior between Windows
and POSIX when using memoryview objects with non-byte elements as input.

On POSIX systems, the code was incorrectly comparing bytes written against
element count instead of byte count, causing data truncation for large
inputs with non-byte element types.

Changes:
- Cast memoryview inputs to byte view when input is already a memoryview
- Fix progress tracking to use len(input_view) instead of len(self._input)
- Add comprehensive test coverage for memoryview inputs

đŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
* old-man-yells-at-ReST
* Update 2025-05-30-18-37-44.gh-issue-134453.kxkA-o.rst
* assertIsNone review feedback
* fix memoryview_nonbytes test to fail without our fix on main, and have a nicer error.

Thanks to Peter Bierma @ZeroIntensity for the code review.

4 days agogh-141473: Fix subprocess.Popen.communicate to send input to stdin upon a subsequent...
Artur Jamro [Sat, 29 Nov 2025 02:04:52 +0000 (03:04 +0100)] 
gh-141473: Fix subprocess.Popen.communicate to send input to stdin upon a subsequent post-timeout call (GH-141477)

* gh-141473: Fix subprocess.Popen.communicate to send input to stdin
* Docs: Clarify that `input` is one time only on `communicate()`
* NEWS entry
* Add a regression test.

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
4 days agoDocs: Move to method references for bytearray.take_bytes (#142053)
Cody Maloney [Fri, 28 Nov 2025 21:07:34 +0000 (13:07 -0800)] 
Docs: Move to method references for bytearray.take_bytes (#142053)

4 days agogh-142025: Add c-analyzer include for pyexpat.c (GH-142026)
dgpb [Fri, 28 Nov 2025 17:51:48 +0000 (19:51 +0200)] 
gh-142025: Add c-analyzer include for pyexpat.c (GH-142026)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
4 days agogh-141968: Use take_bytes in encodings.punycode (#141974)
Cody Maloney [Fri, 28 Nov 2025 17:47:14 +0000 (09:47 -0800)] 
gh-141968: Use take_bytes in encodings.punycode (#141974)

Removes a copy going from bytearray to bytes.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 days agogh-141968: Use take_bytes in re._compiler (#141995)
Cody Maloney [Fri, 28 Nov 2025 17:46:10 +0000 (09:46 -0800)] 
gh-141968: Use take_bytes in re._compiler (#141995)

Removes a copy going from bytearray to bytes.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 days agogh-133228: c-analyzer clang preprocessor (GH-133229)
dgpb [Thu, 27 Nov 2025 22:22:21 +0000 (00:22 +0200)] 
gh-133228: c-analyzer clang preprocessor (GH-133229)

* impl
* included 2 failures to tsvs next to similar entries
* added fix/hack for curses.h fails
* fix leftover from debug

5 days agogh-141930: Use the regular IO stack to write .pyc files for a better error message...
Stefano Rivera [Thu, 27 Nov 2025 19:17:59 +0000 (11:17 -0800)] 
gh-141930: Use the regular IO stack to write .pyc files for a better error message on failure (GH-141931)

* Use open() to write the bytecode
* Convert to unittest style asserts
* Tweak news, thanks @vstinner
* Tidy
* reword NEWS, avoid word "retried"

5 days agogh-140210: Make test_sysconfig.test_parse_makefile_renamed_vars ignore environment...
Miro Hrončok [Thu, 27 Nov 2025 18:00:02 +0000 (19:00 +0100)] 
gh-140210: Make test_sysconfig.test_parse_makefile_renamed_vars ignore environment variables (#140213)

The test did not expect it could be run with e.g. CFLAGS set to a custom value.

5 days agogh-140505: Fix 'parameters' to 'arguments' in xmlrpc.client.MultiCall docs (GH-141942)
SIVALANAGASHANKARNIVAS [Thu, 27 Nov 2025 17:01:15 +0000 (22:31 +0530)] 
gh-140505: Fix 'parameters' to 'arguments' in xmlrpc.client.MultiCall docs (GH-141942)

Fix terminology: change 'parameters' to 'arguments' in MultiCall docs

Fixes #140505

6 days agogh-130396: Export _Py_ReachedRecursionLimitWithMargin() (#142012)
Victor Stinner [Thu, 27 Nov 2025 12:22:15 +0000 (13:22 +0100)] 
gh-130396: Export _Py_ReachedRecursionLimitWithMargin() (#142012)

test_peg_generator needs the function.

6 days agogh-116008: Detect freed thread state in faulthandler (#141988)
Victor Stinner [Thu, 27 Nov 2025 11:35:00 +0000 (12:35 +0100)] 
gh-116008: Detect freed thread state in faulthandler (#141988)

Add _PyMem_IsULongFreed() function.

6 days agogh-127635: Use flexible array in tracemalloc (#141991)
Victor Stinner [Thu, 27 Nov 2025 11:32:31 +0000 (12:32 +0100)] 
gh-127635: Use flexible array in tracemalloc (#141991)

Replace frames[1] with frames[] in tracemalloc_traceback structure.

6 days agogh-130396: Remove _Py_ReachedRecursionLimitWithMargin() function (#141951)
Victor Stinner [Thu, 27 Nov 2025 11:32:00 +0000 (12:32 +0100)] 
gh-130396: Remove _Py_ReachedRecursionLimitWithMargin() function (#141951)

Move the private function to the internal C API (pycore_ceval.h).

6 days agogh-116738: Fix thread-safety issue in re module for free threading (gh-141923)
Alper [Wed, 26 Nov 2025 20:40:45 +0000 (12:40 -0800)] 
gh-116738: Fix thread-safety issue in re module for free threading (gh-141923)

Added atomic operations to `scanner_begin()` and `scanner_end()` to prevent
race conditions on the `executing` flag in free-threaded builds. Also added
tests for concurrent usage of the `re` module.

Without the atomic operations, `test_scanner_concurrent_access()` triggers
`assert(self->executing)` failures, or a thread sanitizer run emits errors.

6 days agogh-141968: use `bytearray.take_bytes` in `encodings.idna` (#141975)
Cody Maloney [Wed, 26 Nov 2025 15:46:25 +0000 (07:46 -0800)] 
gh-141968: use `bytearray.take_bytes` in `encodings.idna` (#141975)

6 days agogh-141968: use `bytearray.take_bytes` in `wave._byteswap` (#141973)
Cody Maloney [Wed, 26 Nov 2025 15:45:12 +0000 (07:45 -0800)] 
gh-141968: use `bytearray.take_bytes` in `wave._byteswap` (#141973)

6 days agogh-141968: Use `bytearray.take_bytes` in `base64` `_b32encode` and `_b32decode` ...
Cody Maloney [Wed, 26 Nov 2025 15:44:25 +0000 (07:44 -0800)] 
gh-141968: Use `bytearray.take_bytes` in `base64` `_b32encode` and `_b32decode` (#141971)

6 days agogh-135676: Simplify docs on lexing names (GH-140464)
Petr Viktorin [Wed, 26 Nov 2025 15:10:44 +0000 (16:10 +0100)] 
gh-135676: Simplify docs on lexing names (GH-140464)

This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.

It uses a mental model where the parser doesn't handle Unicode complexity â€œimmediately”, but:

- parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
- normalizes the name
- validates the name, using the xid_start/xid_continue sets

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
7 days agogh-141909: Correct version where Py_mod_gil was added (GH-141979)
Petr Viktorin [Wed, 26 Nov 2025 14:45:06 +0000 (15:45 +0100)] 
gh-141909: Correct version where Py_mod_gil was added (GH-141979)

7 days agoGH-141861: Fix TRACE_RECORD if full (GH-141959)
Sergey Miryanov [Wed, 26 Nov 2025 14:32:30 +0000 (19:32 +0500)] 
GH-141861: Fix TRACE_RECORD if full (GH-141959)

7 days agogh-140011: Delete importdl assertion that prevents importing embedded modules from...
Itamar Oren [Wed, 26 Nov 2025 13:12:49 +0000 (05:12 -0800)] 
gh-140011: Delete importdl assertion that prevents importing embedded modules from packages (GH-141605)

7 days agogh-140550: PEP 793 reference documentation (GH-141197)
Petr Viktorin [Wed, 26 Nov 2025 12:50:03 +0000 (13:50 +0100)] 
gh-140550: PEP 793 reference documentation (GH-141197)

* gh-140550: PEP 793 reference documentation

Since the PEP calls for soft-deprecation of the existing initialization
function, this reorganizes the relevant docs to put the new way of
doing things first, and de-emphasize the old.

Some bits, like the tutorial, are left out of this patch. (See the
issue for a list.)

7 days agoCorrect indentation in `stdtypes.rst` (#141957)
Guo Ci [Wed, 26 Nov 2025 06:25:52 +0000 (01:25 -0500)] 
Correct indentation in `stdtypes.rst` (#141957)

7 days agoRemove ``Misc/ACKS`` check from patchcheck, documentation (#141960)
Stan Ulbrych [Wed, 26 Nov 2025 00:00:00 +0000 (00:00 +0000)] 
Remove ``Misc/ACKS`` check from patchcheck, documentation (#141960)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
7 days agoRemove references to ``Misc/ACKS`` from ``CONTRIBUTING.md`` (#141952)
Stan Ulbrych [Tue, 25 Nov 2025 18:59:28 +0000 (18:59 +0000)] 
Remove references to ``Misc/ACKS`` from ``CONTRIBUTING.md`` (#141952)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
7 days agogh-141004: Document missing `PyThread*` APIs (GH-141810)
Peter Bierma [Tue, 25 Nov 2025 17:53:18 +0000 (12:53 -0500)] 
gh-141004: Document missing `PyThread*` APIs (GH-141810)

Co-authored-by: Victor Stinner <vstinner@python.org>
8 days agogh-141909: Add `PyModuleDef_Slot` and earlier Py_mod_* constants to stable ABI manife...
Petr Viktorin [Tue, 25 Nov 2025 14:16:49 +0000 (15:16 +0100)] 
gh-141909: Add `PyModuleDef_Slot` and earlier Py_mod_* constants to stable ABI manifest (#141910)

These were added to the limited API in 3.5.
Not including them in `Misc/stable_abi.toml` was a bug.

8 days agogh-141004: Document `PyOS_mystr(n)icmp` (#141760)
Stan Ulbrych [Tue, 25 Nov 2025 13:44:52 +0000 (13:44 +0000)] 
gh-141004: Document `PyOS_mystr(n)icmp` (#141760)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
8 days agogh-139165: Make Py_SIZE, Py_IS_TYPE,Py_ SET_SIZE regular functions in stable ABI...
Petr Viktorin [Tue, 25 Nov 2025 13:30:33 +0000 (14:30 +0100)] 
gh-139165: Make Py_SIZE, Py_IS_TYPE,Py_ SET_SIZE regular functions in stable ABI (GH-139166)

* Make Py_{SIZE,IS_TYPE,SET_SIZE} regular functions in stable ABI

Group them together with Py_TYPE & Py_SET_TYPE to cut down
on repetitive preprocessor macros.
Format repetitive definitions in object.c more concisely.

Py_SET_TYPE is still left out of the Limited API.

8 days agogh-140911: Ensure that UserString.index() and UserString.rindex() accept UserString...
Krishna Chaitanya [Tue, 25 Nov 2025 13:25:46 +0000 (18:55 +0530)] 
gh-140911: Ensure that UserString.index() and UserString.rindex() accept UserString as argument (GH-140945)

8 days agogh-138122: Split Modules/_remote_debugging_module.c into multiple files (#141934)
Pablo Galindo Salgado [Tue, 25 Nov 2025 12:51:24 +0000 (12:51 +0000)] 
gh-138122: Split Modules/_remote_debugging_module.c into multiple files (#141934)

gh-1381228: Split Modules/_remote_debugging_module.c into multiple files

8 days agogh-141781: Fix pdb.line_prefix binding (#141779)
Paresh Joshi [Tue, 25 Nov 2025 02:45:16 +0000 (08:15 +0530)] 
gh-141781: Fix pdb.line_prefix binding (#141779)

8 days agoGH-141861: Fix invalid memory read in the ENTER_EXECUTOR (GH-141921)
Sergey Miryanov [Mon, 24 Nov 2025 22:07:45 +0000 (03:07 +0500)] 
GH-141861: Fix invalid memory read in the ENTER_EXECUTOR (GH-141921)

8 days agoFix implicit import in `test_monitoring.py` (gh-141795)
SubbaraoGarlapati [Mon, 24 Nov 2025 19:48:28 +0000 (14:48 -0500)] 
Fix implicit import in `test_monitoring.py` (gh-141795)

8 days agogh-141907: Better handle support for SHA3 for test_hashlib (GH-141908)
Christian Marangi [Mon, 24 Nov 2025 17:35:58 +0000 (18:35 +0100)] 
gh-141907: Better handle support for SHA3 for test_hashlib (GH-141908)

* test_hashlib: better handle support for SHA3

It's possible that the SSL library supports only SHA3 algo and doesn't
have SHAKE one.

The current test wrongly detect this and set both HASH and HASHXOF to
None expecting to have the extra SHA3 attributes present but this should
only be true for SHAKE algo.

To better handle this, move the HASH condition to a dedicated try-expect
condition and check if HASHXOF is None in the relevant code effectively
checking if SHA3 is supported by the SSL library but SHAKE algo needs to
use the sha3module one.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* rework the conditional import for all its attrs

---------

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
8 days agogh-141004: Document stack effect C APIs (GH-141843)
Peter Bierma [Mon, 24 Nov 2025 17:18:50 +0000 (12:18 -0500)] 
gh-141004: Document stack effect C APIs (GH-141843)

Co-authored-by: Victor Stinner <vstinner@python.org>
8 days agogh-141004: Document `PyImport_Inittab` (GH-141844)
Peter Bierma [Mon, 24 Nov 2025 16:38:18 +0000 (11:38 -0500)] 
gh-141004: Document `PyImport_Inittab` (GH-141844)

Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
8 days agogh-129441: Fix some flakiness in test_instrumentation (gh-141881)
Sam Gross [Mon, 24 Nov 2025 16:19:07 +0000 (11:19 -0500)] 
gh-129441: Fix some flakiness in test_instrumentation (gh-141881)

Most of the `self.assertTrue(self.called)` checks are flaky because
the worker threads may sometimes finish before the main thread calls
`self.during_threads()`.

8 days agogh-116749: Fix code comment for _PyConfig_GIL_DEFAULT (gh-141804)
Sam Gross [Mon, 24 Nov 2025 15:42:00 +0000 (10:42 -0500)] 
gh-116749: Fix code comment for _PyConfig_GIL_DEFAULT (gh-141804)

8 days agogh-141863: use `bytearray.take_bytes` in asyncio streams for better performance ...
Cody Maloney [Mon, 24 Nov 2025 15:36:53 +0000 (07:36 -0800)] 
gh-141863: use `bytearray.take_bytes` in asyncio streams for better performance (#141864)

9 days agogh-106318: Add examples for str.join() (#140315)
Adorilson Bezerra [Mon, 24 Nov 2025 14:53:25 +0000 (14:53 +0000)] 
gh-106318: Add examples for str.join() (#140315)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
9 days agogh-106318: Add example for str.format() (#137018)
Adorilson Bezerra [Mon, 24 Nov 2025 14:51:10 +0000 (14:51 +0000)] 
gh-106318: Add example for str.format() (#137018)

9 days agogh-141831: Document behavior of functools.lru_cache with concurrent access (gh-141869)
Satyam Kumar Verman [Mon, 24 Nov 2025 14:36:09 +0000 (09:36 -0500)] 
gh-141831: Document behavior of functools.lru_cache with concurrent access (gh-141869)

9 days agogh-138122: Fix permission error detection in tachyon's test (#141897)
Pablo Galindo Salgado [Mon, 24 Nov 2025 14:32:17 +0000 (14:32 +0000)] 
gh-138122: Fix permission error detection in tachyon's test (#141897)

9 days agogh-106318: Add example for str.isalpha() (#137557)
Adorilson Bezerra [Mon, 24 Nov 2025 14:10:35 +0000 (14:10 +0000)] 
gh-106318: Add example for str.isalpha() (#137557)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
9 days agogh-138199: Address potential confusion regarding threading in the `asyncio` HOWTO...
Alexander Nordin [Mon, 24 Nov 2025 14:08:49 +0000 (06:08 -0800)] 
gh-138199: Address potential confusion regarding threading in the `asyncio` HOWTO (GH-138200)

9 days agogh-106318: Add example for str.isascii() (#137558)
Adorilson Bezerra [Mon, 24 Nov 2025 14:02:18 +0000 (14:02 +0000)] 
gh-106318: Add example for str.isascii() (#137558)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 days agogh-141004: Document `Py_ARRAY_LENGTH` (GH-141601)
Yashraj [Mon, 24 Nov 2025 13:34:37 +0000 (19:04 +0530)] 
gh-141004: Document `Py_ARRAY_LENGTH` (GH-141601)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
9 days ago gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed (GH-141785)
Petr Viktorin [Mon, 24 Nov 2025 12:26:35 +0000 (13:26 +0100)] 
 gh-141780: Make PyModule_FromSlotsAndSpec enable GIL if needed  (GH-141785)

9 days agogh-106318: Add example for str.isdecimal() (#137559)
Adorilson Bezerra [Mon, 24 Nov 2025 11:47:54 +0000 (11:47 +0000)] 
gh-106318: Add example for str.isdecimal() (#137559)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
9 days agogh-138122: Refactor the CLI of profiling.sampling into subcommands (#141813)
Pablo Galindo Salgado [Mon, 24 Nov 2025 11:45:08 +0000 (11:45 +0000)] 
gh-138122: Refactor the CLI of profiling.sampling into subcommands (#141813)

9 days agogh-135335: Simplify preload regression test using __main__ (GH-138686)
Duane Griffin [Sun, 23 Nov 2025 23:37:15 +0000 (12:37 +1300)] 
gh-135335: Simplify preload regression test using __main__ (GH-138686)

Simplify preload regression test using `__main__`

With the fix for gh-126631 `__main__` modules can be preloaded and the regression
test for gh-135335 can be simplified to just use a self-contained script rather
than requiring a module.

Note this assumes and implicitly tests that `__main__` is preloaded by default.

9 days agomath.dist documentation: add 'strict=True' to equivalent code (#141819)
Mark Dufour [Sun, 23 Nov 2025 23:33:27 +0000 (00:33 +0100)] 
math.dist documentation: add 'strict=True' to equivalent code (#141819)

9 days agogh-141865: Fix translation of strings in `changes.py` extension (#141882)
Stan Ulbrych [Sun, 23 Nov 2025 17:28:09 +0000 (17:28 +0000)] 
gh-141865: Fix translation of strings in `changes.py` extension (#141882)

9 days agoDrop three unused imports (#141875)
yihong [Sun, 23 Nov 2025 16:33:05 +0000 (00:33 +0800)] 
Drop three unused imports (#141875)

9 days agogh-120158: Fix inconsistent monitoring state when setting events too frequently ...
Sam Gross [Sun, 23 Nov 2025 15:07:17 +0000 (10:07 -0500)] 
gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845)

If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.

10 days agogh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multipr...
Gregory P. Smith [Sun, 23 Nov 2025 09:52:26 +0000 (01:52 -0800)] 
gh-98552: Revert (unneeded, already done elsewhere) "flush std streams in the multiprocessing forkserver before fork (#141849)" (#141871)

Revert (unneeded, already done elsewhere) "gh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)"

This reverts commit 58badb1711e12b6e8b5240ab96cdd01b95012de7.

10 days ago[security] Add a cooldown period to dependabot (GH-141866)
Gregory P. Smith [Sun, 23 Nov 2025 09:34:48 +0000 (01:34 -0800)] 
[security] Add a cooldown period to dependabot (GH-141866)

See https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns and the description in the comment.

10 days agogh-141679: Add colour to defaults in `argparse` help (#141680)
Hugo van Kemenade [Sun, 23 Nov 2025 00:26:50 +0000 (02:26 +0200)] 
gh-141679: Add colour to defaults in `argparse` help (#141680)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
10 days agoGH-140638: Add a GC "candidates" stat (GH-141814)
Brandt Bucher [Sat, 22 Nov 2025 21:59:14 +0000 (13:59 -0800)] 
GH-140638: Add a GC "candidates" stat (GH-141814)

10 days agogh-138525: Support single-dash long options and prefix_chars in BooleanOptionalAction...
Serhiy Storchaka [Sat, 22 Nov 2025 20:54:02 +0000 (22:54 +0200)] 
gh-138525: Support single-dash long options and prefix_chars in BooleanOptionalAction (GH-138692)

-nofoo is generated for -foo.
++no-foo is generated for ++foo.
/nofoo is generated for /foo.

10 days agoGH-101100: Resolve reference warnings in library/stdtypes.rst (#138420)
Adam Turner [Sat, 22 Nov 2025 19:23:29 +0000 (19:23 +0000)] 
GH-101100: Resolve reference warnings in library/stdtypes.rst (#138420)

10 days agogh-101100: Fix sphinx warnings in `library/unittest.rst` (#140109)
Weilin Du [Sat, 22 Nov 2025 19:16:09 +0000 (03:16 +0800)] 
gh-101100: Fix sphinx warnings in `library/unittest.rst` (#140109)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
10 days agogh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)
Gregory P. Smith [Sat, 22 Nov 2025 18:29:51 +0000 (10:29 -0800)] 
gh-98552: flush std streams in the multiprocessing forkserver before fork (#141849)

* flush std streams in the multiprocessing forkserver before fork

* NEWS

10 days agogh-141600: Fix musl version detection on Void Linux (GH-141602)
Andrew J. Hesford [Sat, 22 Nov 2025 18:17:40 +0000 (13:17 -0500)] 
gh-141600: Fix musl version detection on Void Linux (GH-141602)

10 days agogh-141801: Use accessors for ASN1_STRING fields in libssl (GH-141802)
David Benjamin [Sat, 22 Nov 2025 17:17:45 +0000 (22:47 +0530)] 
gh-141801: Use accessors for ASN1_STRING fields in libssl (GH-141802)

* gh-141801: Use accessors for ASN1_STRING fields

While ASN1_STRING is currently exposed, it is better to use the
accessors. See https://github.com/openssl/openssl/issues/29117 where, if
the type were opaque, OpenSSL's X509 objects could be much more
memory-efficient.

* Update Modules/_ssl.c

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Update Modules/_ssl.c

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
10 days agogh-131178: Add tests for `pickletools` command-line interface (#131287)
Semyon Moroz [Sat, 22 Nov 2025 17:17:06 +0000 (21:17 +0400)] 
gh-131178: Add tests for `pickletools` command-line interface (#131287)

10 days agogh-141817: Add IPV6_HDRINCL constant to the socket module (#141818)
Chris Angelico [Sat, 22 Nov 2025 17:07:21 +0000 (04:07 +1100)] 
gh-141817: Add IPV6_HDRINCL constant to the socket module (#141818)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
10 days agogh-141833: Remove the bad lines in `test_attr_promotion_failure` (GH-141841)
Yongzi Li [Sat, 22 Nov 2025 16:27:05 +0000 (00:27 +0800)] 
gh-141833: Remove the bad lines in `test_attr_promotion_failure` (GH-141841)

11 days agogh-140381: Make test_profiling tests deterministic to fix flakiness (#141731)
Pablo Galindo Salgado [Fri, 21 Nov 2025 21:36:30 +0000 (21:36 +0000)] 
gh-140381: Make test_profiling tests deterministic to fix flakiness (#141731)

11 days agogh-137422: Fix race condition in PyImport_AddModuleRef (gh-141822)
Sam Gross [Fri, 21 Nov 2025 18:30:33 +0000 (13:30 -0500)] 
gh-137422: Fix race condition in PyImport_AddModuleRef (gh-141822)

11 days agogh-129559: add `bytearray.resize` thread safety test for free-threading (#141739)
Cody Maloney [Fri, 21 Nov 2025 18:12:22 +0000 (10:12 -0800)] 
gh-129559: add `bytearray.resize` thread safety test for free-threading  (#141739)

11 days agogh-141498: Change backoff counter to use prime numbers instead of powers of 2 (GH...
Mikhail Efimov [Fri, 21 Nov 2025 17:00:25 +0000 (20:00 +0300)] 
gh-141498: Change backoff counter to use prime numbers instead of powers of 2 (GH-141591)

11 days agogh-116738: Make csv module thread-safe (gh-141365)
Alper [Fri, 21 Nov 2025 16:22:31 +0000 (08:22 -0800)] 
gh-116738: Make csv module thread-safe (gh-141365)

Added a critical section to protect the states of `ReaderObj` and `WriterObj` in the free-threading build. Without the critical sections, both new free-threading tests were crashing.

11 days agogh-141612: improve `test_trampoline_works_with_forks` coverage (#141613)
Paresh Joshi [Fri, 21 Nov 2025 16:01:26 +0000 (21:31 +0530)] 
gh-141612: improve `test_trampoline_works_with_forks` coverage (#141613)

12 days agogh-140795: fetch thread state once on fast path for critical sections (#141406)
Kumar Aditya [Fri, 21 Nov 2025 14:19:53 +0000 (19:49 +0530)] 
gh-140795: fetch thread state once on fast path for critical sections (#141406)

12 days agogh-141645: Add profiling/sampling/live_collector to the makefile and remove spurious...
Pablo Galindo Salgado [Fri, 21 Nov 2025 13:34:04 +0000 (13:34 +0000)] 
gh-141645: Add profiling/sampling/live_collector to the makefile and remove spurious file (#141820)

12 days agoGH-139727: Add --enable-stackref-debug flag to build.bat to enable Py_STACKREF_DEBUG...
Sergey Miryanov [Fri, 21 Nov 2025 11:03:32 +0000 (16:03 +0500)] 
GH-139727: Add --enable-stackref-debug flag to build.bat to enable Py_STACKREF_DEBUG build on Windows (GH-139728)

12 days agogh-141729: Doc PyTypeObject.tp_vectorcall grammar fix (#141730)
Michael Kiper [Fri, 21 Nov 2025 07:24:10 +0000 (23:24 -0800)] 
gh-141729: Doc PyTypeObject.tp_vectorcall grammar fix (#141730)

[3.14] Doc PyTypeObject.tp_vectorcall grammar fix

Co-authored-by: makiper <michael.kiper@jpl.nasa.gov>
12 days agogh-141645: Refactor tachyon's live TUI tests to not use private fields (#141806)
Pablo Galindo Salgado [Fri, 21 Nov 2025 00:35:37 +0000 (00:35 +0000)] 
gh-141645: Refactor tachyon's live TUI tests to not use private fields (#141806)

12 days agogh-138697: Fix inferring dest from a single-dash long option in argparse (#138699)
Serhiy Storchaka [Thu, 20 Nov 2025 18:41:58 +0000 (20:41 +0200)] 
gh-138697: Fix inferring dest from a single-dash long option in argparse (#138699)

* gh-138697: Fix inferring dest from a single-dash long option in argparse

If a short option and a single-dash long option are passed to add_argument(),
dest is now inferred from the single-dash long option.

* Make double-dash options taking priority over single-dash long options.

---------

Co-authored-by: Savannah Ostrowski <savannah@python.org>
12 days agogh-141645: Add a TUI mode to the new tachyon profiler (#141646)
Pablo Galindo Salgado [Thu, 20 Nov 2025 18:27:17 +0000 (18:27 +0000)] 
gh-141645: Add a TUI mode to the new tachyon profiler (#141646)