Skip to content

fix: apply force_to_bytes to readline result in non-term_mode path#2707

Merged
peace-maker merged 3 commits into
Gallopsled:stablefrom
danstam:fix/readline-rstrip-bytes
Apr 7, 2026
Merged

fix: apply force_to_bytes to readline result in non-term_mode path#2707
peace-maker merged 3 commits into
Gallopsled:stablefrom
danstam:fix/readline-rstrip-bytes

Conversation

@danstam

@danstam danstam commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

readline() calls .rstrip(b'\n') on the result of sys.stdin.readline(), which returns a str when sys.stdin.buffer is unavailable, causing a TypeError. Applied the existing force_to_bytes() helper to ensure the result is always bytes before .rstrip() is called.

Fixes #2584

@danstam

danstam commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

The CI failure appears to be pre-existing and unrelated to this change

@peace-maker peace-maker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is cleaner. @Arusekk ?

@peace-maker
peace-maker enabled auto-merge (squash) April 5, 2026 20:43
@peace-maker
peace-maker disabled auto-merge April 7, 2026 09:28
@peace-maker
peace-maker merged commit e551b4a into Gallopsled:stable Apr 7, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants