gh-154176: Fix locale.strxfrm() crash on DragonFly BSD (GH-154177)
Query the result size with a real one-element buffer instead of
wcsxfrm(NULL, s, 0): DragonFly BSD's wcsxfrm() crashes when the
destination is NULL or the size is 0.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
gh-62534: Document that three-argument type() does not call __prepare__ (GH-154028)
The three-argument form of type() skips the metaclass __prepare__
method, which is called by the class statement machinery rather than
by the metaclass call itself. Say so in the type() entry and point to
types.new_class() for dynamic class creation with the appropriate
metaclass, as directed in the issue thread.
gh-139806: Mention pickle error changes in What's New in 3.14 (GH-154020)
The gh-122311 changes made pickle.dump() and pickle.dumps() raise
PicklingError for some failures that previously raised AttributeError,
ImportError, ValueError or UnicodeEncodeError, depending on the
implementation.
Add an entry about this in the "Porting to Python 3.14" section.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
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>
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.
gh-153906: Modernize pydoc HTML output (GH-153909)
Follow-up of the HTML5 migration in bpo-10716: replace the layout
tables, the /<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>
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.
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>