]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 months agogh-99631: Add custom `loads` and `dumps` support for the `shelve` module (#118065)
Furkan Onder [Sat, 12 Jul 2025 12:27:32 +0000 (15:27 +0300)] 
gh-99631: Add custom `loads` and `dumps` support for the `shelve` module (#118065)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 months agogh-89083: Add CLI tests for `UUIDv{6,7,8}` (#136548)
Weilin Du [Sat, 12 Jul 2025 12:06:15 +0000 (20:06 +0800)] 
gh-89083: Add CLI tests for `UUIDv{6,7,8}` (#136548)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 months agogh-135853: add `math.fmax` and `math.fmin` (#135888)
Bénédikt Tran [Sat, 12 Jul 2025 11:31:10 +0000 (13:31 +0200)] 
gh-135853: add `math.fmax` and `math.fmin` (#135888)

3 months agogh-136565: Improve and amend `hashlib.__doc__` (#136566)
Bénédikt Tran [Sat, 12 Jul 2025 11:02:27 +0000 (13:02 +0200)] 
gh-136565: Improve and amend `hashlib.__doc__` (#136566)

3 months agogh-111506: Add _Py_OPAQUE_PYOBJECT to hide PyObject layout & related API (GH-136505)
Petr Viktorin [Sat, 12 Jul 2025 07:55:12 +0000 (09:55 +0200)] 
gh-111506: Add _Py_OPAQUE_PYOBJECT to hide PyObject layout & related API (GH-136505)

Allow Py_LIMITED_API for (Py_GIL_DISABLED && _Py_OPAQUE_PYOBJECT)

API that's removed when _Py_OPAQUE_PYOBJECT is defined:

    - PyObject_HEAD
    - _PyObject_EXTRA_INIT
    - PyObject_HEAD_INIT
    - PyObject_VAR_HEAD
    - struct _object (i.e. PyObject) (opaque)
    - struct PyVarObject (opaque)
    - Py_SIZE
    - Py_SET_TYPE
    - Py_SET_SIZE
    - PyModuleDef_Base (opaque)
    - PyModuleDef_HEAD_INIT
    - PyModuleDef (opaque)
    - _Py_IsImmortal
    - _Py_IsStaticImmortal

Note that the `_Py_IsImmortal` removal (and a few other issues)
 means _Py_OPAQUE_PYOBJECT only works with limited
API 3.14+ now.

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-135401: Test AWS-LC as a cryptography library in CI (GH-135402)
Will Childs-Klein [Fri, 11 Jul 2025 22:24:11 +0000 (18:24 -0400)] 
gh-135401: Test AWS-LC as a cryptography library in CI (GH-135402)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Zachary Ware <zach@python.org>
3 months agoMinor edit: Improve comment readability and ordering (gh-136557)
Raymond Hettinger [Fri, 11 Jul 2025 19:36:17 +0000 (12:36 -0700)] 
Minor edit: Improve comment readability and ordering (gh-136557)

3 months agoDoc: More duplicate word fixes (GH-136299)
Weilin Du [Fri, 11 Jul 2025 18:18:47 +0000 (02:18 +0800)] 
Doc: More duplicate word fixes (GH-136299)

3 months agogh-101100: Fix sphinx warnings in Doc/library/functools.rst (GH-136424)
Weilin Du [Fri, 11 Jul 2025 17:03:13 +0000 (01:03 +0800)] 
gh-101100: Fix sphinx warnings in Doc/library/functools.rst (GH-136424)

Add index entries and anchors for cache_info, cache_clear and register.

3 months agogh-135906: Test the internal C API in test_cext (#136247)
Victor Stinner [Fri, 11 Jul 2025 14:48:43 +0000 (16:48 +0200)] 
gh-135906: Test the internal C API in test_cext (#136247)

Remove duplicated definition: atexit_datacallbackfunc type
is already defined by Include/cpython/pylifecycle.h.

3 months agogh-136156: Remove tempfile test_link_tmpfile() (#136534)
Victor Stinner [Fri, 11 Jul 2025 14:45:31 +0000 (16:45 +0200)] 
gh-136156: Remove tempfile test_link_tmpfile() (#136534)

It's not always possible to guarantee that the file was opened with
O_TMPFILE even if tempfile._O_TMPFILE_WORKS is true.

3 months agogh-136541: Fix several problems of perf trampolines in x86_64 and aarch64 (#136500)
Pablo Galindo Salgado [Fri, 11 Jul 2025 13:32:35 +0000 (14:32 +0100)] 
gh-136541: Fix several problems of perf trampolines in x86_64 and aarch64 (#136500)

This commit fixes the following problems:

* The x86_64 trampolines are not preserving frame pointers
* The hardcoded offsets to the code segment from the FDE only worked properly for x64_64
* The CIE data was not following conventions of aarch64
* The eh_frame for aarch64 was not fully correct

3 months agogh-136300: Modify C tests to conform to PEP-737 (GH-136301)
William S Fulton [Fri, 11 Jul 2025 13:18:35 +0000 (14:18 +0100)] 
gh-136300: Modify C tests to conform to PEP-737 (GH-136301)

- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-136434: Fix docs generation of `UnboundItem` in subinterpreters (#136435)
sobolevn [Fri, 11 Jul 2025 12:31:59 +0000 (15:31 +0300)] 
gh-136434: Fix docs generation of `UnboundItem` in subinterpreters (#136435)

3 months agogh-76637: Note that `undefined` Codec is for testing (#136531)
Stan Ulbrych [Fri, 11 Jul 2025 10:50:21 +0000 (12:50 +0200)] 
gh-76637: Note that `undefined` Codec is for testing (#136531)

Closes #76637

3 months agogh-101100: Fix sphinx warnings in `library/email.parser.rst` (#136475)
Weilin Du [Fri, 11 Jul 2025 09:37:01 +0000 (17:37 +0800)] 
gh-101100: Fix sphinx warnings in `library/email.parser.rst` (#136475)

3 months agogh-107538: [Enum] fix handling of inverted/negative values (GH-132273)
Ethan Furman [Thu, 10 Jul 2025 23:49:09 +0000 (16:49 -0700)] 
gh-107538: [Enum] fix handling of inverted/negative values (GH-132273)

* Fix flag mask inversion when unnamed flags exist.

For example:

    class Flag(enum.Flag):
        A = 0x01
        B = 0x02
        MASK = 0xff

    ~Flag.MASK is Flag(0)

* EJECT and KEEP flags (IntEnum is KEEP) use direct value.

* correct Flag inversion to only flip flag bits

IntFlag will flip all bits -- this only makes a difference in flag sets with
missing values.

* correct negative assigned values in flags

negative values are no longer used as-is, but become inverted; i.e.

    class Y(self.enum_type):
        A = auto()
        B = auto()
        C = ~A        # aka ~1 aka 0b1 110 (from enum.bin()) aka 6
        D = auto()

    assert Y.C. is Y.B|Y.D

3 months agoOmit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (#136519)
Brandt Bucher [Thu, 10 Jul 2025 22:08:48 +0000 (15:08 -0700)] 
Omit `Python/perf_jit_trampoline.c` from the `**/*jit*` CODEOWNERS rule (#136519)

Omit perf_jit_trampoline from "JIT" codeowners

3 months agogh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set (#136518)
Sergey Miryanov [Thu, 10 Jul 2025 21:13:23 +0000 (14:13 -0700)] 
gh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set (#136518)

3 months agogh-135953: Implement sampling tool under profile.sample (#135998)
László Kiss Kollár [Thu, 10 Jul 2025 17:44:24 +0000 (18:44 +0100)] 
gh-135953:  Implement sampling tool under profile.sample (#135998)

Implement a statistical sampling profiler that can profile external
Python processes by PID. Uses the _remote_debugging module and converts
the results to pstats-compatible format for analysis.

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
3 months agogh-52876: Implement missing parameter in `codecs.StreamReaderWriter` functions (...
Stan Ulbrych [Thu, 10 Jul 2025 15:42:14 +0000 (17:42 +0200)] 
gh-52876: Implement missing parameter in `codecs.StreamReaderWriter` functions (#136498)

Closes #52876

3 months agogh-82663: Clarify `codecs.iterdecode/encode` docs (#136497)
Stan Ulbrych [Thu, 10 Jul 2025 15:31:08 +0000 (17:31 +0200)] 
gh-82663: Clarify `codecs.iterdecode/encode` docs (#136497)

Closes #82663

3 months agogh-132661: Add default value (of `""`) for `Interpolation.expression` (#136441)
Dave Peck [Thu, 10 Jul 2025 14:27:41 +0000 (07:27 -0700)] 
gh-132661: Add default value (of `""`) for `Interpolation.expression` (#136441)

3 months agogh-136394: Fix race condition in test_zstd (GH-136432)
Rogdham [Thu, 10 Jul 2025 12:47:27 +0000 (14:47 +0200)] 
gh-136394: Fix race condition in test_zstd (GH-136432)

3 months agogh-82088: Improve performance of PyLong_As*() for multi-digit ints (#135585)
Pieter Eendebak [Thu, 10 Jul 2025 11:16:01 +0000 (13:16 +0200)] 
gh-82088: Improve performance of PyLong_As*() for multi-digit ints (#135585)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-136209: Add .. c:var:: declarations for C exception types (GH-136210)
Petr Viktorin [Thu, 10 Jul 2025 11:07:55 +0000 (13:07 +0200)] 
gh-136209: Add .. c:var:: declarations for C exception types (GH-136210)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 months agogh-136438: Make sure `test_builtins` pass with all optimization levels (#136474)
sobolevn [Thu, 10 Jul 2025 08:57:29 +0000 (11:57 +0300)] 
gh-136438: Make sure `test_builtins` pass with all optimization levels (#136474)

3 months agogh-136476: Remove creation of unused list (GH-136494)
Petr Viktorin [Thu, 10 Jul 2025 08:12:23 +0000 (10:12 +0200)] 
gh-136476: Remove creation of unused list (GH-136494)

3 months agogh-135846: Add zstd dependency to Android build script (#136253)
Emma Smith [Wed, 9 Jul 2025 23:46:33 +0000 (16:46 -0700)] 
gh-135846: Add zstd dependency to Android build script (#136253)

Adds zstd to the Android build process.

---------

Co-authored-by: Malcolm Smith <smith@chaquo.com>
3 months agogh-136476: Show the full stack in get_async_stack_trace in _remote_debugging (#136483)
Pablo Galindo Salgado [Wed, 9 Jul 2025 23:11:17 +0000 (00:11 +0100)] 
gh-136476: Show the full stack in get_async_stack_trace in _remote_debugging (#136483)

3 months agogh-102740: Clarify time.monotonic() "system-wide" in the doc (#136431)
Victor Stinner [Wed, 9 Jul 2025 23:06:48 +0000 (01:06 +0200)] 
gh-102740: Clarify time.monotonic() "system-wide" in the doc (#136431)

3 months agogh-136156: Skip test_tempfile.test_link_tmpfile() on Android (#136430)
Victor Stinner [Wed, 9 Jul 2025 22:17:21 +0000 (00:17 +0200)] 
gh-136156: Skip test_tempfile.test_link_tmpfile() on Android (#136430)

Adds a test skip on platforms where hard links are not available (which includes Android).

3 months agogh-136145: Define 'standard library' and 'stdlib' in the glossary (GH-136146)
Zachary Ware [Wed, 9 Jul 2025 21:33:45 +0000 (16:33 -0500)] 
gh-136145: Define 'standard library' and 'stdlib' in the glossary (GH-136146)

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
3 months agoAdd Diego Russo as code owner of the JIT (#136460)
Diego Russo [Wed, 9 Jul 2025 20:18:06 +0000 (21:18 +0100)] 
Add Diego Russo as code owner of the JIT (#136460)

3 months agoGH-115802: Optimize JIT stencils for size (GH-136393)
Brandt Bucher [Wed, 9 Jul 2025 19:11:28 +0000 (12:11 -0700)] 
GH-115802: Optimize JIT stencils for size (GH-136393)

4 months agoMinor edit: Move comments closer to the code they describe (gh-136477)
Raymond Hettinger [Wed, 9 Jul 2025 17:23:46 +0000 (10:23 -0700)] 
Minor edit: Move comments closer to the code they describe (gh-136477)

4 months agogh-81520: Document unexpected `os.path.ismount` behaviour with btrfs subvolumes ...
Oskar Roesler [Wed, 9 Jul 2025 15:54:58 +0000 (17:54 +0200)] 
gh-81520: Document unexpected `os.path.ismount` behaviour with btrfs subvolumes (GH-136058)

4 months agogh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)
NekrodNIK [Wed, 9 Jul 2025 14:06:42 +0000 (17:06 +0300)] 
gh-131825: Fix `sqlite3` timezone-naive adapter recipe (GH-136270)

4 months agoDocs: unittest.enterModuleContext is not a classmethod (#136464)
Geoffrey Thomas [Wed, 9 Jul 2025 13:52:39 +0000 (09:52 -0400)] 
Docs: unittest.enterModuleContext is not a classmethod (#136464)

4 months agogh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (#136448)
Justin Su [Wed, 9 Jul 2025 08:57:20 +0000 (04:57 -0400)] 
gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (#136448)

4 months agogh-134657: Remove newly added private names from asyncio.__all__ (#134665)
Jelle Zijlstra [Wed, 9 Jul 2025 07:55:46 +0000 (00:55 -0700)] 
gh-134657: Remove newly added private names from asyncio.__all__ (#134665)

4 months agogh-53243: Document `codecs.readbuffer_encode()` (#136284)
Stan Ulbrych [Wed, 9 Jul 2025 07:39:55 +0000 (09:39 +0200)] 
gh-53243: Document `codecs.readbuffer_encode()` (#136284)

Closes #53243

4 months agogh-94503: Update logging cookbook example with info on addressing log injection....
Vinay Sajip [Wed, 9 Jul 2025 07:30:56 +0000 (08:30 +0100)] 
gh-94503: Update logging cookbook example with info on addressing log injection. (GH-136446)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
4 months agogh-119109: improve `functools.partial` vectorcall with keywords (#124584)
dgpb [Wed, 9 Jul 2025 07:25:45 +0000 (10:25 +0300)] 
gh-119109: improve `functools.partial` vectorcall with keywords (#124584)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months agogh-136229: Remove Platform Emscripten is not supported warning (#136230)
Hood Chatham [Wed, 9 Jul 2025 02:26:41 +0000 (04:26 +0200)] 
gh-136229: Remove Platform Emscripten is not supported warning (#136230)

Updates configure script to identify Emscripten as Tier 3.

4 months agogh-91048: Revert the memory cache removal for remote debugging (#136440)
Pablo Galindo Salgado [Wed, 9 Jul 2025 00:31:17 +0000 (01:31 +0100)] 
gh-91048: Revert the memory cache removal for remote debugging (#136440)

gh-91048: Reintroduce the memory cache for remote debugging

4 months agogh-92536: Fix comment about number of unicode string types (#136439)
Arseniy Terekhin [Tue, 8 Jul 2025 21:49:55 +0000 (14:49 -0700)] 
gh-92536: Fix comment about number of unicode string types (#136439)

4 months agogh-136162: Document `encodings` package functions (#136164)
Stan Ulbrych [Tue, 8 Jul 2025 21:34:48 +0000 (23:34 +0200)] 
gh-136162: Document `encodings` package functions (#136164)

Closes #136162.

4 months agoGH-91636: Clear weakrefs created by finalizers. (GH-136401)
Neil Schemenauer [Tue, 8 Jul 2025 19:19:57 +0000 (12:19 -0700)] 
GH-91636: Clear weakrefs created by finalizers. (GH-136401)

Weakrefs to unreachable garbage that are created during running of
finalizers need to be cleared.  This avoids exposing objects that
have `tp_clear` called on them to Python-level code.

4 months agoUpdate bytecode magic number in tests for the 3.14 release candidate (#136427)
Hugo van Kemenade [Tue, 8 Jul 2025 17:11:48 +0000 (20:11 +0300)] 
Update bytecode magic number in tests for the 3.14 release candidate (#136427)

4 months agogh-136156: Allow using linkat() with TemporaryFile (#136281)
Victor Stinner [Tue, 8 Jul 2025 16:39:47 +0000 (18:39 +0200)] 
gh-136156: Allow using linkat() with TemporaryFile (#136281)

tempfile.TemporaryFile() no longer uses os.O_EXCL with os.O_TMPFILE,
so it's possible to use linkat() on the file descriptor.

4 months agogh-136380: Fix import behavior for `concurrent.futures.InterpreterPoolExecutor` ...
AN Long [Tue, 8 Jul 2025 13:32:14 +0000 (22:32 +0900)] 
gh-136380: Fix import behavior for `concurrent.futures.InterpreterPoolExecutor` (#136381)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
4 months agogh-136186: Fix race condition in test_external_inspection.test_only_active_thread...
Pablo Galindo Salgado [Tue, 8 Jul 2025 12:23:31 +0000 (13:23 +0100)] 
gh-136186: Fix race condition in test_external_inspection.test_only_active_thread (#136347)

4 months agogh-101100: Fix sphinx warnings in `Doc/library/exceptions.rst` (#136309)
Yuki Kobayashi [Tue, 8 Jul 2025 12:05:05 +0000 (21:05 +0900)] 
gh-101100: Fix sphinx warnings in `Doc/library/exceptions.rst` (#136309)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months agogh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_property.py` (...
sobolevn [Tue, 8 Jul 2025 07:51:36 +0000 (10:51 +0300)] 
gh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_property.py` (#136384)

4 months agogh-117657: enable `test_capi` under TSAN (#136269)
Kumar Aditya [Tue, 8 Jul 2025 07:35:24 +0000 (13:05 +0530)] 
gh-117657: enable `test_capi` under TSAN (#136269)

4 months agogh-134043: use `_PyObject_GetMethodStackRef` in pattern matching (#136356)
Kumar Aditya [Tue, 8 Jul 2025 07:34:50 +0000 (13:04 +0530)] 
gh-134043: use `_PyObject_GetMethodStackRef` in pattern matching (#136356)

4 months agogh-101100: Fix sphinx warnings in `whatsnew/3.11.rst` (#136402)
Weilin Du [Tue, 8 Jul 2025 06:25:13 +0000 (14:25 +0800)] 
gh-101100: Fix sphinx warnings in `whatsnew/3.11.rst` (#136402)

4 months agogh-102567: Add missing newline to `--help-all` (GH-136391)
Hugo van Kemenade [Tue, 8 Jul 2025 05:59:00 +0000 (08:59 +0300)] 
gh-102567: Add missing newline to `--help-all` (GH-136391)

4 months agogh-98388: add tests for happy eyeballs (#136368)
Kumar Aditya [Mon, 7 Jul 2025 18:00:27 +0000 (23:30 +0530)] 
gh-98388: add tests for happy eyeballs  (#136368)

4 months ago gh-135906: Use `_PyObject_CAST` in internal headers (GH-135892)
Charlie Lin [Mon, 7 Jul 2025 16:56:14 +0000 (16:56 +0000)] 
 gh-135906: Use `_PyObject_CAST` in internal headers (GH-135892)

Fixes build errors encountered in python-greenlet/greenlet#450 when building greenlet on the free-threaded build.

---------

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-101100: Fix Sphinx warnings in library/email.compat32-message.rst (#136323)
Weilin Du [Mon, 7 Jul 2025 16:28:44 +0000 (00:28 +0800)] 
gh-101100: Fix Sphinx warnings in library/email.compat32-message.rst (#136323)

4 months agogh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)
Petr Viktorin [Mon, 7 Jul 2025 15:57:48 +0000 (17:57 +0200)] 
gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)

4 months agogh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (#136187)
Maciej Olko [Mon, 7 Jul 2025 13:29:27 +0000 (15:29 +0200)] 
gh-136155: Docs: only add custom OpenGraph protocol meta tags for HTML builds (#136187)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
4 months agogh-124486: Fix test_whichdb_ndbm in test_dbm on NetBSD (GH-136335)
Serhiy Storchaka [Mon, 7 Jul 2025 12:14:17 +0000 (15:14 +0300)] 
gh-124486: Fix test_whichdb_ndbm in test_dbm on NetBSD (GH-136335)

On NetBSD, ndbm.open() does not fail for empty file.

4 months agogh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914)
Petr Viktorin [Mon, 7 Jul 2025 12:05:17 +0000 (14:05 +0200)] 
gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914)

* gh-135913: Document ob_refcnt, ob_type, ob_size

In `typeobj.rst`, instead of `:c:member:` it would be better to
use `.. c:member::` with a `:no-index:` option, see:

See ref. https://www.sphinx-doc.org/en/master/usage/domains/index.html#basic-markup

However, `c:member` currently does not support `:no-index:`.

4 months agogh-86682: Add versionadded for sys._getframemodulename (#136325)
Anthony Sottile [Mon, 7 Jul 2025 11:22:04 +0000 (07:22 -0400)] 
gh-86682: Add versionadded for sys._getframemodulename (#136325)

add versionadded for sys._getframemodulename

4 months agogh-131591: Document Py_REMOTE_DEBUG (GH-135929)
Petr Viktorin [Mon, 7 Jul 2025 10:56:29 +0000 (12:56 +0200)] 
gh-131591: Document Py_REMOTE_DEBUG (GH-135929)

4 months agogh-101100: Fix sphinx warnings in `whatsnew/3.9` (#136163)
sobolevn [Mon, 7 Jul 2025 10:41:11 +0000 (13:41 +0300)] 
gh-101100: Fix sphinx warnings in `whatsnew/3.9` (#136163)

4 months agogh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980)
Petr Viktorin [Mon, 7 Jul 2025 10:31:13 +0000 (12:31 +0200)] 
gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980)

* Turn the __future__ table to list-table.
  This'll make it easier to add entries that need longer markup
* Semantic markup for __future__ feature descriptions.
* Document CO_* C macros.

4 months agogh-127502: Remove XML vulnerability table (GH-135294)
Victor Stinner [Mon, 7 Jul 2025 09:03:07 +0000 (11:03 +0200)] 
gh-127502: Remove XML vulnerability table (GH-135294)

* Remove the table
* Replace warnings with notes

Latest releases of Python 3.9-3.15 include expat 2.7.1 which is not vulnerable.

expat 2.6.0 was released in February 2024.

4 months agogh-94503: Update logging cookbook with an example of uniformly handling newlines...
Vinay Sajip [Mon, 7 Jul 2025 09:01:03 +0000 (10:01 +0100)] 
gh-94503: Update logging cookbook with an example of uniformly handling newlines in output. (GH-136217)

4 months agogh-87790: support thousands separators for formatting fractional part of Fraction...
Sergey B Kirpichev [Mon, 7 Jul 2025 08:16:31 +0000 (11:16 +0300)] 
gh-87790: support thousands separators for formatting fractional part of Fraction (#132204)

4 months agogh-87790: support thousands separators for formatting fractional part of Decimal...
Sergey B Kirpichev [Mon, 7 Jul 2025 08:16:27 +0000 (11:16 +0300)] 
gh-87790: support thousands separators for formatting fractional part of Decimal (#132202)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months agogh-109700: fix interpreter finalization while handling memory error (#136342)
Kumar Aditya [Mon, 7 Jul 2025 07:15:22 +0000 (12:45 +0530)] 
gh-109700: fix interpreter finalization while handling memory error (#136342)

4 months agogh-136289: Fix test_sqlite3 on platforms with strict UTF-8 filesystem (GH-136326)
Serhiy Storchaka [Mon, 7 Jul 2025 06:29:00 +0000 (09:29 +0300)] 
gh-136289: Fix test_sqlite3 on platforms with strict UTF-8 filesystem (GH-136326)

4 months agogh-136316: Make typing.evaluate_forward_ref better at evaluating nested forwardrefs...
Jelle Zijlstra [Sun, 6 Jul 2025 23:44:20 +0000 (16:44 -0700)] 
gh-136316: Make typing.evaluate_forward_ref better at evaluating nested forwardrefs (#136319)

4 months agogh-136021: Make `type_params` a required parameter for `typing._eval_type` (#136332)
sobolevn [Sun, 6 Jul 2025 19:11:13 +0000 (22:11 +0300)] 
gh-136021: Make `type_params` a required parameter for `typing._eval_type` (#136332)

4 months agogh-109070: Document that get_context in multiprocessing have side effect (#136341)
AN Long [Sun, 6 Jul 2025 18:26:26 +0000 (03:26 +0900)] 
gh-109070: Document that get_context in multiprocessing have side effect (#136341)

Document that get_context in multiprocessing have side effect

4 months agogh-109700: fix memory error handling in `PyDict_SetDefault` (#136338)
Kumar Aditya [Sun, 6 Jul 2025 15:18:11 +0000 (20:48 +0530)] 
gh-109700: fix memory error handling in `PyDict_SetDefault` (#136338)

4 months agogh-136285: Improve `pickle` protocol testing in `test_interpreters` (#136286)
sobolevn [Sun, 6 Jul 2025 07:35:30 +0000 (10:35 +0300)] 
gh-136285: Improve `pickle` protocol testing in `test_interpreters` (#136286)

4 months agogh-136032: Fix `argparse.BooleanOptionalAction` doc (#136133)
W. H. Wang [Sat, 5 Jul 2025 22:54:26 +0000 (06:54 +0800)] 
gh-136032: Fix `argparse.BooleanOptionalAction` doc (#136133)

4 months agogh-136315: Fix skipped multithreading test in test_zstd (#136320)
Emma Smith [Sat, 5 Jul 2025 17:32:28 +0000 (10:32 -0700)] 
gh-136315: Fix skipped multithreading test in test_zstd (#136320)

Fix skipped test in test_zstd

4 months agogh-136047: Allow typing._allow_reckless_class_checks to check `_py_abc` (#136115)
Jeong, YunWon [Sat, 5 Jul 2025 14:24:33 +0000 (23:24 +0900)] 
gh-136047: Allow typing._allow_reckless_class_checks to check `_py_abc` (#136115)

4 months agogh-130870: Preserve `GenericAlias` subclasses in `typing.get_type_hints()` (#131583)
Victorien [Sat, 5 Jul 2025 13:55:39 +0000 (15:55 +0200)] 
gh-130870: Preserve `GenericAlias` subclasses in `typing.get_type_hints()` (#131583)

4 months agogh-101100: Fix references in `http.cookiejar` docs (GH-136238)
Weilin Du [Sat, 5 Jul 2025 13:29:02 +0000 (21:29 +0800)] 
gh-101100: Fix references in `http.cookiejar` docs (GH-136238)

4 months agogh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (#136298)
sobolevn [Sat, 5 Jul 2025 06:14:40 +0000 (09:14 +0300)] 
gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (#136298)

4 months agogh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258)
William S Fulton [Fri, 4 Jul 2025 15:54:00 +0000 (16:54 +0100)] 
gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258)

Use the %N format specifier instead of %s and `PyType_GetName`.

4 months agoDocs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)
Rafael Fontenelle [Fri, 4 Jul 2025 14:40:32 +0000 (11:40 -0300)] 
Docs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)

4 months agogh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (#135831)
Richard Levasseur [Fri, 4 Jul 2025 13:44:37 +0000 (06:44 -0700)] 
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (#135831)

This is still formally undefined behaviour, but we may as well
keep the *same* undefined behaviour as previous versions.

PEP 796 proposes a cleaner and more consistent replacement for 3.15+

4 months agogh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH...
Serhiy Storchaka [Fri, 4 Jul 2025 07:00:23 +0000 (10:00 +0300)] 
gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664)

* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

---------

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
4 months agogh-129824: fix data races in subinterpreters under TSAN (#135794)
Kumar Aditya [Fri, 4 Jul 2025 03:48:55 +0000 (09:18 +0530)] 
gh-129824: fix data races in subinterpreters under TSAN (#135794)

This fixes the data races in typeobject.c in subinterpreters under free-threading. The type flags and slots are only modified in the main interpreter as all static types are first initialised in main interpreter.

4 months agogh-115999: remove redundant check in free-threading from `_STORE_ATTR_WITH_HINT`...
Kumar Aditya [Fri, 4 Jul 2025 03:34:47 +0000 (09:04 +0530)] 
gh-115999: remove redundant check in free-threading from `_STORE_ATTR_WITH_HINT` (#136249)

4 months agogh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218)
Cody Maloney [Fri, 4 Jul 2025 02:27:21 +0000 (19:27 -0700)] 
gh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218)

4 months agoClarify some details regarding `sys.monitoring` (#133981)
Brett Cannon [Thu, 3 Jul 2025 21:04:01 +0000 (14:04 -0700)] 
Clarify some details regarding `sys.monitoring` (#133981)

4 months agogh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standa...
Serhiy Storchaka [Thu, 3 Jul 2025 20:33:02 +0000 (23:33 +0300)] 
gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930)

* Whitespaces no longer accepted between `</` and the tag name.
  E.g. `</ script>` does not end the script section.

* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
  as whitespaces. The only whitespaces are `\t\n\r\f `.

* Null character (U+0000) no longer ends the tag name.

* Attributes and slashes after the tag name in end tags are now ignored,
  instead of terminating after the first `>` in quoted attribute value.
  E.g. `</script/foo=">"/>`.

* Multiple slashes and whitespaces between the last attribute and closing `>`
  are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.

* Multiple `=` between attribute name and value are no longer collapsed.
  E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".

* Whitespaces between the `=` separator and attribute name or value are no
  longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
  "=bar", both with value None; `<a foo= bar>` produces two attributes:
  "foo" with value "" and "bar" with value None.

* Fix Sphinx errors.

* Apply suggestions from code review

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Address review comments.

* Move to Security.

---------

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
4 months agogh-135252: Document Zstandard integration across zipfile, shutil, and tarfile (#135311)
Emma Smith [Thu, 3 Jul 2025 20:28:25 +0000 (13:28 -0700)] 
gh-135252: Document Zstandard integration across zipfile, shutil, and tarfile (#135311)

Document Zstandard integration across zipfile, shutil, and tarfile

4 months agogh-135075: Make PyObject_SetAttr() fail with NULL value and exception (#136180)
Victor Stinner [Thu, 3 Jul 2025 12:51:44 +0000 (14:51 +0200)] 
gh-135075: Make PyObject_SetAttr() fail with NULL value and exception (#136180)

Make PyObject_SetAttr() and PyObject_SetAttrString() fail if called
with NULL value and an exception set.

4 months agogh-115119: Recommend upstream libmpdec in build requirements (#136205)
Sergey B Kirpichev [Thu, 3 Jul 2025 12:44:59 +0000 (15:44 +0300)] 
gh-115119: Recommend upstream libmpdec in build requirements (#136205)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months ago`Python/gc.c`: Refer to `InternalDocs` instead of devguide. (#136243)
Kirill Podoprigora [Thu, 3 Jul 2025 12:14:14 +0000 (15:14 +0300)] 
`Python/gc.c`: Refer to `InternalDocs` instead of devguide. (#136243)