Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Bug report
Bug description:
importsubprocesssubprocess.run(['echo','hi'],timeout=0)# subprocess.TimeoutExpired: Command '['echo', 'hi']' timed out after -0.00010189996100962162 seconds# subprocess.TimeoutExpired: Command '['echo', 'hi']' timed out after -4.819990135729313e-05 seconds
This is quite unexpected that the measured run-time can be negative
In general, it's unclear in the docs what behavior should havetimeout=0
. I would propose that it should disable timeout control, and should be equivalent totimeout=None
.
But in any case, negative run-times are quite strange :)
CPython versions tested on:
3.12
Operating systems tested on:
WSLv1+Ubuntu24.04