Skip to content

[3.14] gh-159739: Respect readline limits after a short read (GH-159974) - #160483

Merged
JelleZijlstra merged 1 commit into
python:3.14from
jelle-openai:jelle/codex/backport-159974-3.14
Oct 24, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.14from
jelle-openai:jelle/codex/backport-159974-3.14

Conversation

@jelle-openai

@jelle-openai jelle-openai commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Backport to 3.15 and 3.14. Both branches use a bytearray instead of PyBytesWriter; the test lives in Lib/test/test_io.py on 3.14.
(cherry picked from commit 87eaef1)

Co-authored-by: Jelle Zijlstra jelle@openai.com

Backport of #159974 to 3.14.

Use the size of 3.14's bytearray to compute how many bytes remain. Move the short-read regression into Lib/test/test_io.py.

Ran test_io on a free-threaded 3.14 build, including the C and Python short-read regression.

…ythonGH-159974)

Backport to 3.15 and 3.14. Both branches use a bytearray instead of PyBytesWriter; the test lives in Lib/test/test_io.py on 3.14.
(cherry picked from commit 87eaef1)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
@JelleZijlstra
JelleZijlstra marked this pull request as ready for review October 23, 2026 20:34
@JelleZijlstra
JelleZijlstra merged commit 105c641 into python:3.14 Oct 24, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants