Skip to content

Fix readline_channel crash and None return on default timeout#2622

Open
archy-rock3t-cloud wants to merge 2 commits into
kubernetes-client:masterfrom
sophotechlabs:fix/ws-readline-default-timeout
Open

Fix readline_channel crash and None return on default timeout#2622
archy-rock3t-cloud wants to merge 2 commits into
kubernetes-client:masterfrom
sophotechlabs:fix/ws-readline-default-timeout

Conversation

@archy-rock3t-cloud

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

With the default timeout, readline_channel converted None to float("inf") and crashed in update() when it reached select.poll().poll(). An infinite timeout now maps to a blocking poll, and an expired finite timeout returns '' or b'' like the other read methods instead of None.

Which issue(s) this PR fixes:

Fixes #2621

Does this PR introduce a user-facing change?

Fix readline_channel, readline_stdout and readline_stderr crashing with OverflowError when using the default timeout, and returning None when a timeout expires.

Signed-off-by: Artem Muterko <artem@sopho.tech>
Signed-off-by: Artem Muterko <artem@sopho.tech>
@kubernetes-prow kubernetes-prow Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 3, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: archy-rock3t-cloud
Once this PR has been reviewed and has the lgtm label, please assign yliaog for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot requested review from fabianvf and yliaog July 3, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

readline_channel crashes with OverflowError when using the default timeout

1 participant