]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 hours agogh-77328: Update `base64` module RFC references to RFC 4648 (#151275) main
Stan Ulbrych [Sat, 13 Jun 2026 12:21:54 +0000 (13:21 +0100)] 
gh-77328: Update `base64` module RFC references to RFC 4648 (#151275)

6 hours agoDocs: Fix method directive signatures in `enum` docs (#151429)
Jonathan Dung [Sat, 13 Jun 2026 08:47:23 +0000 (16:47 +0800)] 
Docs: Fix method directive signatures in `enum` docs (#151429)

6 hours agogh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among...
Daniel Shields [Sat, 13 Jun 2026 08:23:39 +0000 (03:23 -0500)] 
gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among all failed futures (GH-101268)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
22 hours agoFix typos in the `curses.ascii` module documentation (#129300)
Rafael Fontenelle [Fri, 12 Jun 2026 16:02:33 +0000 (13:02 -0300)] 
Fix typos in the `curses.ascii` module documentation (#129300)

Co-authored-by: Stan Ulbrych <stan@python.org>
23 hours agoDocs: avoid repetitions of class references in functions.rst (#150891)
Maciej Olko [Fri, 12 Jun 2026 14:53:06 +0000 (16:53 +0200)] 
Docs: avoid repetitions of class references in functions.rst (#150891)

27 hours agogh-151126: Fix crash on unset memory error in `ctypes.get_errno` (#151382)
sobolevn [Fri, 12 Jun 2026 11:03:21 +0000 (14:03 +0300)] 
gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (#151382)

37 hours agogh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358)
Matt Wozniski [Fri, 12 Jun 2026 01:21:04 +0000 (21:21 -0400)] 
gh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358)

The standard says that a call to `memcpy` must pass a valid source and
destination pointer even if the size is 0, so we must avoid calling
`memcpy` when our source pointer is NULL. If we don't, an optimizing
compiler can decide that the pointer must be non-NULL based on the
presence of UB, and optimize out checks for null pointers.

Specifically, note that the standard says:

    Where an argument declared as size_t n specifies the length of the
    array for a function, n can have the value zero on a call to that
    function. Unless explicitly stated otherwise in the description of
    a particular function in this subclause, pointer arguments on such
    a call shall still have valid values, as described in 7.1.4.

And section 7.1.4 says:

    If an argument to a function has an invalid value (such as a value
    outside the domain of the function, or a pointer outside the address
    space of the program, or a null pointer, or a pointer to
    non-modifiable storage when the corresponding parameter is not
    const-qualified) or a type (after default argument promotion) not
    expected by a function with a variable number of arguments, the
    behavior is undefined.

The specification for `memcpy` doesn't state that it's allowed to be
called with null pointers, and Linux's `/usr/include/string.h` declares
`memcpy` as `__nonnull ((1, 2))`.

40 hours agogh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066)
Peter Bierma [Thu, 11 Jun 2026 22:11:52 +0000 (18:11 -0400)] 
gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066)

Applies https://github.com/microsoft/mimalloc/commit/d7a72c4912943e8aaf135e465ca5ea229ea96646 to our copy of mimalloc.

42 hours agogh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340)
Ivy Xu [Thu, 11 Jun 2026 19:55:11 +0000 (03:55 +0800)] 
gh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340)

44 hours agoCorrect the docstring of `logging.config` (GH-151353)
Ivy Xu [Thu, 11 Jun 2026 18:29:20 +0000 (02:29 +0800)] 
Correct the docstring of `logging.config` (GH-151353)

45 hours agogh-150285: Fix overflow in too long lines for class data in pydoc (GH-151366)
Serhiy Storchaka [Thu, 11 Jun 2026 17:50:00 +0000 (20:50 +0300)] 
gh-150285: Fix overflow in too long lines for class data in pydoc (GH-151366)

Use all available space (80 columns) for formatting reprs
of module and class data, but ensure that they do not overflow.

45 hours agogh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (#139007)
Aniket [Thu, 11 Jun 2026 17:15:29 +0000 (22:45 +0530)] 
gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (#139007)

And add tests.

Co-authored-by: Victor Stinner <vstinner@python.org>
45 hours agogh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ (GH-151354)
Serhiy Storchaka [Thu, 11 Jun 2026 16:52:58 +0000 (19:52 +0300)] 
gh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ (GH-151354)

46 hours agogh-150942: Speed up json.loads array and object decoding (GH-150945)
Pieter Eendebak [Thu, 11 Jun 2026 16:38:49 +0000 (18:38 +0200)] 
gh-150942: Speed up json.loads array and object decoding (GH-150945)

Append parsed values to the result list with _PyList_AppendTakeRef and
insert key/value pairs with _PyDict_SetItem_Take2, which take ownership of
the references instead of incref-ing on insert and then decref-ing the
local.  This removes a reference-count round-trip per element (and, on the
free-threaded build, a per-append lock).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 hours agogh-150490: Raise PyType_Modified for insertion into split dictionary (#150489)
Dino Viehland [Thu, 11 Jun 2026 16:38:31 +0000 (09:38 -0700)] 
gh-150490: Raise PyType_Modified for insertion into split dictionary (#150489)

Raise PyType_Modified for insertion into split dictionary

46 hours agogh-151228: fix data race on clearing embedded dict values (#151330)
Kumar Aditya [Thu, 11 Jun 2026 16:07:00 +0000 (21:37 +0530)] 
gh-151228: fix data race on clearing embedded dict values (#151330)

47 hours agogh-151126: Fix missing memory error in `os._path_splitroot` (#151339)
sobolevn [Thu, 11 Jun 2026 15:48:08 +0000 (18:48 +0300)] 
gh-151126: Fix missing memory error in `os._path_splitroot` (#151339)

47 hours agogh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (#151302)
Cody Maloney [Thu, 11 Jun 2026 15:29:40 +0000 (08:29 -0700)] 
gh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (#151302)

47 hours agogh-139588: Fix nondeterministic `make latex` doc build under parallel make (#151343)
Maciej Olko [Thu, 11 Jun 2026 15:13:22 +0000 (17:13 +0200)] 
gh-139588: Fix nondeterministic `make latex` doc build under parallel make (#151343)

47 hours agogh-150858: fix data race while changing `__qualname__` of a type object(#150859)
Thomas Kowalski [Thu, 11 Jun 2026 15:07:36 +0000 (17:07 +0200)] 
gh-150858: fix data race while changing `__qualname__` of a type object(#150859)

47 hours agogh-151112: Fix crash in `compiler_mod()` when entering the current compilation unit...
Stan Ulbrych [Thu, 11 Jun 2026 14:52:11 +0000 (15:52 +0100)] 
gh-151112: Fix crash in `compiler_mod()` when entering the current compilation unit fails (#151234)

2 days agogh-150397: Fix pyexpat bigmem test (#151329)
Victor Stinner [Thu, 11 Jun 2026 14:45:44 +0000 (16:45 +0200)] 
gh-150397: Fix pyexpat bigmem test (#151329)

Add missing parameter (size).

2 days agogh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,template}_str...
Stan Ulbrych [Thu, 11 Jun 2026 14:26:46 +0000 (15:26 +0100)] 
gh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,template}_str` (#151259)

2 days agogh-150285: Suppress showing the __getstate__() comment in the help for dataclasses...
Serhiy Storchaka [Thu, 11 Jun 2026 12:23:19 +0000 (15:23 +0300)] 
gh-150285: Suppress showing the __getstate__() comment in the help for dataclasses (GH-151328)

2 days agogh-151179: Fix pidfd leak in asyncio _PidfdChildWatcher (#151186)
Timofei [Thu, 11 Jun 2026 11:43:46 +0000 (14:43 +0300)] 
gh-151179: Fix pidfd leak in asyncio _PidfdChildWatcher (#151186)

2 days agogh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (#151260)
Victor Stinner [Thu, 11 Jun 2026 10:55:13 +0000 (12:55 +0200)] 
gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (#151260)

Return 0 if the object is not tracked by the GC.

2 days agogh-151284: Fix test_capi on UBSan (#151286)
Victor Stinner [Thu, 11 Jun 2026 10:55:09 +0000 (12:55 +0200)] 
gh-151284: Fix test_capi on UBSan (#151286)

Comment two checks relying on undefined behavior in
test_fromwidechar() of test_capi.

Enable test_capi in GitHub Action "Reusable Sanitizer".

2 days agoRemove unused internal _Py_REF_IS_QUEUED() function (#151236)
Victor Stinner [Thu, 11 Jun 2026 10:54:36 +0000 (12:54 +0200)] 
Remove unused internal _Py_REF_IS_QUEUED() function (#151236)

2 days agogh-151112: Move an `assert` that may fail in `cfg_builder_check` (#151153)
Stan Ulbrych [Thu, 11 Jun 2026 09:16:27 +0000 (10:16 +0100)] 
gh-151112: Move an `assert` that may fail in `cfg_builder_check` (#151153)

2 days agogh-151177: Fix race condition in `_testembed` (GH-151293)
Peter Bierma [Thu, 11 Jun 2026 09:06:48 +0000 (05:06 -0400)] 
gh-151177: Fix race condition in `_testembed` (GH-151293)

2 days agoDrop historical `:author:`s from HOWTOs (#151091)
Stan Ulbrych [Thu, 11 Jun 2026 08:46:39 +0000 (09:46 +0100)] 
Drop historical `:author:`s from HOWTOs (#151091)

2 days agogh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant __buffe...
tonghuaroot (童话) [Thu, 11 Jun 2026 07:51:43 +0000 (15:51 +0800)] 
gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant __buffer__ (GH-151296)

2 days agogh-136880: Add warning about PYTHONPATH (GH-151098)
glennglazer [Thu, 11 Jun 2026 06:14:34 +0000 (23:14 -0700)] 
gh-136880: Add warning about PYTHONPATH (GH-151098)

2 days agogh-139819: Use builtin `sentinel` in `rlcompleter` (GH-151222)
Victorien [Wed, 10 Jun 2026 20:43:09 +0000 (22:43 +0200)] 
gh-139819: Use builtin `sentinel` in `rlcompleter` (GH-151222)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 days agogh-151278: Fix test_faulthandler on UBSan (#151279)
Victor Stinner [Wed, 10 Jun 2026 19:39:03 +0000 (21:39 +0200)] 
gh-151278: Fix test_faulthandler on UBSan (#151279)

* Py_FatalError() no longer calls _PyFaulthandler_Fini() if it
  doesn't hold the GIL.
* Skip test_faulthandler tests raising signals if run with UBSan.
* Enable test_faulthandler in GitHub Action "Reusable Sanitizer".

2 days agoGHA: Display output when a sanitizer test fails (#151268)
Victor Stinner [Wed, 10 Jun 2026 17:07:51 +0000 (19:07 +0200)] 
GHA: Display output when a sanitizer test fails (#151268)

Modify GitHub Action "Reusable Sanitizer" to display output when a
test fails: pass -W option.

2 days agogh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure...
Victor Stinner [Wed, 10 Jun 2026 16:43:38 +0000 (18:43 +0200)] 
gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250)

If "import encodings" fails at Python startup, dump the Python path
configuration to help users debugging their configuration. The
encodings module is the first module imported during Python startup.

2 days agogh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (#151239)
sobolevn [Wed, 10 Jun 2026 15:59:11 +0000 (18:59 +0300)] 
gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (#151239)

2 days agogh-62259: Add Tools/unicode/gen_expat_table.py (GH-150503)
Serhiy Storchaka [Wed, 10 Jun 2026 15:04:03 +0000 (18:04 +0300)] 
gh-62259: Add Tools/unicode/gen_expat_table.py (GH-150503)

It was used to generate the _expat_decoding_table attribute of CodecInfo.

3 days agogh-141984: Reword the Generator expressions section (GH-150518)
Petr Viktorin [Wed, 10 Jun 2026 14:45:30 +0000 (16:45 +0200)] 
gh-141984: Reword the Generator expressions section (GH-150518)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 days agoadd asyncio guide for Free-Threaded Python (#150456)
Kumar Aditya [Wed, 10 Jun 2026 14:02:11 +0000 (19:32 +0530)] 
add asyncio guide for Free-Threaded Python (#150456)

3 days agoDocs: Fix typos in the "Memory Management" section (GH-151243)
Manoj K M [Wed, 10 Jun 2026 13:13:17 +0000 (18:43 +0530)] 
Docs: Fix typos in the "Memory Management" section (GH-151243)

3 days agogh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (#143987)
tonghuaroot (童话) [Wed, 10 Jun 2026 13:03:49 +0000 (21:03 +0800)] 
gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (#143987)

Fix crashes in socket.sendmsg() and socket.recvmsg_into() that could
occur if buffer sequences are mutated re-entrantly during argument
parsing via __buffer__ protocol callbacks.

The bug occurs because:

1. PySequence_Fast() returns the original list object when the input
   is already a list (not a copy).
2. During iteration, PyObject_GetBuffer() triggers __buffer__
   callbacks which may clear the list.
3. Subsequent iterations access invalid memory (heap OOB read).

The fix replaces PySequence_Fast() with PySequence_Tuple() which
always creates a new tuple, ensuring the sequence cannot be mutated
during iteration.

Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
3 days agogh-89554: Document socket.SocketType as a class (#150683)
Bernát Gábor [Wed, 10 Jun 2026 13:01:01 +0000 (06:01 -0700)] 
gh-89554: Document socket.SocketType as a class (#150683)

socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), but was documented with
the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.

3 days agogh-150671: Deprecate `PyAsyncGen_New`, `PyCoro_New`, `PyGen_New`, `PyGen_NewWithQualN...
sobolevn [Wed, 10 Jun 2026 12:57:09 +0000 (15:57 +0300)] 
gh-150671: Deprecate `PyAsyncGen_New`, `PyCoro_New`, `PyGen_New`, `PyGen_NewWithQualName` functions (#150672)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 days agogh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__(...
Lukas Geiger [Wed, 10 Jun 2026 12:27:11 +0000 (13:27 +0100)] 
gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__()` (#150990)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 days agoAdd yet one assertion in test_set_text_charset_cp949 (GH-151224)
Serhiy Storchaka [Wed, 10 Jun 2026 11:36:14 +0000 (14:36 +0300)] 
Add yet one assertion in test_set_text_charset_cp949 (GH-151224)

Check bytes(m), not only str(m).

3 days agogh-98894: Fix DTrace test_check_probes for shared builds (#151122)
stratakis [Wed, 10 Jun 2026 11:08:25 +0000 (13:08 +0200)] 
gh-98894: Fix DTrace test_check_probes for shared builds (#151122)

When building with --enable-shared, the SystemTap/DTrace notes
live in libpython. Add detection logic to be used by readelf.

Force the C locale on readelf output.

3 days agogh-150285: Wrap long single-line summary in text output in pydoc (GH-151081)
Serhiy Storchaka [Wed, 10 Jun 2026 10:44:35 +0000 (13:44 +0300)] 
gh-150285: Wrap long single-line summary in text output in pydoc (GH-151081)

3 days agogh-80384: Check that callback is callable at weak reference creation (GH-151145)
Serhiy Storchaka [Wed, 10 Jun 2026 10:34:55 +0000 (13:34 +0300)] 
gh-80384: Check that callback is callable at weak reference creation (GH-151145)

* Python functions weakref.ref() and weakref.proxy() now raise TypeError
  if the callback argument is not callable or None.
* C functions PyWeakref_NewRef() and PyWeakref_NewProxy() now raise TypeError
  if the callback argument is not callable, None, or NULL.

Co-authored-by: Maxwell Bernstein <emacs@fb.com>
3 days agogh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters ...
Taeknology [Wed, 10 Jun 2026 10:10:15 +0000 (19:10 +0900)] 
gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters (GH-150053)

Add short code examples mirroring the existing Py_mod_abi example,
so it is clear which slot definition macro (PySlot_DATA, PySlot_INT64,
or PySlot_UINT64) to use for these two slots.

3 days agogh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215)
Harjoth Khara [Wed, 10 Jun 2026 08:48:16 +0000 (01:48 -0700)] 
gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215)

3 days agogh-145239: Colorize `case +` in the REPL (#150979)
Bartosz Sławecki [Wed, 10 Jun 2026 06:36:50 +0000 (08:36 +0200)] 
gh-145239: Colorize `case +` in the REPL (#150979)

3 days agogh-150700: Fix class-scope inline comprehensions when nested scopes reference `__clas...
Bartosz Sławecki [Tue, 9 Jun 2026 22:22:13 +0000 (00:22 +0200)] 
gh-150700: Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends (#150735)

* Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends

In `inline_comprehension()`, when `__class__` / `__classdict__` /
`__conditional_annotations__` appears as `FREE` in a comprehension's
symbol table because a nested scope captured it (e.g. nested lambdas),
this name is still discarded from `comp_free` unconditionally.

This prevents `drop_class_free()` from seeing it, so the appropriate
`ste_needs_(...)` flag is never set on the enclosing class.
That leads to `codegen_make_closure()` throwing `SystemError` when it
couldn't find `__class__` / `__classdict__` /
`__conditional_annotations__` in the class's cellvars.

From now on we just discard from `comp_free` when no child scope
(e.g. a lambda) still needs the name as `FREE`. When a child scope does
need it, keep it in `comp_free` so `drop_class_free()` can set the
appropriate flag and the class creates the implicit cell.

* Fix tests

* Fix typo

* Fix formatting

* Add test checking validity of `__class__` returned

* Prefer 'used' to 'deferred'

3 days agogh-151112: Fix double free in `assemble_init` when out of memory (#151142)
Stan Ulbrych [Tue, 9 Jun 2026 19:45:54 +0000 (20:45 +0100)] 
gh-151112: Fix double free in `assemble_init` when out of memory (#151142)

3 days agogh-151163: Update Android, macOS installer, and Windows builds to SQLite 3.53.2 ...
Zachary Ware [Tue, 9 Jun 2026 18:27:26 +0000 (13:27 -0500)] 
gh-151163: Update Android, macOS installer, and Windows builds to SQLite 3.53.2 (GH-151187)

3 days agogh-139819: rlcompleter – avoid suggesting attributes not accessible on instances...
Peter [Tue, 9 Jun 2026 18:00:23 +0000 (02:00 +0800)] 
gh-139819: rlcompleter – avoid suggesting attributes not accessible on instances (GH-139820)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
3 days agogh-151159: Update CI to use latest SSL library versions (#151176)
Zachary Ware [Tue, 9 Jun 2026 17:29:36 +0000 (12:29 -0500)] 
gh-151159: Update CI to use latest SSL library versions (#151176)

3 days agogh-151159: Bump OpenSSL versions for iOS and Android (GH-151164)
Zachary Ware [Tue, 9 Jun 2026 17:26:13 +0000 (12:26 -0500)] 
gh-151159: Bump OpenSSL versions for iOS and Android (GH-151164)

3 days agogh-151159: Update macOS installer to use OpenSSL 3.5.7. (#151171)
Ivy Xu [Tue, 9 Jun 2026 17:12:36 +0000 (01:12 +0800)] 
gh-151159: Update macOS installer to use OpenSSL 3.5.7. (#151171)

3 days agogh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151183)
Zachary Ware [Tue, 9 Jun 2026 17:09:19 +0000 (12:09 -0500)] 
gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151183)

3 days agoGH-59633: Clarify dest collisions in argparse docs (#150987)
Savannah Ostrowski [Tue, 9 Jun 2026 17:07:03 +0000 (10:07 -0700)] 
GH-59633: Clarify dest collisions in argparse docs (#150987)

3 days agogh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (#151154)
sobolevn [Tue, 9 Jun 2026 16:42:08 +0000 (19:42 +0300)] 
gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (#151154)

3 days agogh-150285: Fix too long docstrings in the concurrent package (GH-151076)
Serhiy Storchaka [Tue, 9 Jun 2026 16:14:10 +0000 (19:14 +0300)] 
gh-150285: Fix too long docstrings in the concurrent package (GH-151076)

3 days agogh-150285: Fix too long docstrings in the asyncio package (GH-151074)
Serhiy Storchaka [Tue, 9 Jun 2026 16:13:34 +0000 (19:13 +0300)] 
gh-150285: Fix too long docstrings in the asyncio package (GH-151074)

3 days agoGH-61082: Clarify nargs='*' positional default behavior (#150989)
Savannah Ostrowski [Tue, 9 Jun 2026 15:37:24 +0000 (08:37 -0700)] 
GH-61082: Clarify nargs='*' positional default behavior (#150989)

3 days agoGH-54732: Tweak wording around empty lines in argument files (#150980)
Savannah Ostrowski [Tue, 9 Jun 2026 15:37:15 +0000 (08:37 -0700)] 
GH-54732: Tweak wording around empty lines in argument files (#150980)

3 days agoDocs: add cross-references to improve navigation in `getpass.rst` (#151092)
Sergio López Gómez [Tue, 9 Jun 2026 15:36:05 +0000 (17:36 +0200)] 
Docs: add cross-references to improve navigation in `getpass.rst` (#151092)

4 days agogh-150898: Assume OpenSSL supports keylogging (#150870)
Robsdedude [Tue, 9 Jun 2026 14:37:38 +0000 (16:37 +0200)] 
gh-150898: Assume OpenSSL supports keylogging (#150870)

Since version 3.10, CPython requires OpenSSL 1.1.1 or higher.
Therefore, support for keylogging can be assumed.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 days agoDocs: Only add `profiling-sampling-visualization.{css,js}` to files when necessary...
Stan Ulbrych [Tue, 9 Jun 2026 13:16:03 +0000 (14:16 +0100)] 
Docs: Only add `profiling-sampling-visualization.{css,js}` to files when necessary (#151150)

4 days agogh-151039: Fix a crash when `_datetime` types outlive `_datetime` module (#151044)
sobolevn [Tue, 9 Jun 2026 11:44:37 +0000 (14:44 +0300)] 
gh-151039: Fix a crash when `_datetime` types outlive `_datetime` module (#151044)

4 days agogh-151130: Add more tests for PyWeakref_* C API (GH-151131)
Serhiy Storchaka [Tue, 9 Jun 2026 11:11:17 +0000 (14:11 +0300)] 
gh-151130: Add more tests for PyWeakref_* C API (GH-151131)

4 days agogh-143008: Fix Null pointer dereferences in TextIOWrapper underlying stream access...
Cody Maloney [Tue, 9 Jun 2026 10:31:44 +0000 (03:31 -0700)] 
gh-143008: Fix Null pointer dereferences in TextIOWrapper underlying stream access (#145957)

TextIOWrapper keeps its underlying stream in a member called
`self->buffer`. That stream can be detached by user code, such as custom
`.flush` implementations resulting in `self->buffer` being set to NULL.
The implementation often checked at the start of functions if
`self->buffer` is in a good state, but did not always recheck after
other Python code was called which could modify `self->buffer`.

The cases which need to be re-checked are hard to spot so rather than
rely on reviewer effort create better safety by making all self->buffer
access go through helper functions.

Thank you yihong0618 for the test, NEWS and initial implementation in
gh-143041.

Co-authored-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 days agogh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (#151127)
sobolevn [Tue, 9 Jun 2026 10:03:33 +0000 (13:03 +0300)] 
gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (#151127)

4 days agogh-151070: Fix class referencing typo in collections.abc docs (GH-151088)
Arshal Aromal [Mon, 8 Jun 2026 19:38:14 +0000 (01:08 +0530)] 
gh-151070: Fix class referencing typo in collections.abc docs (GH-151088)

4 days agogh-150633: Minor improvement of a newly added test (#151103)
Barry Warsaw [Mon, 8 Jun 2026 19:21:00 +0000 (12:21 -0700)] 
gh-150633: Minor improvement of a newly added test (#151103)

Minor improvement of a newly added test.

4 days agogh-150633: Properly handle null characters in the name when importing frozen modules...
Thomas Kowalski [Mon, 8 Jun 2026 18:31:54 +0000 (20:31 +0200)] 
gh-150633: Properly handle null characters in the name when importing frozen modules (GH-150634)

4 days agogh-148932: Fix `profiling.sampling` on Windows virtual environments (#150541)
Eduardo Villalpando Mello [Mon, 8 Jun 2026 17:25:43 +0000 (10:25 -0700)] 
gh-148932: Fix `profiling.sampling` on Windows virtual environments (#150541)

4 days agogh-151019: Fix test_os on 32-bit FreeBSD (#151087)
Victor Stinner [Mon, 8 Jun 2026 16:57:07 +0000 (18:57 +0200)] 
gh-151019: Fix test_os on 32-bit FreeBSD (#151087)

Remove references to server.handler_instance. This attribute has been
removed in 2022 by commit 3ae975f1ac880c47d51cca6c9e305547bd365be7.

4 days agoFix a typo in the `SECURITY.md` (#151086)
Stan Ulbrych [Mon, 8 Jun 2026 15:09:20 +0000 (16:09 +0100)] 
Fix a typo in the `SECURITY.md` (#151086)

5 days agogh-106318: Add examples to the `str.isdigit()` method docs (#144721)
Adorilson Bezerra [Mon, 8 Jun 2026 12:51:35 +0000 (13:51 +0100)] 
gh-106318: Add examples to the `str.isdigit()` method docs  (#144721)

Co-authored-by: Stan Ulbrych <stan@python.org>
5 days agogh-141623: operator.rst: don't use term "bitwise" (GH-141846)
Doron Behar [Mon, 8 Jun 2026 12:12:48 +0000 (15:12 +0300)] 
gh-141623: operator.rst: don't use term "bitwise" (GH-141846)

5 days agoMention `frozendict` in `object.__hash__()` documentation (#148867)
Jonathan Dung [Mon, 8 Jun 2026 11:39:41 +0000 (19:39 +0800)] 
Mention `frozendict` in `object.__hash__()` documentation (#148867)

5 days agogh-151059: [perf] Use `PyObject_CallMethodOneArg` in datetime's `call_tzinfo_method...
Pieter Eendebak [Mon, 8 Jun 2026 11:11:36 +0000 (13:11 +0200)] 
gh-151059: [perf] Use `PyObject_CallMethodOneArg` in datetime's `call_tzinfo_method` (#151062)

5 days agogh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (#151058)
Christian Zinck [Mon, 8 Jun 2026 10:24:26 +0000 (06:24 -0400)] 
gh-101100: Fix Sphinx warnings in 'Buffer Object Structures' documentation (#151058)

5 days agoDocs: Fix missing colon in `bisect` example function (GH-151061)
Sergio López Gómez [Mon, 8 Jun 2026 09:39:03 +0000 (11:39 +0200)] 
Docs: Fix missing colon in `bisect` example function (GH-151061)

5 days agogh-69619: Clarify "whitespace" in the `str.{l,r}strip()` documentation (#150901)
きょうすけ [Sun, 7 Jun 2026 18:25:50 +0000 (03:25 +0900)] 
gh-69619: Clarify "whitespace" in the `str.{l,r}strip()` documentation (#150901)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 days agoUpdate an error message in the 'Functional Programming HOWTO' (#151047)
saber-bit [Sun, 7 Jun 2026 16:47:50 +0000 (12:47 -0400)] 
Update an error message in the 'Functional Programming HOWTO' (#151047)

5 days agogh-150599: Prevent bz2 decompressor reuse after errors (#150600)
Stan Ulbrych [Sun, 7 Jun 2026 15:19:05 +0000 (16:19 +0100)] 
gh-150599: Prevent bz2 decompressor reuse after errors (#150600)

6 days agogh-150885: Remove unused shutil._ensure_directory (GH-150883)
Bernát Gábor [Sun, 7 Jun 2026 14:40:55 +0000 (07:40 -0700)] 
gh-150885: Remove unused shutil._ensure_directory (GH-150883)

No longer used after gh-146581 (GH-146591).

6 days agogh-151021: Fix mmap empty searches past the end (GH-151023)
esadomer [Sun, 7 Jun 2026 13:01:24 +0000 (16:01 +0300)] 
gh-151021: Fix mmap empty searches past the end (GH-151023)

6 days agogh-150942: Speed up re.findall and re.sub/subn result building (gh-150943)
Pieter Eendebak [Sun, 7 Jun 2026 12:06:36 +0000 (14:06 +0200)] 
gh-150942: Speed up re.findall and re.sub/subn result building (gh-150943)

6 days agogh-150942: Speed up frame local item collection (gh-151002)
Omkar Kabde [Sun, 7 Jun 2026 12:05:53 +0000 (17:35 +0530)] 
gh-150942: Speed up frame local item collection (gh-151002)

6 days agogh-148954: Escape methodname in xmlrpc.client.dumps() to prevent XML injection (GH...
Sanyam Kumat [Sat, 6 Jun 2026 21:38:15 +0000 (03:08 +0530)] 
gh-148954: Escape methodname in xmlrpc.client.dumps() to prevent XML injection (GH-148968)

6 days agogh-50948: IDLE: Warn if saving a file will overwrite a newer version (GH-17578)
Zackery Spytz [Sat, 6 Jun 2026 17:14:45 +0000 (10:14 -0700)] 
gh-50948: IDLE: Warn if saving a file will overwrite a newer version (GH-17578)

Co-authored-by: Guilherme Polo <ggpolo@gmail.com>
Co-authored-by: Priya Pappachan <priyapappachan010@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 days agogh-150411: fix `gc_generation.count` race in free-threading (#150413)
Edward Xu [Sat, 6 Jun 2026 17:03:04 +0000 (01:03 +0800)] 
gh-150411: fix `gc_generation.count` race in free-threading (#150413)

7 days agogh-149083: Use sentinel for urllib.parse._UNSPECIFIED (#149612)
Jelle Zijlstra [Sat, 6 Jun 2026 12:47:33 +0000 (05:47 -0700)] 
gh-149083: Use sentinel for urllib.parse._UNSPECIFIED (#149612)

This was added in 3.15; let's use a real sentinel instead of an ad-hoc list object.

7 days agoDelete mention encoding and errors for importlib.resources.path() (GH-143111)
Alexander Shadchin [Sat, 6 Jun 2026 11:52:01 +0000 (14:52 +0300)] 
Delete mention encoding and errors for importlib.resources.path() (GH-143111)

7 days agoDoc: fix order of PyLong_FromUnsignedLongLong (#150937)
Inada Naoki [Sat, 6 Jun 2026 11:37:49 +0000 (20:37 +0900)] 
Doc: fix order of PyLong_FromUnsignedLongLong (#150937)

7 days agogh-150534: Add C23 half-turn trigonometric *pi functions (GH-150555)
Jeff Epler [Sat, 6 Jun 2026 10:19:45 +0000 (03:19 -0700)] 
gh-150534: Add C23 half-turn trigonometric *pi functions (GH-150555)

Add the the following functions to the math module:
acospi, asinpi, atanpi, atan2pi, cospi, sinpi, tanpi.