]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 months agogh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)
Adam Dangoor [Mon, 30 Jun 2025 13:32:51 +0000 (14:32 +0100)] 
gh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)

4 months agogh-123471: Make itertools.product and itertools.combinations thread-safe (#132814)
Pieter Eendebak [Mon, 30 Jun 2025 11:31:59 +0000 (13:31 +0200)] 
gh-123471: Make itertools.product and itertools.combinations thread-safe (#132814)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 months agogh-135607: remove null checking of weakref list in dealloc of extension modules and...
Xuanteng Huang [Mon, 30 Jun 2025 11:14:31 +0000 (19:14 +0800)] 
gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-123471: Make itertools.chain thread-safe (#135689)
Pieter Eendebak [Mon, 30 Jun 2025 11:06:58 +0000 (13:06 +0200)] 
gh-123471: Make itertools.chain thread-safe (#135689)

4 months agogh-132813: Fix the csv documentation for quoting and escaping (#133209)
Serhiy Storchaka [Mon, 30 Jun 2025 07:42:00 +0000 (10:42 +0300)] 
gh-132813: Fix the csv documentation for quoting and escaping (#133209)

4 months agogh-136087: Remove `\r` from documented `os.linesep` values (#136088)
sobolevn [Mon, 30 Jun 2025 07:12:05 +0000 (10:12 +0300)] 
gh-136087: Remove `\r` from documented `os.linesep` values (#136088)

4 months agogh-130160: use `.. program::` directive for documenting `venv` CLI (GH-130699)
Kanishk Pachauri [Mon, 30 Jun 2025 05:41:57 +0000 (11:11 +0530)] 
gh-130160: use `.. program::` directive for documenting `venv` CLI (GH-130699)

Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months agoDoc: fix duplicated words (#136086)
Weilin Du [Sun, 29 Jun 2025 22:04:02 +0000 (06:04 +0800)] 
Doc: fix duplicated words (#136086)

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 months agogh-123299: Provide replacement for removed sqlite3 attributes in What's New 3.14...
fry69 [Sun, 29 Jun 2025 15:34:45 +0000 (17:34 +0200)] 
gh-123299: Provide replacement for removed sqlite3 attributes in What's New 3.14 (#125566)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months agogh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)
Peter Bierma [Sun, 29 Jun 2025 14:58:26 +0000 (10:58 -0400)] 
gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)

4 months agogh-136066: simplify `platform._platform()` (#136069)
Bénédikt Tran [Sun, 29 Jun 2025 07:56:52 +0000 (09:56 +0200)] 
gh-136066: simplify `platform._platform()` (#136069)

4 months agogh-136053: Check error for TYPE_SLICE in marshal.c (GH-136054)
Akshat Gupta [Sun, 29 Jun 2025 07:07:24 +0000 (12:37 +0530)] 
gh-136053: Check error for TYPE_SLICE in marshal.c (GH-136054)

Fix a possible crash when deserializing a large marshal data
(at least several GiBs) containing a slice.

4 months agoDoc: Fix duplicate words in idlelib (#136089)
Weilin Du [Sun, 29 Jun 2025 06:47:38 +0000 (14:47 +0800)] 
Doc: Fix duplicate words in idlelib (#136089)

4 months agogh-91048: Fix external inspection multi-threaded performance (#136005)
Pablo Galindo Salgado [Sat, 28 Jun 2025 13:11:31 +0000 (14:11 +0100)] 
gh-91048: Fix external inspection multi-threaded performance (#136005)

4 months agogh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
Nicolas Trangez [Sat, 28 Jun 2025 13:01:41 +0000 (15:01 +0200)] 
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)

4 months agogh-135853: add `math.signbit` (#135877)
Bénédikt Tran [Sat, 28 Jun 2025 12:46:07 +0000 (14:46 +0200)] 
gh-135853: add `math.signbit` (#135877)

4 months agogh-132732: Fix up pure types in JIT (GH-136050)
Ken Jin [Sat, 28 Jun 2025 10:30:30 +0000 (18:30 +0800)] 
gh-132732: Fix up pure types in JIT (GH-136050)

Fix up pure types in JIT

4 months agoFix a typo in Lib/unittest/mock.py (#136067)
Weilin Du [Sat, 28 Jun 2025 09:25:07 +0000 (17:25 +0800)] 
Fix a typo in Lib/unittest/mock.py (#136067)

4 months agogh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)
Ken Jin [Fri, 27 Jun 2025 16:18:44 +0000 (00:18 +0800)] 
gh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)

4 months agoGH-135904: Optimize the JIT's assembly control flow (GH-135905)
Brandt Bucher [Fri, 27 Jun 2025 15:20:51 +0000 (08:20 -0700)] 
GH-135904: Optimize the JIT's assembly control flow (GH-135905)

4 months agogh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (#136027)
Lee Dogeon [Fri, 27 Jun 2025 15:15:11 +0000 (00:15 +0900)] 
gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (#136027)

4 months agogh-135755: rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros (#135847)
Bénédikt Tran [Fri, 27 Jun 2025 15:12:21 +0000 (17:12 +0200)] 
gh-135755: rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros (#135847)

Rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros
to `_Py_HACL_CAN_COMPILE_VEC{128,256}`. These macros are private.

4 months agogh-135571: Guard `_hashlib` usage in `test_hashlib.py` (#135572)
Will Childs-Klein [Fri, 27 Jun 2025 15:01:16 +0000 (11:01 -0400)] 
gh-135571: Guard `_hashlib` usage in `test_hashlib.py` (#135572)

4 months agogh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029)
Serhiy Storchaka [Fri, 27 Jun 2025 13:47:03 +0000 (16:47 +0300)] 
gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029)

This affects locales az_AZ, ber_DZ, ber_MA and crh_UA.

4 months agogh-92266: Replace tabs with four spaces in Python files (#135983)
Hugo van Kemenade [Fri, 27 Jun 2025 13:23:33 +0000 (16:23 +0300)] 
gh-92266: Replace tabs with four spaces in Python files (#135983)

4 months agogh-132732: Automatically constant evaluate pure operations (GH-132733)
Ken Jin [Fri, 27 Jun 2025 11:37:44 +0000 (19:37 +0800)] 
gh-132732: Automatically constant evaluate pure operations (GH-132733)

This adds a "macro" to the optimizer DSL called "REPLACE_OPCODE_IF_EVALUATES_PURE", which allows automatically constant evaluating a bytecode body if certain inputs have no side effects upon evaluations (such as ints, strings, and floats).

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
4 months agogh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable...
Serhiy Storchaka [Fri, 27 Jun 2025 11:35:55 +0000 (14:35 +0300)] 
gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981)

Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).

4 months agogh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)
Sergey B Kirpichev [Fri, 27 Jun 2025 10:00:25 +0000 (13:00 +0300)] 
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-136017: avoid decref in rich compare for bool objects (#136018)
Pieter Eendebak [Fri, 27 Jun 2025 09:01:51 +0000 (11:01 +0200)] 
gh-136017: avoid decref in rich compare for bool objects (#136018)

4 months agogh-53203: Fix strptime() for %c, %x and %X formats on some locales (#135971)
Serhiy Storchaka [Fri, 27 Jun 2025 07:50:59 +0000 (10:50 +0300)] 
gh-53203: Fix strptime() for %c, %x and %X formats on some locales (#135971)

* Add detection of decimal non-ASCII alt digits.
* Add support of non-decimal alt digits on locale lzh_TW.
* Accept only numbers in correct range if alt digits are known.
* Fix bug in detecting the position of the week day name on locales byn_ER and wal_ET.
* Fix support of single-digit hour on locales ar_SA and bg_BG.
* Add support for %T, %R, %r, %C, %OC.
* Prepare code to use nl_langinfo().

4 months agogh-135968: Add iOS binary stubs for strip (#135970)
Russell Keith-Magee [Fri, 27 Jun 2025 04:58:20 +0000 (12:58 +0800)] 
gh-135968: Add iOS binary stubs for strip (#135970)

Adds iOS binary stubs for invoking `strip`

4 months agogh-135551: Change how sorting picks minimum run length (#135553)
Tim Peters [Fri, 27 Jun 2025 04:48:05 +0000 (23:48 -0500)] 
gh-135551: Change how sorting picks minimum run length (#135553)

New scheme from Stefan Pochmann for picking minimum run lengths.

By allowing them to change a little from one run to the next, it's possible to
arrange for that all merges, at all levels, strongly tend to be as evenly balanced
as possible, for randomly ordered data. Meaning the number of initial runs is a
power of 2, and all merges involve runs whose lengths differ by no more than 1.

4 months agogh-135966: Modify iOS testbed to make app_packages a site directory (#135967)
Russell Keith-Magee [Fri, 27 Jun 2025 04:46:49 +0000 (12:46 +0800)] 
gh-135966: Modify iOS testbed to make app_packages a site directory (#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.

4 months agoDocs: Fix duplicate word typos (GH-135958)
Brian Schubert [Fri, 27 Jun 2025 00:00:19 +0000 (20:00 -0400)] 
Docs: Fix duplicate word typos (GH-135958)

4 months agogh-135995: Fix missing char in palmos encoding (#135990)
Nathan Korth [Thu, 26 Jun 2025 22:35:45 +0000 (18:35 -0400)] 
gh-135995: Fix missing char in palmos encoding (#135990)

0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›.
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 months agoIDLE: Update NEWS2x.txt with 2.7.0 release date (#129908)
Stan Ulbrych [Thu, 26 Jun 2025 20:20:07 +0000 (21:20 +0100)] 
IDLE: Update NEWS2x.txt with 2.7.0 release date (#129908)

4 months agogh-135927: Check _MSC_VER to define _Py_NULL macro (#135987)
Victor Stinner [Thu, 26 Jun 2025 16:11:49 +0000 (18:11 +0200)] 
gh-135927: Check _MSC_VER to define _Py_NULL macro (#135987)

4 months agogh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH...
Duane Griffin [Thu, 26 Jun 2025 14:18:32 +0000 (02:18 +1200)] 
gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954)

* gh-91555: add warning to docs about possibility of deadlock/infinite recursion

Attempt to clarify in the documentation that care must be taken when using
multiprocessing classes to implement logging since they have builtin internal
logging, and hence may cause deadlock/infinite recursion.

* Update Doc/library/logging.handlers.rst

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
* Change whitespace.

---------

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
4 months agogh-135110: Fix misleading `generator.close()` documentation (GH-135152)
Connor Denihan [Thu, 26 Jun 2025 13:27:25 +0000 (09:27 -0400)] 
gh-135110: Fix misleading `generator.close()` documentation (GH-135152)

The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.

4 months agogh-129958: New syntax error in format spec applies to both f-strings and t-strings...
Dylan [Thu, 26 Jun 2025 13:02:50 +0000 (08:02 -0500)] 
gh-129958: New syntax error in format spec applies to both f-strings and t-strings (#135570)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 months agogh-135965: Delete duplicate word in isolating-extensions howto (#135964)
Weilin Du [Thu, 26 Jun 2025 11:41:41 +0000 (19:41 +0800)] 
gh-135965: Delete duplicate word in isolating-extensions howto (#135964)

Change use use to use.

4 months agogh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921)
Petr Viktorin [Thu, 26 Jun 2025 11:05:01 +0000 (13:05 +0200)] 
gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921)

These are private API; let's name new ones accordingly.

4 months agogh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)
Petr Viktorin [Thu, 26 Jun 2025 09:48:37 +0000 (11:48 +0200)] 
gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)

4 months agogh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)
Peter Bierma [Thu, 26 Jun 2025 09:43:08 +0000 (05:43 -0400)] 
gh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)

4 months agogh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed struct tag ...
Petr Viktorin [Thu, 26 Jun 2025 07:25:41 +0000 (09:25 +0200)] 
gh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed struct tag (GH-135924)

Names/macros defined in public headers should have `Py`/`_Py` prefixes.

4 months agogh-135956: Remove duplicate word in _pydatetime docstring (#135957)
Terry Jan Reedy [Thu, 26 Jun 2025 03:44:08 +0000 (23:44 -0400)] 
gh-135956: Remove duplicate word in _pydatetime docstring (#135957)

_pydatetime.isoformat docstring repeats 'giving'.

4 months agoAdd whatsnew text for warnings module changes. (gh-135869)
Neil Schemenauer [Thu, 26 Jun 2025 03:03:24 +0000 (20:03 -0700)] 
Add whatsnew text for warnings module changes. (gh-135869)

4 months agogh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
Stan Ulbrych [Thu, 26 Jun 2025 03:01:25 +0000 (04:01 +0100)] 
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)

4 months agoDocs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
Rob Reynolds [Wed, 25 Jun 2025 17:40:00 +0000 (11:40 -0600)] 
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)

Paragraph should not be under `slice.step`. It applies to the whole class.

---------

Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>
4 months agoFix needless spinning in `_PyMutex_LockTimed` with zero timeout (gh-135872)
Joseph Tibbertsma [Wed, 25 Jun 2025 16:41:36 +0000 (09:41 -0700)] 
Fix needless spinning in `_PyMutex_LockTimed` with zero timeout (gh-135872)

The free threading build could spin unnecessarily on `_Py_yield()` if the initial
compare and swap failed.

4 months agogh-135927: Fix MSVC Clatest C builds (GH-135935)
Ken Jin [Wed, 25 Jun 2025 15:02:53 +0000 (23:02 +0800)] 
gh-135927: Fix MSVC Clatest C builds (GH-135935)

4 months agoDocs: Add cross-reference for `positional_item` in the `calls` productionlist (GH...
HarryLHW [Wed, 25 Jun 2025 14:24:58 +0000 (22:24 +0800)] 
Docs: Add cross-reference for `positional_item` in the `calls` productionlist (GH-129977)

Add missing hyperlink for `positional_item`

4 months agogh-135839: Fix `module_traverse` and `module_clear` in subinterp modules (#135937)
sobolevn [Wed, 25 Jun 2025 14:17:02 +0000 (17:17 +0300)] 
gh-135839: Fix `module_traverse` and `module_clear` in subinterp modules (#135937)

4 months agogh-131591: Make --without-remote-debug work (GH-135925)
Petr Viktorin [Wed, 25 Jun 2025 11:51:32 +0000 (13:51 +0200)] 
gh-131591: Make --without-remote-debug work (GH-135925)

The feature is checked using `defined(Py_REMOTE_DEBUG)`; defining
the macro (even as `0`) enables it.

4 months agogh-135755: Move SPECIAL_ constants to a private header (GH-135922)
Petr Viktorin [Wed, 25 Jun 2025 11:03:05 +0000 (13:03 +0200)] 
gh-135755: Move SPECIAL_ constants to a private header (GH-135922)

Macros without a `Py`/`_Py` prefix should not be defined in public headers.

4 months agogh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (...
sobolevn [Wed, 25 Jun 2025 08:54:42 +0000 (11:54 +0300)] 
gh-135839: Fix `module_traverse` and `module_clear` in `_interpchannelsmodule` (#135840)

4 months agogh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762)
Peter Bierma [Wed, 25 Jun 2025 08:44:55 +0000 (04:44 -0400)] 
gh-135755: Docs: C API: Document missing `PyFunction_GET*` macros (GH-135762)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
4 months agoGH-133136: Revise QSBR to reduce excess memory held (gh-135473)
Neil Schemenauer [Wed, 25 Jun 2025 07:06:32 +0000 (00:06 -0700)] 
GH-133136: Revise QSBR to reduce excess memory held (gh-135473)

The free threading build uses QSBR to delay the freeing of dictionary
keys and list arrays when the objects are accessed by multiple threads
in order to allow concurrent reads to proceed with holding the object
lock. The requests are processed in batches to reduce execution
overhead, but for large memory blocks this can lead to excess memory
usage.

Take into account the size of the memory block when deciding when to
process QSBR requests.

Also track the amount of memory being held by QSBR for mimalloc pages.  Advance the write sequence if this memory exceeds a limit.  Advancing the sequence will allow it to be freed more quickly.

Process the held QSBR items from the "eval breaker", rather than from `_PyMem_FreeDelayed()`.  This gives a higher chance that the global read sequence has advanced enough so that items can be freed.

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 months agogh-91555: Revert disabling of logger while handling log record. (GH-135858)
Vinay Sajip [Wed, 25 Jun 2025 05:42:38 +0000 (06:42 +0100)] 
gh-91555: Revert disabling of logger while handling log record. (GH-135858)

Revert "gh-91555: disable logger while handling log record (GH-131812)"

This reverts commit 2561e148ec985755baa3984b91fd0bfc089b283c.

4 months agoGH-90117: Check for list and tuple before MappingView in pprint (GH-135779)
Brandt Bucher [Tue, 24 Jun 2025 21:41:41 +0000 (14:41 -0700)] 
GH-90117: Check for list and tuple before MappingView in pprint (GH-135779)

4 months agogh-135855: Raise TypeError When Passing Non-dict Object to `_interpreters.set___main_...
Brian Schubert [Tue, 24 Jun 2025 18:53:14 +0000 (14:53 -0400)] 
gh-135855: Raise TypeError When Passing Non-dict Object to `_interpreters.set___main___attrs` (gh-135856)

4 months agogh-135805: Document the X option and env var for controlling thread-local bytecode...
mpage [Tue, 24 Jun 2025 17:02:50 +0000 (10:02 -0700)] 
gh-135805: Document the X option and env var for controlling thread-local bytecode (#135868)

Document the X option and env var for controlling thread-local bytecode.

4 months agogh-135878: Fix crash in `types.SimpleNamespace.__repr__` (#135889)
sobolevn [Tue, 24 Jun 2025 16:33:25 +0000 (19:33 +0300)] 
gh-135878: Fix crash in `types.SimpleNamespace.__repr__` (#135889)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 months agogh-135487: fix `reprlib.Repr.repr_int` when given very large integers (#135506)
Bénédikt Tran [Tue, 24 Jun 2025 11:09:46 +0000 (13:09 +0200)] 
gh-135487: fix `reprlib.Repr.repr_int` when given very large integers (#135506)

4 months agogh-135494: Fix python -m test --pgo -x test_re (#135713)
Victor Stinner [Tue, 24 Jun 2025 10:21:35 +0000 (12:21 +0200)] 
gh-135494: Fix python -m test --pgo -x test_re (#135713)

Fix regrtest to support excluding tests from --pgo tests.

4 months agoGH-135106: Restrict trashcan to GC'ed objects (GH-135682)
Mark Shannon [Tue, 24 Jun 2025 08:49:38 +0000 (09:49 +0100)] 
GH-135106: Restrict trashcan to GC'ed objects (GH-135682)

4 months agogh-123299: Update 'What's New in Python 3.14' from `3.14` branch (#135616)
Hugo van Kemenade [Tue, 24 Jun 2025 08:08:23 +0000 (09:08 +0100)] 
gh-123299: Update 'What's New in Python 3.14' from `3.14` branch (#135616)

4 months agogh-135532: use `defining_class` for copying BLAKE-2 and SHA-3 objects (#135838)
Bénédikt Tran [Tue, 24 Jun 2025 07:58:07 +0000 (09:58 +0200)] 
gh-135532: use `defining_class` for copying BLAKE-2 and SHA-3 objects (#135838)

4 months agogh-135648: Document that `shutil.copyfileobj` doesn't flush (#135737)
Russell Keith-Magee [Tue, 24 Jun 2025 00:55:50 +0000 (08:55 +0800)] 
gh-135648: Document that `shutil.copyfileobj` doesn't flush (#135737)

Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.

4 months agoFix example according to PEP 750 in "What's new in 3.14" (GH-134727)
Vincent Poulailleau [Mon, 23 Jun 2025 23:36:30 +0000 (01:36 +0200)] 
Fix example according to PEP 750 in "What's new in 3.14" (GH-134727)

A redundant extra part was written. Added a closing tag, to match the usage in PEP 750.

4 months agoDocs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
Yongzi Li [Mon, 23 Jun 2025 22:53:33 +0000 (06:53 +0800)] 
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)

4 months agogh-119786: Add InternalDocs/qsbr.md. (gh-135411)
Neil Schemenauer [Mon, 23 Jun 2025 22:09:40 +0000 (15:09 -0700)] 
gh-119786: Add InternalDocs/qsbr.md. (gh-135411)

Add internal doc for the Quiescent-State Based Reclamation (QSBR) implementation.

4 months agogh-131798: Optimize `_UNARY_NEGATIVE` (GH-135223)
Noam Cohen [Mon, 23 Jun 2025 19:42:09 +0000 (22:42 +0300)] 
gh-131798: Optimize `_UNARY_NEGATIVE` (GH-135223)

4 months agogh-134584: Specialize POP_TOP by reference and type in JIT (GH-135761)
Ken Jin [Mon, 23 Jun 2025 16:57:14 +0000 (00:57 +0800)] 
gh-134584: Specialize POP_TOP by reference and type in JIT (GH-135761)

4 months agoGH-124878: reenable `test_finalize_daemon_thread_hang` test under TSAN (#135793)
Kumar Aditya [Mon, 23 Jun 2025 16:08:57 +0000 (21:38 +0530)] 
GH-124878: reenable `test_finalize_daemon_thread_hang` test under TSAN (#135793)

4 months agoBump mypy to 1.16.1 (#135720)
sobolevn [Mon, 23 Jun 2025 12:29:30 +0000 (15:29 +0300)] 
Bump mypy to 1.16.1 (#135720)

4 months agogh-135823: improve error message in `netrc` security checks (#135827)
Bénédikt Tran [Mon, 23 Jun 2025 10:49:27 +0000 (12:49 +0200)] 
gh-135823: improve error message in `netrc` security checks (#135827)

4 months agogh-89488: Add warning about `Py_BuildValue("p")` needing exact `int` (GH-135610)
Petr Viktorin [Mon, 23 Jun 2025 10:35:59 +0000 (12:35 +0200)] 
gh-89488: Add warning about `Py_BuildValue("p")` needing exact `int` (GH-135610)

4 months agogh-134986: Catch PermissionError when trying to call perf in tests (#134987)
Emma Smith [Mon, 23 Jun 2025 10:28:05 +0000 (06:28 -0400)] 
gh-134986: Catch PermissionError when trying to call perf in tests (#134987)

Using Ubuntu 24.04 on the Windows Subsystem for Linux, perf will raise a
`PermissionError` instead of `FileNotFoundError`. This commit modifies
the tests to catch that.

4 months agoadd async generators section to asyncio internal docs (#135674)
Kumar Aditya [Mon, 23 Jun 2025 06:22:28 +0000 (11:52 +0530)] 
add async generators section to asyncio internal docs  (#135674)

4 months agogh-135532: cleanup clinic `module` directives for cryptographic modules (#135822)
Bénédikt Tran [Sun, 22 Jun 2025 20:04:38 +0000 (22:04 +0200)] 
gh-135532: cleanup clinic `module` directives for cryptographic modules (#135822)

4 months agogh-135815: skip `netrc` security checks if `os.getuid` is missing (#135816)
Bénédikt Tran [Sun, 22 Jun 2025 19:48:06 +0000 (21:48 +0200)] 
gh-135815: skip `netrc` security checks if `os.getuid` is missing (#135816)

4 months agogh-135239: simpler use of mutexes in cryptographic modules (#135267)
Bénédikt Tran [Sun, 22 Jun 2025 14:59:57 +0000 (16:59 +0200)] 
gh-135239: simpler use of mutexes in cryptographic modules (#135267)

4 months agopatchcheck: use URL paths to identify upstream remote (GH-135806)
Kattni [Sun, 22 Jun 2025 04:51:23 +0000 (00:51 -0400)] 
patchcheck: use URL paths to identify upstream remote (GH-135806)

* find defined "(fetch)" remotes with "python/cpython" in their URL
* if there is exactly one, use that remote name
* if there is one named "upstream", "origin", or "python",
  use that remote (in that precedence order)
* otherwise report an error listing the defined remotes

4 months agogh-130605: reenable `test_concurrent_futures` tests under TSAN (#135790)
Kumar Aditya [Sat, 21 Jun 2025 16:33:17 +0000 (22:03 +0530)] 
gh-130605: reenable `test_concurrent_futures` tests under TSAN  (#135790)

4 months agoDocs: Remove unnecessary trailing backslashes (GH-135781)
Rafael Fontenelle [Sat, 21 Jun 2025 13:01:14 +0000 (10:01 -0300)] 
Docs: Remove unnecessary trailing backslashes (GH-135781)

This fixes Sphinx's gettext extraction for translations.

4 months agogh-135532: optimize calls to `PyMem_Malloc` in SHAKE digest computation (#135744)
Bénédikt Tran [Sat, 21 Jun 2025 12:32:00 +0000 (14:32 +0200)] 
gh-135532: optimize calls to `PyMem_Malloc` in SHAKE digest computation (#135744)

- Add a fast path when the digest length is 0 to avoid calling useless functions.
- Directly allocate via `PyBytes_FromStringAndSize(NULL, length)` when possible.

4 months agogh-135759: consistently reject negative sizes in SHAKE digests (#135767)
Bénédikt Tran [Sat, 21 Jun 2025 09:43:30 +0000 (11:43 +0200)] 
gh-135759: consistently reject negative sizes in SHAKE digests (#135767)

Passing a negative digest length to `_hashilb.HASHXOF.[hex]digest()` now
raises a ValueError instead of a MemoryError or a SystemError. This makes
the behavior consistent with that of `_sha3.shake_{128,256}.[hex]digest`.

4 months agogh-135557: use atomic stores in `heapq` operations in free-threading (#135601)
Xuanteng Huang [Sat, 21 Jun 2025 08:43:15 +0000 (16:43 +0800)] 
gh-135557: use atomic stores in `heapq` operations in free-threading (#135601)

4 months agogh-135645: Added `supports_isolated_interpreters` to `sys.implementation` (#135667)
sobolevn [Sat, 21 Jun 2025 07:56:14 +0000 (10:56 +0300)] 
gh-135645: Added `supports_isolated_interpreters` to `sys.implementation` (#135667)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
4 months agogh-127146: Skip test_os.test_mode for Emscripten (#135764)
Hood Chatham [Sat, 21 Jun 2025 06:06:59 +0000 (23:06 -0700)] 
gh-127146: Skip test_os.test_mode for Emscripten (#135764)

Temporarily skip test_os.test_mode on Emscripten; this fails consistently
on the buildbot, but not on other test configurations. Reported as #135783
for follow up.

4 months agogh-135756: Fix nonexistent parameter in tkinter docs (#135770)
Marcell Perger [Fri, 20 Jun 2025 22:45:36 +0000 (23:45 +0100)] 
gh-135756: Fix nonexistent parameter in tkinter docs (#135770)

Remove nonexistent color parameter from tkinter.commondialog.Dialog.show() method documentation.

4 months agogh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh...
Eric Snow [Fri, 20 Jun 2025 20:26:32 +0000 (14:26 -0600)] 
gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135724)

We weren't handling non-positive maxsize values (including the default) properly
in Queue.full().  This change fixes that and adjusts an associated assert.

4 months agogh-135380: enhance critical section held assertions (#135381)
Kumar Aditya [Fri, 20 Jun 2025 17:13:23 +0000 (22:43 +0530)] 
gh-135380: enhance critical section held assertions (#135381)

4 months agogh-135721: skip `test_trashcan_python_class` on wasm buildbots with stack overflow...
Pastukhov Nikita [Fri, 20 Jun 2025 17:06:01 +0000 (20:06 +0300)] 
gh-135721: skip `test_trashcan_python_class` on wasm buildbots with stack overflow (#135766)

4 months agogh-131798: JIT: Optimize _CALL_LEN when the length is known (#135260)
Tomas R. [Fri, 20 Jun 2025 16:21:39 +0000 (18:21 +0200)] 
gh-131798: JIT: Optimize _CALL_LEN when the length is known (#135260)

* Add news entry

* Optimize _CALL_LEN

* Simplify tests

4 months agoDocs: Document `PyExceptionClass` functions in the C API (GH-135697)
Yuki Kobayashi [Fri, 20 Jun 2025 13:57:04 +0000 (22:57 +0900)] 
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)

* Docs: Document `PyExceptionClass_Name`

`PyExceptionClass_Name` is an undocumented function in the limited API.

* Document `PyExceptionClass_Check`

4 months agogh-135748: use argument clinic for more socket methods (#135749)
Kumar Aditya [Fri, 20 Jun 2025 12:02:37 +0000 (17:32 +0530)] 
gh-135748: use argument clinic for more socket methods (#135749)

4 months agogh-89083: add links to RFC 9562 sections in UUID docs (#135684)
Weilin Du [Fri, 20 Jun 2025 11:03:41 +0000 (19:03 +0800)] 
gh-89083: add links to RFC 9562 sections in UUID docs (#135684)

We also sync the docs for UUIDv1 and UUIDv6 concerning the node address and clock sequence.

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months agogh-135532: use `_Py_strhex` in HACL-MD5's `hexdigest` (#135742)
Bénédikt Tran [Fri, 20 Jun 2025 09:50:09 +0000 (11:50 +0200)] 
gh-135532: use `_Py_strhex` in HACL-MD5's `hexdigest` (#135742)