]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks agogh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145)
Serhiy Storchaka [Sun, 19 Jul 2026 15:06:48 +0000 (18:06 +0300)] 
gh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-153906: Show 'Data' in code formatting (#154132)
Hugo van Kemenade [Sun, 19 Jul 2026 14:45:17 +0000 (16:45 +0200)] 
gh-153906: Show 'Data' in code formatting (#154132)

2 weeks agogh-153932: protect read of en_index during enumerate.reduce (GH-154118)
L. Le [Sun, 19 Jul 2026 13:20:56 +0000 (15:20 +0200)] 
gh-153932: protect read of en_index during enumerate.reduce (GH-154118)

2 weeks agogh-152433: Windows: ``_uuid`` module: improve UWP compatibility (#152793)
thexai [Sun, 19 Jul 2026 13:19:40 +0000 (15:19 +0200)] 
gh-152433: Windows: ``_uuid`` module: improve UWP compatibility (#152793)

2 weeks agoimprove json test coverage (GH-154123)
David [Sun, 19 Jul 2026 13:19:00 +0000 (15:19 +0200)] 
improve json test coverage (GH-154123)

Add test that covers the except block on line 106 of decoder.py

2 weeks agogh-151949: Fix Sphinx reference warnings in `Doc/library/lzma.rst` (GH-153878)
Vyron Vasileiadis [Sun, 19 Jul 2026 13:10:47 +0000 (16:10 +0300)] 
gh-151949: Fix Sphinx reference warnings in `Doc/library/lzma.rst` (GH-153878)

The lzma module constants (FORMAT_*, CHECK_*, PRESET_*, FILTER_*, MODE_*
and MF_*) were referenced with the :const: role throughout the module
documentation but were never defined as reference targets, producing
"reference target not found" warnings under nitpicky mode.

Document these public constants with .. data:: directives, following the
convention used by the signal, socket and ssl modules, so the existing
references resolve. The now-redundant inline descriptions of the format
and check constants are condensed into linked references.

2 weeks agourllib: Add tests for HTTP errors to complete coverage (#154102)
Ajob Kustra [Sun, 19 Jul 2026 12:29:17 +0000 (14:29 +0200)] 
urllib: Add tests for HTTP errors to complete coverage (#154102)

* add test for httperror props such as reason and fp, and stringified urlerror test

* rm unnecessary 'reason' attr test, change url to filename and add reason and headers attr

* separate file pointer test

* prevent resource warning, close httperror exception

* exc > err

2 weeks agogh-154055: Gate optional curses functions absent on old SVr4 curses (GH-154057)
Serhiy Storchaka [Sun, 19 Jul 2026 12:26:47 +0000 (15:26 +0300)] 
gh-154055: Gate optional curses functions absent on old SVr4 curses (GH-154057)

Build hygiene so the curses modules build against a limited curses (e.g. the
native SVr4 curses of illumos/Solaris), matching how other optional functions
are already gated:

* Probe and #ifdef-gate the X/Open attr_t functions (window.attr_get/attr_set/
  attr_on/attr_off/color_set), the soft-label attribute functions
  (slk_attr_on/off/set, slk_color) and scr_set(); scr_set is probed separately
  from the scr_dump family, which SVr4 has without it.
* Stop gating update_lines_cols() on resizeterm(): it only reads LINES/COLS and
  is used unconditionally (e.g. by set_term()), so a build without resizeterm()
  failed to link.
* On Solaris/illumos define _BOOL (and include <stdbool.h>) so the SVr4
  <curses.h> "typedef char bool" does not clash with C's bool.

test.test_curses: skip or guard the tests that use the now-optional functions,
split test_attributes so its chtype-based part still runs, and treat the native
curses of NetBSD and illumos/Solaris as having broken newterm() (they crash on
repeated newterm()/delscreen(), like ncurses before 6.5).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-104533: Use `@ctypes.util.struct` decorator (#154031)
Victor Stinner [Sun, 19 Jul 2026 12:08:56 +0000 (14:08 +0200)] 
gh-104533: Use `@ctypes.util.struct` decorator (#154031)

Use also `@ctypes.util.wrap_dll_function()` decorator.

2 weeks agogh-153903: Use `@ctypes.util.wrap_dll_function()` with pythonapi (#154030)
Victor Stinner [Sun, 19 Jul 2026 12:04:30 +0000 (14:04 +0200)] 
gh-153903: Use `@ctypes.util.wrap_dll_function()` with pythonapi (#154030)

Use the `@ctypes.util.wrap_dll_function()` decorator with
ctypes.pythonapi to wrap Python C API functions in the test suite.

2 weeks agoAdd test for explicit `cls` argument bypassing default JSON decoder (#154094)
Dominic H. [Sun, 19 Jul 2026 11:58:06 +0000 (13:58 +0200)] 
Add test for explicit `cls` argument bypassing default JSON decoder (#154094)

* Add test for skipped `cls=None` case

* Fix lint

* Add new line between classes

2 weeks agogh-104533: Update test_ctypes.test_structures (#154091)
Victor Stinner [Sun, 19 Jul 2026 10:51:29 +0000 (12:51 +0200)] 
gh-104533: Update test_ctypes.test_structures (#154091)

2 weeks agoDocument getopt and gnu_getopt longopts argument as string (#153976)
Florian Freitag [Sun, 19 Jul 2026 10:26:26 +0000 (12:26 +0200)] 
Document getopt and gnu_getopt longopts argument as string (#153976)

Document getopt and gnu_getopt longopts as string

2 weeks agogh-104533: Fix `@ctypes.util.struct` with endian (#154038)
Victor Stinner [Sun, 19 Jul 2026 10:07:43 +0000 (12:07 +0200)] 
gh-104533: Fix `@ctypes.util.struct` with endian (#154038)

Change `_fields_` type to a list of tuples, instead of a list of lists.

Modify test.test_ctypes.test_aligned_structures to test also
`@ctypes.util.struct` decorator.

2 weeks agogh-104533: Fix `@ctypes.util.struct` with string annotations (#154040)
Victor Stinner [Sun, 19 Jul 2026 10:05:22 +0000 (12:05 +0200)] 
gh-104533: Fix `@ctypes.util.struct` with string annotations (#154040)

Fix `@ctypes.util.struct` on structures declared in a module which uses
`from __future__ import annotations`. The decorator now calls
get_annotations() with eval_str=True.

2 weeks agogh-153903: Fix ctypes wrap_dll_function() with string annotations (#154042)
Victor Stinner [Sun, 19 Jul 2026 10:04:40 +0000 (12:04 +0200)] 
gh-153903: Fix ctypes wrap_dll_function() with string annotations (#154042)

Call get_annotations() with eval_str=True.

2 weeks agogh-153906: Modernize pydoc HTML output (GH-153909)
Serhiy Storchaka [Sun, 19 Jul 2026 09:59:58 +0000 (12:59 +0300)] 
gh-153906: Modernize pydoc HTML output (GH-153909)

Follow-up of the HTML5 migration in bpo-10716: replace the layout
tables, the &nbsp;/<br> encoding of docstrings and the obsolete
<a name=...> anchors with semantic markup (header, section, h1-h4,
CSS multi-column lists, white-space: pre-wrap, id= anchors), and
restyle the pages after the python-docs-theme used by docs.python.org,
including dark mode support.  Members inherited from other classes
are now collapsed by default.  The pydoc API is unchanged; obsolete
arguments of HTMLDoc methods are accepted and ignored.  ServerHTMLDoc
in xmlrpc.server is updated to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks agoDocs: add frozendict to data types theme (#154063)
Rodrigo Girão Serrão [Sun, 19 Jul 2026 09:58:18 +0000 (11:58 +0200)] 
Docs: add frozendict to data types theme (#154063)

2 weeks agoImprove colorsys coverage (#153982)
MonadChains [Sun, 19 Jul 2026 09:48:02 +0000 (11:48 +0200)] 
Improve colorsys coverage (#153982)

* improve colorsys coverage

* add subtest

2 weeks agogh-154053: Fix compilation of the ssl module against LibreSSL (GH-154054)
Serhiy Storchaka [Sun, 19 Jul 2026 09:38:47 +0000 (12:38 +0300)] 
gh-154053: Fix compilation of the ssl module against LibreSSL (GH-154054)

LibreSSL does not provide SSL_CTX_set1_sigalgs_list() or
SSL_CTX_set1_client_sigalgs_list(), added in gh-138252, so _ssl failed to
compile against LibreSSL on 3.15+. Guard the set_server_sigalgs() and
set_client_sigalgs() methods so they raise NotImplementedError on LibreSSL,
and skip the corresponding tests.

2 weeks agoFix typo "interruptability" in Logging Cookbook documentation (#154027)
Michael Newman [Sun, 19 Jul 2026 08:54:25 +0000 (04:54 -0400)] 
Fix typo "interruptability" in Logging Cookbook documentation (#154027)

2 weeks agogh-153864: Fix curses window.insch() for non-ASCII characters on a wide build (GH...
Serhiy Storchaka [Sun, 19 Jul 2026 08:45:06 +0000 (11:45 +0300)] 
gh-153864: Fix curses window.insch() for non-ASCII characters on a wide build (GH-153865)

On a wide build, winsch() does not locale-decode a byte above 127, unlike
waddch(), so insch() inserted '¤' (U+00A4) instead of '€' for byte 0xA4
under ISO-8859-15.  Decode the byte with btowc() and insert it as a wide
character, like addch().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agoTest that `ValueError` is raised when `vfsopen` is passed an invalid mode (#154008)
Rayan [Sun, 19 Jul 2026 08:21:26 +0000 (10:21 +0200)] 
Test that `ValueError` is raised when `vfsopen` is passed an invalid mode (#154008)

* ValueError with message test

* Remove white space

* Apply suggestions from code review

Change from double quotes to single quotes.

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
---------

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2 weeks agofix typos in `abi3t-migration.rst` (GH-153918)
Jost Migenda [Sun, 19 Jul 2026 07:49:00 +0000 (09:49 +0200)] 
fix typos in `abi3t-migration.rst` (GH-153918)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2 weeks agogh-153862: Fix curses window.inch() for non-ASCII characters on a wide build (GH...
Serhiy Storchaka [Sun, 19 Jul 2026 07:43:22 +0000 (10:43 +0300)] 
gh-153862: Fix curses window.inch() for non-ASCII characters on a wide build (GH-153863)

On a wide build, winch() returns the low 8 bits of the character's code
point with no locale conversion, so inch()/mvinch() disagreed with instr()
for a non-ASCII character of an 8-bit locale ('€' under ISO-8859-15 gave
0xAC instead of 0xA4).  Re-encode the cell to its locale byte via wctob(),
as ncurses does for getbkgd().

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-154048: Fix building the iconv codec on illumos/Solaris (GH-154049)
Serhiy Storchaka [Sun, 19 Jul 2026 06:23:26 +0000 (09:23 +0300)] 
gh-154048: Fix building the iconv codec on illumos/Solaris (GH-154049)

iconv()'s input-buffer argument is declared "const char **" on some systems
(illumos/Solaris, old GNU libiconv) rather than the POSIX "char **", so passing
a "char **" failed to compile.  Cast it through void*, which converts to either
without a warning.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-136687: Add ./configure --with-curses to select the curses backend (GH-153992)
Serhiy Storchaka [Sun, 19 Jul 2026 06:08:30 +0000 (09:08 +0300)] 
gh-136687: Add ./configure --with-curses to select the curses backend (GH-153992)

Add --with-curses=ncursesw|ncurses|curses|no, mirroring --with-readline.
The default (auto) keeps the current behaviour: prefer ncursesw, fall back
to ncurses.  --with-curses=curses links the system's native curses (e.g. on
NetBSD or Solaris), which has no pkg-config file and was previously
unreachable; it is built with wide-character support when the library
provides it.  --without-curses excludes the curses and _curses_panel modules
from the build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-154001: Avoid division by zero in binomialvariate (GH-154004)
Łukasz [Sun, 19 Jul 2026 06:06:09 +0000 (08:06 +0200)] 
gh-154001: Avoid division by zero in binomialvariate (GH-154004)

2 weeks agoUse Py_complex_protected AC converter for cmath.rect() (GH-154034)
Sergey B Kirpichev [Sun, 19 Jul 2026 00:24:16 +0000 (03:24 +0300)] 
Use Py_complex_protected AC converter for cmath.rect() (GH-154034)

2 weeks agoDocs: point `uu` module users to the `"uu"` encoding (#153657)
Ondřej Hošek [Sat, 18 Jul 2026 19:46:16 +0000 (21:46 +0200)] 
Docs: point `uu` module users to the `"uu"` encoding (#153657)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-153856: Add `os.RWF_NOSIGNAL` constant (#153858)
Benjamin Peterson [Sat, 18 Jul 2026 19:26:11 +0000 (12:26 -0700)] 
gh-153856: Add `os.RWF_NOSIGNAL` constant (#153858)

RWF_NOSIGNAL was added in Linux 6.18 to prevent pwritev2() from raising SIGPIPE when writing to disconnected pipes or sockets.

fixes gh-153856

2 weeks agogh-150663: Document that PyErr_SetRaisedException accepts null (#153046)
Andrii Hrimov [Sat, 18 Jul 2026 18:10:05 +0000 (20:10 +0200)] 
gh-150663: Document that PyErr_SetRaisedException accepts null (#153046)

2 weeks agogh-153395: Fix test_complexchar on narrow curses builds (GH-154005)
Serhiy Storchaka [Sat, 18 Jul 2026 16:33:03 +0000 (19:33 +0300)] 
gh-153395: Fix test_complexchar on narrow curses builds (GH-154005)

On a narrow build, complexchar() of a multibyte character raises
OverflowError, not ValueError.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-153568: Skip parser memo lookups that cannot match (#153571)
Pablo Galindo Salgado [Sat, 18 Jul 2026 16:12:38 +0000 (18:12 +0200)] 
gh-153568: Skip parser memo lookups that cannot match (#153571)

Each token now carries a small filter of the rule types present in its
memo list, so the common case of a miss no longer walks the list.

2 weeks agoAdd vfspath TypeError test (#153987)
Ajob Kustra [Sat, 18 Jul 2026 16:03:54 +0000 (18:03 +0200)] 
Add vfspath TypeError test (#153987)

typeerror with message test

2 weeks agoAdd test coverage to check execution of GetoptError.__str__ (#153941)
Manith Hettiarachchilage [Sat, 18 Jul 2026 15:00:13 +0000 (16:00 +0100)] 
Add test coverage to check execution of GetoptError.__str__ (#153941)

* Increase test coverage of getopt to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

* Add test coverage to check execution of GetoptError.__str__

2 weeks agogh-124111: Update Windows builds to Tcl/Tk 9.0.4 (GH-153901)
Zachary Ware [Sat, 18 Jul 2026 14:52:10 +0000 (16:52 +0200)] 
gh-124111: Update Windows builds to Tcl/Tk 9.0.4 (GH-153901)

2 weeks agogh-141004: Document unstable executable kind macros from `pyframe.h` (GH-143490)
Yashraj [Sat, 18 Jul 2026 14:50:40 +0000 (20:20 +0530)] 
gh-141004: Document unstable executable kind macros from `pyframe.h` (GH-143490)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks agogh-141004: Document remaining `PyCF_*` compiler flag macros (GH-153958)
Bartosz Sławecki [Sat, 18 Jul 2026 14:42:24 +0000 (16:42 +0200)] 
gh-141004: Document remaining `PyCF_*` compiler flag macros (GH-153958)

2 weeks agoFix parameter name of read_mime_types() in mimetypes docs (GH-153974)
Raúl Santos Quirós [Sat, 18 Jul 2026 14:29:45 +0000 (16:29 +0200)] 
Fix parameter name of read_mime_types() in mimetypes docs (GH-153974)

2 weeks agoImprove `getopt.getopt` and `getopt.gnu_getopt` test coverage (GH-153933)
Florian Freitag [Sat, 18 Jul 2026 13:50:28 +0000 (15:50 +0200)] 
Improve `getopt.getopt` and `getopt.gnu_getopt` test coverage (GH-153933)

2 weeks agogh-71896: Add a docs warning about trailing newlines ignored by `difflib.HtmlDiff...
Lenormand Julien [Sat, 18 Jul 2026 13:40:11 +0000 (15:40 +0200)] 
gh-71896: Add a docs warning about trailing newlines ignored by `difflib.HtmlDiff` (GH-153930)

2 weeks agoDocs: Fix typo in the pymanager command name (GH-153877)
Sam Katakouzinos [Sat, 18 Jul 2026 13:27:59 +0000 (23:27 +1000)] 
Docs: Fix typo in the pymanager command name (GH-153877)

2 weeks agogh-153568: Cache repeated identifiers while parsing (#153577)
Pablo Galindo Salgado [Sat, 18 Jul 2026 13:25:39 +0000 (15:25 +0200)] 
gh-153568: Cache repeated identifiers while parsing (#153577)

2 weeks agogh-153896: Deduplicate unhashable arguments in `typing.Literal` (GH-153914)
Massimiliano Bruni [Sat, 18 Jul 2026 13:16:03 +0000 (15:16 +0200)] 
gh-153896: Deduplicate unhashable arguments in `typing.Literal` (GH-153914)

2 weeks agogh-153908: Fix data race in `itertools.count.__repr__` (GH-153917)
John [Sat, 18 Jul 2026 13:01:51 +0000 (15:01 +0200)] 
gh-153908: Fix data race in `itertools.count.__repr__` (GH-153917)

2 weeks agogh-122102: Fix/improve docs of descriptor-related tools in `inspect` (GH-122104)
Jan Kaliszewski [Sat, 18 Jul 2026 13:01:31 +0000 (15:01 +0200)] 
gh-122102: Fix/improve docs of descriptor-related tools in `inspect` (GH-122104)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks agogh-153934: Correct documented paramemeter in `calendar.weekheader` from `n` to `width...
Marta [Sat, 18 Jul 2026 12:46:23 +0000 (14:46 +0200)] 
gh-153934: Correct documented paramemeter in `calendar.weekheader` from `n` to `width` (GH-153942)

2 weeks agogh-153903: Add a `ctypes` decorator for generating function pointers using annotation...
Peter Bierma [Sat, 18 Jul 2026 12:30:50 +0000 (08:30 -0400)] 
gh-153903: Add a `ctypes` decorator for generating function pointers using annotations (GH-153904)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks agogh-153926: Fix documented parameter name for `calendar.calendar` and `calendar.prcal...
Vyron Vasileiadis [Sat, 18 Jul 2026 12:29:23 +0000 (15:29 +0300)] 
gh-153926: Fix documented parameter name for `calendar.calendar` and `calendar.prcal` (#153927)

gh-153926: Fix documented parameter name for calendar.calendar and calendar.prcal

calendar.calendar() and calendar.prcal() are bound methods of the
module's TextCalendar instance, whose first parameter is named theyear,
but the documentation named it year, so the documented keyword raised
TypeError. Update the documentation to match the real signature, which
also matches the sibling month() and prmonth() functions.

2 weeks agogh-153236: Propagate lazy submodule import errors (#153237)
Pablo Galindo Salgado [Sat, 18 Jul 2026 12:28:43 +0000 (14:28 +0200)] 
gh-153236: Propagate lazy submodule import errors (#153237)

2 weeks agogh-152433: Windows: implement ``os.cpu_count()`` for UWP (GH-152479)
thexai [Sat, 18 Jul 2026 12:19:03 +0000 (14:19 +0200)] 
gh-152433: Windows: implement ``os.cpu_count()`` for UWP (GH-152479)

2 weeks agogh-149319: Make `asyncio` REPL respect `-I` and `-E` options (#149405)
Jonathan Dung [Sat, 18 Jul 2026 12:10:37 +0000 (20:10 +0800)] 
gh-149319: Make `asyncio` REPL respect `-I` and `-E` options (#149405)

2 weeks agoFix duplicated words in "What's new in Python 3.15" documentation (#153922)
Michael Newman [Sat, 18 Jul 2026 11:55:56 +0000 (07:55 -0400)] 
Fix duplicated words in "What's new in Python 3.15" documentation (#153922)

2 weeks agogh-153808: Replace obsolete 'condition list' verbiage with 'expression list' in eval...
palakkhinvasara [Sat, 18 Jul 2026 11:42:38 +0000 (17:12 +0530)] 
gh-153808: Replace obsolete 'condition list' verbiage with 'expression list' in eval() docs (GH-153811)

2 weeks agogh-151822: Colorize commands separately in the REPL (#151823)
Bartosz Sławecki [Sat, 18 Jul 2026 11:17:51 +0000 (13:17 +0200)] 
gh-151822: Colorize commands separately in the REPL (#151823)

2 weeks agoTest `calendar.February` deprecation (#153893)
vjabuilds [Sat, 18 Jul 2026 10:54:10 +0000 (12:54 +0200)] 
Test `calendar.February` deprecation (#153893)

Calendar related tests now check if both deprecated constants surface the proper warnings.

* extended `test_deprecation_warning` to check `constants.February` as well

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2 weeks agoFix punctuation in `Doc/library/concurrent.interpreters.rst` (GH-153894)
Raúl Santos Quirós [Sat, 18 Jul 2026 10:38:45 +0000 (12:38 +0200)] 
Fix punctuation in `Doc/library/concurrent.interpreters.rst` (GH-153894)

2 weeks agogh-153899: Fix documented parameter names for `filecmp.cmpfiles` (#153900)
Vyron Vasileiadis [Sat, 18 Jul 2026 10:34:50 +0000 (13:34 +0300)] 
gh-153899: Fix documented parameter names for `filecmp.cmpfiles` (#153900)

Update the `filecmp.cmpfiles()` docs to match its actual signature.

2 weeks agogh-147950: Additionally bind `yank-arg` to `M-_` in pyrepl (#147949)
Jonathan Oberländer [Sat, 18 Jul 2026 09:56:14 +0000 (11:56 +0200)] 
gh-147950: Additionally bind `yank-arg` to `M-_` in pyrepl (#147949)

2 weeks agoAdd versionadded tag to wave module getformat functions (#153897)
Elias Dorneles [Sat, 18 Jul 2026 09:30:40 +0000 (11:30 +0200)] 
Add versionadded tag to wave module getformat functions (#153897)

2 weeks agogh-104533: Add a dataclass-like decorator for `ctypes` structures (GH-153781)
Peter Bierma [Sat, 18 Jul 2026 08:48:16 +0000 (04:48 -0400)] 
gh-104533: Add a dataclass-like decorator for `ctypes` structures (GH-153781)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks agoFix duplicated words in the 'Coroutines and tasks' documentation (#153880)
Michael Newman [Sat, 18 Jul 2026 07:22:45 +0000 (03:22 -0400)] 
Fix duplicated words in the 'Coroutines and tasks' documentation (#153880)

2 weeks agogh-150583: Fix zstd compression level with digested ZstdDict (#150586)
Rogdham [Sat, 18 Jul 2026 04:15:39 +0000 (06:15 +0200)] 
gh-150583: Fix zstd compression level with digested ZstdDict (#150586)

2 weeks agogh-153872: Update macOS installer ReadMe files for 3.15. (#153875)
Ned Deily [Fri, 17 Jul 2026 23:43:38 +0000 (01:43 +0200)] 
gh-153872: Update macOS installer ReadMe files for 3.15. (#153875)

2 weeks agogh-124111: Update macOS installer to use Tcl/Tk 9.0.4. (#153868)
Ned Deily [Fri, 17 Jul 2026 22:14:40 +0000 (00:14 +0200)] 
gh-124111: Update macOS installer to use Tcl/Tk 9.0.4. (#153868)

2 weeks agoSkip curses tests when scr_dump()/is_keypad() are unavailable (GH-153866)
Serhiy Storchaka [Fri, 17 Jul 2026 21:59:27 +0000 (00:59 +0300)] 
Skip curses tests when scr_dump()/is_keypad() are unavailable (GH-153866)

test_scr_dump() and test_state_getters() errored instead of skipping on
builds without scr_dump(), is_keypad() or is_leaveok() (e.g. some narrow
ncurses, NetBSD, PDCurses).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-152023: Update macOS installer builds to SQLite 3.53.3 (#153867)
Ned Deily [Fri, 17 Jul 2026 21:48:26 +0000 (23:48 +0200)] 
gh-152023: Update macOS installer builds to SQLite 3.53.3 (#153867)

Enable median() and percentile() functions.

2 weeks agogh-153853: Fix parameter name of calendar.setfirstweekday() in docs (#153851)
Ibrahim Shaqqou [Fri, 17 Jul 2026 18:51:37 +0000 (14:51 -0400)] 
gh-153853: Fix parameter name of calendar.setfirstweekday() in docs (#153851)

2 weeks agogh-153844: Support AST input in symtable.symtable() (GH-153845)
Serhiy Storchaka [Fri, 17 Jul 2026 16:17:08 +0000 (19:17 +0300)] 
gh-153844: Support AST input in symtable.symtable() (GH-153845)

The builtin compile() accepts an AST object since Python 2.6, but
symtable.symtable() only accepted str and bytes, although the
implementation builds the symbol table from an AST anyway.  Accept an
AST object as well: convert it for the requested compile type, validate
it, honor future statements found in the tree, and build the symbol
table the same way the compiler does.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agoShut down leaked executors in `test_interpreter_pool` (#153780)
Stan Ulbrych [Fri, 17 Jul 2026 15:19:48 +0000 (17:19 +0200)] 
Shut down leaked executors in `test_interpreter_pool` (#153780)

2 weeks agogh-153395: Accept curses.complexchar in curses.ascii predicates and conversions ...
Serhiy Storchaka [Fri, 17 Jul 2026 08:10:21 +0000 (11:10 +0300)] 
gh-153395: Accept curses.complexchar in curses.ascii predicates and conversions (GH-153396)

The curses.ascii predicates and the ctrl() and unctrl() functions now accept
a curses.complexchar, classifying it by its single character.  ctrl() now
returns a non-ASCII argument unchanged instead of masking it to a control
character.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-153521: Support structured arguments in imaplib commands (GH-153522)
Serhiy Storchaka [Fri, 17 Jul 2026 08:06:45 +0000 (11:06 +0300)] 
gh-153521: Support structured arguments in imaplib commands (GH-153522)

Command methods now accept a structured *message_set* (an integer, or a
sequence of integers, (start, stop) ranges and range objects) and lists of
flags or other atoms in place of preformatted parenthesized strings.

The search, fetch, sort, thread and uid methods gain a keyword-only *params*
argument that substitutes and quotes '?' placeholders in their value-bearing
arguments, in the manner of sqlite3 parameter substitution.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2 weeks agogh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627)
Serhiy Storchaka [Fri, 17 Jul 2026 07:49:11 +0000 (10:49 +0300)] 
gh-85943: Fix BytesWarning in the struct format cache under -bb (GH-153627)

Normalize bytes format strings to str before using them as the cache key,
so that equal str and bytes formats no longer collide and get compared.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-152384: pixi-packages: use `flags` to define variants (#152385)
Lucas Colley [Fri, 17 Jul 2026 06:32:29 +0000 (08:32 +0200)] 
gh-152384: pixi-packages: use `flags` to define variants (#152385)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Isuru Fernando <isuruf@gmail.com>
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
2 weeks agogh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and Request...
tonghuaroot (童话) [Fri, 17 Jul 2026 05:54:46 +0000 (13:54 +0800)] 
gh-153404: Silently ignore non-decimal digits in robots.txt Crawl-delay and Request-rate (GH-153405)

str.isdigit() returned True for non-decimal Unicode digits such as
U+00B2 SUPERSCRIPT TWO, which int() then rejected with ValueError.

2 weeks agogh-149162: Use _Py_LOCK_DONT_DETACH in intern_common (gh-149164)
Sam Gross [Thu, 16 Jul 2026 17:37:00 +0000 (10:37 -0700)] 
gh-149162: Use _Py_LOCK_DONT_DETACH in intern_common (gh-149164)

Avoids potential deadlocks with C++ static local initialization in
extensions that call PyUnicode_InternFromString during one-time
initialization.

2 weeks agogh-153761: Fix asyncio sock_accept() dropping a connection when cancelled (#153762)
Timofei [Thu, 16 Jul 2026 06:05:25 +0000 (09:05 +0300)] 
gh-153761: Fix asyncio sock_accept() dropping a connection when cancelled (#153762)

2 weeks agogh-153630: Add `str.remove{prefix,suffix}()` to the `str` method summary (#153629)
darida12321 [Wed, 15 Jul 2026 18:05:17 +0000 (19:05 +0100)] 
gh-153630: Add `str.remove{prefix,suffix}()` to the `str` method summary (#153629)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-150077: Fix fileobj leak in `tarfile.TarFile.zstopen` on `BaseException` (GH-150080)
stevens [Wed, 15 Jul 2026 17:53:23 +0000 (01:53 +0800)] 
gh-150077: Fix fileobj leak in `tarfile.TarFile.zstopen` on `BaseException` (GH-150080)

This is one of those times when a bare `except` is appropriate.

2 weeks agogh-153550: Modernize the older prose sections of the tkinter documentation (GH-153647)
Serhiy Storchaka [Wed, 15 Jul 2026 16:19:00 +0000 (19:19 +0300)] 
gh-153550: Modernize the older prose sections of the tkinter documentation (GH-153647)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-150452: use PyMutex in socket module (#150453)
Thomas Kowalski [Wed, 15 Jul 2026 10:39:28 +0000 (12:39 +0200)] 
gh-150452: use PyMutex in socket module (#150453)

2 weeks agogh-150952: Fix incorrect sock_sendto docstring (#150953)
Timofei [Wed, 15 Jul 2026 08:44:30 +0000 (11:44 +0300)] 
gh-150952: Fix incorrect sock_sendto docstring (#150953)

2 weeks agogh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717)
Serhiy Storchaka [Wed, 15 Jul 2026 03:06:24 +0000 (06:06 +0300)] 
gh-153716: Harden ttk/tkinter GUI tests against display scaling (GH-153717)

Compute probe coordinates from each widget's own realized geometry
instead of hardcoding pixels such as (5, 5) or width - 5, which land on
a different element, or miss it entirely, at a high display scaling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agoRemove duplicate button_ok code in idlelib.textview (#153733)
Terry Jan Reedy [Wed, 15 Jul 2026 03:03:35 +0000 (23:03 -0400)] 
Remove duplicate button_ok code in idlelib.textview (#153733)

2 weeks agogh-153313: Run Emscripten PyRepl test in CI (#153701)
Hood Chatham [Wed, 15 Jul 2026 01:04:30 +0000 (03:04 +0200)] 
gh-153313: Run Emscripten PyRepl test in CI (#153701)

Adds the PyRepl test to the Github CI configuration for Emscripten.

2 weeks agogh-102960: Make frames weak-referenceable (#152838)
Łukasz Langa [Tue, 14 Jul 2026 23:58:14 +0000 (01:58 +0200)] 
gh-102960: Make frames weak-referenceable (#152838)

Add an explicit f_weakreflist field to the frame object, following the
same pattern as generators and coroutines, including free-threading-safe
weakref clearing via FT_CLEAR_WEAKREFS() in frame_dealloc().

Py_TPFLAGS_MANAGED_WEAKREF is not used because static builtin types
must not carry it (see init_static_type()) and the pre-header would
cost two extra words per frame instead of one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (#153696)
tonghuaroot (童话) [Tue, 14 Jul 2026 22:23:58 +0000 (06:23 +0800)] 
gh-153695: Fix sqlite3.Row.__hash__ with an unhashable value (#153696)

2 weeks agogh-152433: Allow posixmodule.c to build for Windows UWP (GH-152998)
thexai [Tue, 14 Jul 2026 21:35:59 +0000 (23:35 +0200)] 
gh-152433: Allow posixmodule.c to build for Windows UWP (GH-152998)

2 weeks agogh-148488: Clarify the company/tag separator in the py -V docs (GH-153427)
Serhiy Storchaka [Tue, 14 Jul 2026 21:32:20 +0000 (00:32 +0300)] 
gh-148488: Clarify the company/tag separator in the py -V docs (GH-153427)

2 weeks agogh-151126: Fix `PyErr_NoMemory` errors in `_ctypes.c` (#152720)
stevens [Tue, 14 Jul 2026 16:48:17 +0000 (00:48 +0800)] 
gh-151126: Fix `PyErr_NoMemory`  errors in `_ctypes.c`  (#152720)

2 weeks agogh-151912: Fix segfault in `type()` with NULL `tp_new` metaclasses (#151916)
Santhosh .I 🦇 [Tue, 14 Jul 2026 16:19:03 +0000 (21:49 +0530)] 
gh-151912: Fix segfault in `type()` with NULL `tp_new` metaclasses (#151916)

2 weeks agogh-151907: Avoid creating temporary objects in some list comprehensions (GH-151908)
Peter Bierma [Tue, 14 Jul 2026 15:06:29 +0000 (11:06 -0400)] 
gh-151907: Avoid creating temporary objects in some list comprehensions (GH-151908)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 weeks agogh-153313: Work around string decoding bug in emcc 6.0.2 (gh-153698)
Hood Chatham [Tue, 14 Jul 2026 14:21:39 +0000 (16:21 +0200)] 
gh-153313: Work around string decoding bug in emcc 6.0.2 (gh-153698)

2 weeks agogh-71086: Document negative offset support in struct.pack_into() and unpack_from...
Serhiy Storchaka [Tue, 14 Jul 2026 13:36:26 +0000 (16:36 +0300)] 
gh-71086: Document negative offset support in struct.pack_into() and unpack_from() (GH-153650)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-49555: Clarify imaplib modified UTF-7 docs and comments (GH-153485)
Serhiy Storchaka [Tue, 14 Jul 2026 12:47:32 +0000 (15:47 +0300)] 
gh-49555: Clarify imaplib modified UTF-7 docs and comments (GH-153485)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-98078: fix asyncio SSL transports not sending the fatal TLS alerts (#153620)
Kumar Aditya [Tue, 14 Jul 2026 08:15:54 +0000 (13:45 +0530)] 
gh-98078: fix asyncio SSL transports not sending the fatal TLS alerts (#153620)

2 weeks agogh-71019: document which objects connect_read_pipe/connect_write_pipe accept and...
Kumar Aditya [Tue, 14 Jul 2026 07:31:14 +0000 (13:01 +0530)] 
gh-71019: document which objects connect_read_pipe/connect_write_pipe accept and add tests (#153660)

2 weeks agogh-153658: Fix sqlite3 iterdump() for table names containing a single quote (#153659)
tonghuaroot (童话) [Tue, 14 Jul 2026 07:16:43 +0000 (15:16 +0800)] 
gh-153658: Fix sqlite3 iterdump() for table names containing a single quote (#153659)

2 weeks agogh-141510: Update `marshal` module comment with `frozendict` support (#153655)
sobolevn [Tue, 14 Jul 2026 06:50:45 +0000 (09:50 +0300)] 
gh-141510: Update `marshal` module comment with `frozendict` support (#153655)