Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Negative run-time reported bysubprocess.run'sTimeoutExpired exception when settingtimeout=0 #133089

Closed
Labels
3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-subprocessSubprocess issues.type-bugAn unexpected behavior, bug, or error
@vadimkantorov

Description

@vadimkantorov

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

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibPython modules in the Lib dirtopic-subprocessSubprocess issues.type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp