Repository navigation
errors parameter missing in subprocess.call()/subprocess.check_call() #16538
Copy link
Copy link
Open
Description
typeshed/stdlib/subprocess.pyi
Lines 498 to 624 in 86d68f8
| # Same args as Popen.__init__ | |
| if sys.version_info >= (3, 11): | |
| # 3.11 adds "process_group" argument | |
| def call( | |
| args: _CMD, | |
| bufsize: int = -1, | |
| executable: StrOrBytesPath | None = None, | |
| stdin: _FILE = None, | |
| stdout: _FILE = None, | |
| stderr: _FILE = None, | |
| preexec_fn: Callable[[], object] | None = None, | |
| close_fds: bool = True, | |
| shell: bool = False, | |
| cwd: StrOrBytesPath | None = None, | |
| env: _ENV | None = None, | |
| universal_newlines: bool | None = None, | |
| startupinfo: Any = None, | |
| creationflags: int = 0, | |
| restore_signals: bool = True, | |
| start_new_session: bool = False, | |
| pass_fds: Collection[int] = (), | |
| *, | |
| encoding: str | None = None, | |
| timeout: float | None = None, | |
| text: bool | None = None, | |
| user: str | int | None = None, | |
| group: str | int | None = None, | |
| extra_groups: Iterable[str | int] | None = None, | |
| umask: int = -1, | |
| pipesize: int = -1, | |
| process_group: int | None = None, | |
| ) -> int: ... | |
| else: | |
| # 3.10 adds "pipesize" argument | |
| def call( | |
| args: _CMD, | |
| bufsize: int = -1, | |
| executable: StrOrBytesPath | None = None, | |
| stdin: _FILE = None, | |
| stdout: _FILE = None, | |
| stderr: _FILE = None, | |
| preexec_fn: Callable[[], object] | None = None, | |
| close_fds: bool = True, | |
| shell: bool = False, | |
| cwd: StrOrBytesPath | None = None, | |
| env: _ENV | None = None, | |
| universal_newlines: bool | None = None, | |
| startupinfo: Any = None, | |
| creationflags: int = 0, | |
| restore_signals: bool = True, | |
| start_new_session: bool = False, | |
| pass_fds: Collection[int] = (), | |
| *, | |
| encoding: str | None = None, | |
| timeout: float | None = None, | |
| text: bool | None = None, | |
| user: str | int | None = None, | |
| group: str | int | None = None, | |
| extra_groups: Iterable[str | int] | None = None, | |
| umask: int = -1, | |
| pipesize: int = -1, | |
| ) -> int: ... | |
| # Same args as Popen.__init__ | |
| if sys.version_info >= (3, 11): | |
| # 3.11 adds "process_group" argument | |
| def check_call( | |
| args: _CMD, | |
| bufsize: int = -1, | |
| executable: StrOrBytesPath | None = None, | |
| stdin: _FILE = None, | |
| stdout: _FILE = None, | |
| stderr: _FILE = None, | |
| preexec_fn: Callable[[], object] | None = None, | |
| close_fds: bool = True, | |
| shell: bool = False, | |
| cwd: StrOrBytesPath | None = None, | |
| env: _ENV | None = None, | |
| universal_newlines: bool | None = None, | |
| startupinfo: Any = None, | |
| creationflags: int = 0, | |
| restore_signals: bool = True, | |
| start_new_session: bool = False, | |
| pass_fds: Collection[int] = (), | |
| timeout: float | None = None, | |
| *, | |
| encoding: str | None = None, | |
| text: bool | None = None, | |
| user: str | int | None = None, | |
| group: str | int | None = None, | |
| extra_groups: Iterable[str | int] | None = None, | |
| umask: int = -1, | |
| pipesize: int = -1, | |
| process_group: int | None = None, | |
| ) -> int: ... | |
| else: | |
| # 3.10 adds "pipesize" argument | |
| def check_call( | |
| args: _CMD, | |
| bufsize: int = -1, | |
| executable: StrOrBytesPath | None = None, | |
| stdin: _FILE = None, | |
| stdout: _FILE = None, | |
| stderr: _FILE = None, | |
| preexec_fn: Callable[[], object] | None = None, | |
| close_fds: bool = True, | |
| shell: bool = False, | |
| cwd: StrOrBytesPath | None = None, | |
| env: _ENV | None = None, | |
| universal_newlines: bool | None = None, | |
| startupinfo: Any = None, | |
| creationflags: int = 0, | |
| restore_signals: bool = True, | |
| start_new_session: bool = False, | |
| pass_fds: Collection[int] = (), | |
| timeout: float | None = None, | |
| *, | |
| encoding: str | None = None, | |
| text: bool | None = None, | |
| user: str | int | None = None, | |
| group: str | int | None = None, | |
| extra_groups: Iterable[str | int] | None = None, | |
| umask: int = -1, | |
| pipesize: int = -1, | |
| ) -> int: ... |
According to the Python documentation and the comments within the stub file, the functions subprocess.call() and subprocess.check_call() should share the same parameters as subprocess.Popen except timeout. However, the errors parameter found in the Popen interface is missing in subprocess.call and subprocess.check_call.
typeshed/stdlib/subprocess.pyi
Line 1065 in 86d68f8
| errors: str | None = None, |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity