Negative run-time reported by subprocess.run
's TimeoutExpired
exception when setting timeout=0
#133089
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
stdlib
Python modules in the Lib dir
topic-subprocess
Subprocess issues.
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
This is quite unexpected that the measured run-time can be negative
In general, it's unclear in the docs what behavior should have
timeout=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
Linked PRs
subprocess.run
's behavior is same with 'timeout=None' when the timeout is zero #133103The text was updated successfully, but these errors were encountered: