]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 weeks agogh-116738: Make pwd module thread-safe (#136695)
Alper [Thu, 17 Jul 2025 16:16:01 +0000 (09:16 -0700)] 
gh-116738: Make pwd module thread-safe (#136695)

Make the pwd module functions getpwuid(), getpwnam(), and getpwall() thread-safe. These changes apply to scenarios where the GIL is disabled or in subinterpreter use cases.

3 weeks agogh-127146: Emscripten: Set umask to zero in python.sh (#136740)
Hood Chatham [Thu, 17 Jul 2025 15:39:01 +0000 (17:39 +0200)] 
gh-127146: Emscripten: Set umask to zero in python.sh (#136740)

Clears the umask used during a test of pydoc.apropos when testing on
Emscripten. This is to work around a known issue in Emscripten; but it's not
clear if the chmod call that is causing the problem is actually testing
anything of significance.

3 weeks agofix traceback.FrameSummary docstring by adding end_lineno, colno, and end_colno ...
Ole Herman Schumacher Elgesem [Wed, 16 Jul 2025 17:29:30 +0000 (19:29 +0200)] 
fix traceback.FrameSummary docstring by adding end_lineno, colno, and end_colno (#136716)

3 weeks agogh-136669: build `_asyncio` as static module (#136670)
Kumar Aditya [Wed, 16 Jul 2025 16:39:08 +0000 (22:09 +0530)] 
gh-136669: build `_asyncio` as static module (#136670)

`_asyncio` is now built as a static module so that thread states can be accessed directly via registers and avoids the overhead of function call.

3 weeks agogh-126548: Add a thread-unsafety warning for `importlib.reload()` (GH-136704)
Bartosz Sławecki [Wed, 16 Jul 2025 16:34:14 +0000 (18:34 +0200)] 
gh-126548: Add a thread-unsafety warning for `importlib.reload()` (GH-136704)

3 weeks agogh-127146: Emscripten: Don't need to avoid unpaired surrogate anymore (#136707)
Hood Chatham [Wed, 16 Jul 2025 15:53:47 +0000 (17:53 +0200)] 
gh-127146: Emscripten: Don't need to avoid unpaired surrogate anymore (#136707)

This might have been fixed by gh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.

3 weeks agogh-136710: Fix bad indentation in `os.chdir` docstring (GH-136709)
Harmen Stoppels [Wed, 16 Jul 2025 15:30:10 +0000 (17:30 +0200)] 
gh-136710: Fix bad indentation in `os.chdir` docstring (GH-136709)

3 weeks agoAdd `.gram` file to the `.editorconfig` (#136680)
sobolevn [Wed, 16 Jul 2025 14:35:15 +0000 (17:35 +0300)] 
Add `.gram` file to the `.editorconfig` (#136680)

3 weeks agogh-127146: Emscripten: more regular stack overflow skips (#136708)
Hood Chatham [Wed, 16 Jul 2025 14:02:25 +0000 (16:02 +0200)] 
gh-127146: Emscripten: more regular stack overflow skips (#136708)

Makes the Emscripten stack overflow skip message consistent with WASI,
and replaces some ad-hoc skips.

3 weeks agogh-127146: Emscripten: Make os.umask() actually work (#136706)
Hood Chatham [Wed, 16 Jul 2025 13:33:15 +0000 (15:33 +0200)] 
gh-127146: Emscripten: Make os.umask() actually work (#136706)

Provide a stub implementation of umask that is enough to get some tests passing.
More work is needed upstream in Emscripten to make all umask tests to pass.

3 weeks agoImproved venv docs to indicate that isolation is the default. (#136698)
Facundo Batista [Wed, 16 Jul 2025 11:55:31 +0000 (08:55 -0300)] 
Improved venv docs to indicate that isolation is the default. (#136698)

* Improved venv docs to note that isolation is the default.

* Insert "that" so that a sentence reads better.

* Improved wording.

---------

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
3 weeks agogh-135148: Correctly handle f/t strings with comments and debug expressions (#135198)
Pablo Galindo Salgado [Wed, 16 Jul 2025 09:47:13 +0000 (11:47 +0200)] 
gh-135148: Correctly handle f/t strings with comments and debug expressions (#135198)

3 weeks agofix grammar typo in `logging.rst` (#136584)
William Andrea [Wed, 16 Jul 2025 07:01:26 +0000 (04:01 -0300)] 
fix grammar typo in `logging.rst` (#136584)

3 weeks agogh-127146: Report uid in Emscripten + node as native uid (#136509)
Hood Chatham [Wed, 16 Jul 2025 04:17:16 +0000 (06:17 +0200)] 
gh-127146: Report uid in Emscripten + node as native uid (#136509)

Corrects the handling of getuid on emscripten, which was consistently reporting as 0.

3 weeks agoFix the doctest.testmod() docstring (GH-136675)
Serhiy Storchaka [Tue, 15 Jul 2025 16:42:02 +0000 (19:42 +0300)] 
Fix the doctest.testmod() docstring (GH-136675)

__test__ = None is not supported since Python 2.4.

3 weeks agoFix index entry and anchor for module.__test__ (GH-136674)
Serhiy Storchaka [Tue, 15 Jul 2025 15:52:51 +0000 (18:52 +0300)] 
Fix index entry and anchor for module.__test__ (GH-136674)

It was "doctest.module attribute". Now it is "module attribute".

3 weeks agogh-135909: Assert incoming `refcnt != 0` for the free threaded GC (GH-136009)
andrewreds [Tue, 15 Jul 2025 15:26:16 +0000 (01:26 +1000)] 
gh-135909: Assert incoming `refcnt != 0` for the free threaded GC (GH-136009)

This helps catch double deallocation bugs and is similar to the
assertion in the GIL-enabled build.  The call to `validate_refcounts`
is moved up to start of the GC because `queue_untracked_obj_decref()`
creates it own zero reference count garbage.

3 weeks agogh-72327: Suggest using system terminal for pip install in PyREPL (#136328)
Richard Si [Tue, 15 Jul 2025 14:25:07 +0000 (10:25 -0400)] 
gh-72327: Suggest using system terminal for pip install in PyREPL (#136328)

Users new to Python packaging often try to use pip from the REPL only to
be met with a confusing SyntaxError. If this happens, guide the user to
use a system terminal instead to invoke pip.

Closes #72327

---------

Co-authored-by: Tom Viner <tom@viner.tv>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
3 weeks agogh-111968: remove redundant fetching of interpreter state in `dict` implementation...
Kumar Aditya [Tue, 15 Jul 2025 13:45:11 +0000 (19:15 +0530)] 
gh-111968: remove redundant fetching of interpreter state in `dict` implementation  (#136673)

3 weeks agogh-136682: Remove incorrect statement that `os.path.samestat` accepts file-like objec...
Ran Benita [Tue, 15 Jul 2025 12:49:11 +0000 (15:49 +0300)] 
gh-136682: Remove incorrect statement that `os.path.samestat` accepts file-like objects (#136683)

3 weeks agogh-136155: Docs: check for EPUB fatal errors in CI (#134074)
Maciej Olko [Tue, 15 Jul 2025 12:26:24 +0000 (14:26 +0200)] 
gh-136155: Docs: check for EPUB fatal errors in CI (#134074)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
3 weeks agogh-72570: mention the incompatibility of XOFs with HMAC (#136676)
Bénédikt Tran [Tue, 15 Jul 2025 12:03:21 +0000 (14:03 +0200)] 
gh-72570: mention the incompatibility of XOFs with HMAC (#136676)

3 weeks agoGH-132661: Add ``string.templatelib.convert()`` (#135217)
Adam Turner [Tue, 15 Jul 2025 09:56:42 +0000 (10:56 +0100)] 
GH-132661: Add ``string.templatelib.convert()`` (#135217)

3 weeks agoGH-133711: Enable UTF-8 mode by default (PEP 686) (#133712)
Adam Turner [Tue, 15 Jul 2025 09:45:41 +0000 (10:45 +0100)] 
GH-133711: Enable UTF-8 mode by default (PEP 686) (#133712)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks agogh-131189: Fix "msvcrt" import warning on Linux when "_ctypes" is not available....
Dzmitry Plashchynski [Tue, 15 Jul 2025 07:44:31 +0000 (10:44 +0300)] 
gh-131189: Fix "msvcrt" import warning on Linux when "_ctypes" is not available. (GH-131201)

Fix "msvcrt" import warning on Linux when "_ctypes" is not available.

On Linux, compiling without "libffi" causes a
"No module named 'msvcrt'" warning when launching PyREPL.

3 weeks agogh-136663: fix signatures of PyFloat_Pack/Unpack in docs (#136664)
Sergey B Kirpichev [Tue, 15 Jul 2025 05:30:12 +0000 (08:30 +0300)] 
gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (#136664)

3 weeks agoFix a minor indentation error (#136661)
Tian Gao [Tue, 15 Jul 2025 00:01:56 +0000 (17:01 -0700)] 
Fix a minor indentation error (#136661)

3 weeks agogh-116738: Make grp module thread-safe (#135434)
Alper [Mon, 14 Jul 2025 18:18:41 +0000 (11:18 -0700)] 
gh-116738: Make grp module thread-safe (#135434)

Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
3 weeks agogh-136396: Include instrumentation when creating new copies of the bytecode (#136525)
mpage [Mon, 14 Jul 2025 17:48:10 +0000 (10:48 -0700)] 
gh-136396: Include instrumentation when creating new copies of the bytecode (#136525)

Previously, we assumed that instrumentation would happen for all copies of
the bytecode if the instrumentation version on the code object didn't match
the per-interpreter instrumentation version. That assumption was incorrect:
instrumentation will exit early if there are no new "events," even if there
is an instrumentation version mismatch.

To fix this, include the instrumented opcodes when creating new copies of
the bytecode, rather than replacing them with their uninstrumented variants.
I don't think we have to worry about races between instrumentation and creating
new copies of the bytecode: instrumentation and new bytecode creation cannot happen
concurrently. Instrumentation requires that either the world is stopped or the
code object's per-object lock is held and new bytecode creation requires holding
the code object's per-object lock.

3 weeks agoGH-135904: Improve the JIT's performance on macOS (GH-136528)
Brandt Bucher [Mon, 14 Jul 2025 17:14:20 +0000 (10:14 -0700)] 
GH-135904: Improve the JIT's performance on macOS (GH-136528)

4 weeks agogh-90733: improve `hashlib.scrypt` interface (#136100)
Bénédikt Tran [Mon, 14 Jul 2025 10:49:34 +0000 (12:49 +0200)] 
gh-90733: improve `hashlib.scrypt` interface (#136100)

* add `scrypt` to `hashlib.__all__`
* improve `hashlib.scrypt` exception messages

4 weeks agogh-134567: Move unittest What’s New entry (#136630)
Garry Cairns [Mon, 14 Jul 2025 10:32:10 +0000 (11:32 +0100)] 
gh-134567: Move unittest What’s New entry (#136630)

4 weeks agoPartially revert "gh-101100: Fix sphinx warnings in `library/email.parser.rst` (...
Hugo van Kemenade [Mon, 14 Jul 2025 09:13:15 +0000 (12:13 +0300)] 
Partially revert "gh-101100: Fix sphinx warnings in `library/email.parser.rst` (#136475)" (#136629)

4 weeks agogh-67341: fix a typo in `Include/fileutils.h` (#136049)
Lee Dogeon [Mon, 14 Jul 2025 08:02:05 +0000 (17:02 +0900)] 
gh-67341: fix a typo in `Include/fileutils.h` (#136049)

`IO_REPARSE_TAG_SYMLINK` is mapped to `S_IFLNK` in `fileutils.c`, not in `posixmodule.c`

4 weeks agogh-135256: Simplify parsing parameters in Argument Clinic (GH-135257)
Serhiy Storchaka [Sun, 13 Jul 2025 20:27:48 +0000 (23:27 +0300)] 
gh-135256: Simplify parsing parameters in Argument Clinic (GH-135257)

4 weeks agogh-127146: Emscripten: Fix test_open_undecodable_uri by setting `-sTEXTDECODER=2...
Hood Chatham [Sun, 13 Jul 2025 18:30:38 +0000 (20:30 +0200)] 
gh-127146: Emscripten: Fix test_open_undecodable_uri by setting `-sTEXTDECODER=2` (#136624)

Removes the JS text decoder fallback and gets rid of the bugs due to the differences
in behavior on invalid utf8 strings. See https://github.com/emscripten-core/emscripten/issues/24690.

4 weeks agogh-121914: Change the names of the symbol tables for lambda and genexpr (GH-135288)
Serhiy Storchaka [Sun, 13 Jul 2025 18:09:42 +0000 (21:09 +0300)] 
gh-121914: Change the names of the symbol tables for lambda and genexpr (GH-135288)

Change the names of the symbol tables for lambda expressions and generator
expressions to "<lambda>" and "<genexpr>" respectively to avoid conflicts
with user-defined names.

4 weeks agogh-127971: fix off-by-one read beyond the end of a string during search (#132574)
Duane Griffin [Sun, 13 Jul 2025 13:33:34 +0000 (01:33 +1200)] 
gh-127971: fix off-by-one read beyond the end of a string during search (#132574)

4 weeks agogh-42237: Link to complete list of codec aliases (#136625)
Stan Ulbrych [Sun, 13 Jul 2025 13:12:46 +0000 (15:12 +0200)] 
gh-42237: Link to complete list of codec aliases (#136625)

Closes #42237

4 weeks agogh-132629: Deprecate accepting out-of-range values for unsigned integers in PyArg_Par...
Serhiy Storchaka [Sun, 13 Jul 2025 09:44:54 +0000 (12:44 +0300)] 
gh-132629: Deprecate accepting out-of-range values for unsigned integers in PyArg_Parse (GH-132630)

For unsigned integer formats in the PyArg_Parse* functions,
accepting Python integers with value that is larger than
the maximal value the corresponding C type or less than
the minimal value for the corresponding signed integer type
is now deprecated.

4 weeks agogh-132346: Docs: Clarify that reference counts aren't stable between versions (GH...
Peter Bierma [Sun, 13 Jul 2025 09:10:37 +0000 (05:10 -0400)] 
gh-132346: Docs: Clarify that reference counts aren't stable between versions (GH-132352)

4 weeks agogh-136547: allow to temporarily disable hash algorithms in tests (#136570)
Bénédikt Tran [Sun, 13 Jul 2025 08:58:15 +0000 (10:58 +0200)] 
gh-136547: allow to temporarily disable hash algorithms in tests (#136570)

4 weeks agoDocs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation...
Peter Bierma [Sun, 13 Jul 2025 06:46:13 +0000 (02:46 -0400)] 
Docs: Fix and improve the `PyUnstable_Object_EnableDeferredRefcount` documentation (GH-135323)

4 weeks agogh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (#134834)
Yongzi Li [Sun, 13 Jul 2025 05:56:31 +0000 (13:56 +0800)] 
gh-134833: improve docs for `del s[i:j]` in `Mutable Sequence Types` (#134834)

4 weeks agogh-132969: update ACKS file (gh-133222) (#136144)
Ajay Kamdar [Sun, 13 Jul 2025 05:49:44 +0000 (01:49 -0400)] 
gh-132969: update ACKS file (gh-133222) (#136144)

4 weeks agogh-136523: Fix wave.Wave_write emitting an unraisable when open raises (GH-136529)
Sachin Shah [Sun, 13 Jul 2025 05:49:12 +0000 (01:49 -0400)] 
gh-136523: Fix wave.Wave_write emitting an unraisable when open raises (GH-136529)

4 weeks agogh-134939: Correct `concurrent.interpreters` source code link (#136564)
Stan Ulbrych [Sun, 13 Jul 2025 05:35:57 +0000 (07:35 +0200)] 
gh-134939: Correct `concurrent.interpreters` source code link (#136564)

4 weeks agogh-101100: Fix sphinx warnings in Doc/library/platform.rst (GH-136562)
Weilin Du [Sat, 12 Jul 2025 18:15:04 +0000 (02:15 +0800)] 
gh-101100: Fix sphinx warnings in Doc/library/platform.rst (GH-136562)

4 weeks agogh-136591: avoid using deprecated features for OpenSSL 3.0+ (#136592)
Bénédikt Tran [Sat, 12 Jul 2025 16:33:07 +0000 (18:33 +0200)] 
gh-136591: avoid using deprecated features for OpenSSL 3.0+ (#136592)

Since OpenSSL 3.0, `ERR_func_error_string()` always returns NULL and
`EVP_MD_CTX_get0_md()` should be preferred over `EVP_MD_CTX_md()`.

4 weeks agogh-136549: Fix signature of threading.excepthook() (GH-136559)
Serhiy Storchaka [Sat, 12 Jul 2025 15:54:26 +0000 (18:54 +0300)] 
gh-136549: Fix signature of threading.excepthook() (GH-136559)

4 weeks agogh-91153: prevent a crash in `bytearray.__setitem__(ind, ...)` when `ind.__index__...
Bast [Sat, 12 Jul 2025 13:37:52 +0000 (06:37 -0700)] 
gh-91153: prevent a crash in `bytearray.__setitem__(ind, ...)` when `ind.__index__` has side-effects (#132379)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks agogh-134759: fix `UnboundLocalError` in `email.message.Message.get_payload` (#136071)
Kliment Lamonov [Sat, 12 Jul 2025 13:30:09 +0000 (16:30 +0300)] 
gh-134759: fix `UnboundLocalError` in `email.message.Message.get_payload` (#136071)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks agogh-99813: Start using `SSL_sendfile` when available (#99907)
Illia Volochii [Sat, 12 Jul 2025 12:42:35 +0000 (15:42 +0300)] 
gh-99813: Start using `SSL_sendfile` when available (#99907)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 weeks 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>
4 weeks 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>
4 weeks 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)

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

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

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

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

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

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

4 weeks 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

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

4 weeks 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

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

4 weeks 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

4 weeks 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

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

4 weeks 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>
4 weeks 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

4 weeks 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

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

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

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

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

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

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

4 weeks 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).

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

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