Skip to content

[pull] main from python:main - #1541

Merged
pull[bot] merged 6 commits into
tj-python:mainfrom
python:main
Sep 30, 2026
Merged

pull[bot] merged 6 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

vstinner and others added 6 commits September 30, 2026 02:47
Replace _PyUnicodeWriter_Update() with _PyUnicodeWriter_SetBuffer().

Add _PyUnicodeWriter_SetReadOnly() helper function.

Add _PyUnicodeWriter_FinishWithSize() for PyUnicode_DecodeUTF7Stateful().
Fix _PyUnicodeWriter_WriteLatin1String() when the writer buffer kind
is UCS-2 or UCS-4.
…58467)

Remove special case for int in PyUnicode_Format(). Instead, reuse
PyUnicodeWriter_WriteStr() and PyUnicodeWriter_WriteRepr() in
PyUnicode_Format().

Add PyUnicode_Format() tests on integer formats.
…on (#158466)

Add assertion to _PyUnicodeWriter_Prepare() to check that length is
not negative.

Add some assertions to check that _PyUnicodeWriter_Prepare() is
called with len >= 1.
Formatting a float or complex with a precision within about 1000 of
INT_MAX could crash or produce incorrect output.
PyOS_double_to_string() now raises ValueError("precision too big") for
such precisions, as the format string parsers already do for
precisions above INT_MAX.

The limit applies regardless of presentation type or value, so a few
calls that previously succeeded (inf, nan, or 'g' with such a
precision) now raise as well.
@pull pull Bot locked and limited conversation to collaborators Sep 30, 2026
@pull pull Bot added the ⤵️ pull label Sep 30, 2026
@pull
pull Bot merged commit b7b4f3e into tj-python:main Sep 30, 2026
14 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants