What happened (please include outputs or screenshots):
readline_channel (and readline_stdout/readline_stderr) default to timeout=None, which is converted to float("inf"). With no buffered line it calls update(), which multiplies the timeout by 1000 and passes it to select.poll().poll(). poll expects integer milliseconds and raises on infinity:
OverflowError: timestamp out of range for platform time_t
When a finite timeout expires, the method also falls through and returns None instead of the empty string/bytes the other read methods return.
What you expected to happen:
The default (no timeout) blocks until a line is available without crashing, and an expired timeout returns '' (or b'' in binary mode).
How to reproduce it (as minimally and precisely as possible):
import select
select.poll().poll(float("inf")) # OverflowError
Environment:
- Kubernetes version (
kubectl version): n/a (client-side)
- OS (e.g., MacOS 10.13.6): any platform where select.poll exists (Linux, macOS)
- Python version (
python --version): 3.12
- Python client version (
pip list | grep kubernetes): master
What happened (please include outputs or screenshots):
readline_channel(andreadline_stdout/readline_stderr) default totimeout=None, which is converted tofloat("inf"). With no buffered line it callsupdate(), which multiplies the timeout by 1000 and passes it toselect.poll().poll(). poll expects integer milliseconds and raises on infinity:When a finite timeout expires, the method also falls through and returns None instead of the empty string/bytes the other read methods return.
What you expected to happen:
The default (no timeout) blocks until a line is available without crashing, and an expired timeout returns '' (or b'' in binary mode).
How to reproduce it (as minimally and precisely as possible):
Environment:
kubectl version): n/a (client-side)python --version): 3.12pip list | grep kubernetes): master