@@ -86,7 +86,7 @@ API: Subprocess
8686 .. versionchanged :: 2.1.0 Use typed NamedTuple as result
8787 .. versionchanged :: 2.9.3 Expose cwd and env as optional keyword-only arguments
8888
89- .. py :method :: execute(command, verbose = False , timeout = 1 * 60 * 60 , * , log_mask_re = None , ** kwargs)
89+ .. py :method :: execute(command, verbose = False , timeout = 1 * 60 * 60 , * , log_mask_re = None , stdin = None , ** kwargs)
9090
9191 Execute command and wait for return code.
9292
@@ -99,6 +99,8 @@ API: Subprocess
9999 :param log_mask_re: regex lookup rule to mask command for logger.
100100 all MATCHED groups will be replaced by '<*masked *>'
101101 :type log_mask_re: ``typing.Optional[str] ``
102+ :param stdin: pass STDIN text to the process
103+ :type stdin: ``typing.Union[bytes, str, bytearray, None] ``
102104 :rtype: ExecResult
103105 :raises ExecHelperTimeoutError: Timeout exceeded
104106
@@ -108,7 +110,7 @@ API: Subprocess
108110 .. versionchanged :: 1.2.0 default timeout 1 hour
109111 .. versionchanged :: 1.2.0 stdin data
110112
111- .. py :method :: __call__ (command, verbose = False , timeout = 1 * 60 * 60 , * , log_mask_re = None , ** kwargs)
113+ .. py :method :: __call__ (command, verbose = False , timeout = 1 * 60 * 60 , * , log_mask_re = None , stdin = None , ** kwargs)
112114
113115 Execute command and wait for return code.
114116
@@ -121,13 +123,15 @@ API: Subprocess
121123 :param log_mask_re: regex lookup rule to mask command for logger.
122124 all MATCHED groups will be replaced by '<*masked *>'
123125 :type log_mask_re: ``typing.Optional[str] ``
126+ :param stdin: pass STDIN text to the process
127+ :type stdin: ``typing.Union[bytes, str, bytearray, None] ``
124128 :rtype: ExecResult
125129 :raises ExecHelperTimeoutError: Timeout exceeded
126130
127131 .. note :: stdin channel is closed after the input processing
128132 .. versionadded :: 2.9.4
129133
130- .. py :method :: check_call(command, verbose = False , timeout = 1 * 60 * 60 , error_info = None , expected = (0 ,), raise_on_err = True , * , log_mask_re = None , exception_class = CalledProcessError, ** kwargs)
134+ .. py :method :: check_call(command, verbose = False , timeout = 1 * 60 * 60 , error_info = None , expected = (0 ,), raise_on_err = True , * , log_mask_re = None , stdin = None , exception_class = CalledProcessError, ** kwargs)
131135
132136 Execute command and check for return code.
133137
@@ -146,6 +150,8 @@ API: Subprocess
146150 :param log_mask_re: regex lookup rule to mask command for logger.
147151 all MATCHED groups will be replaced by '<*masked *>'
148152 :type log_mask_re: ``typing.Optional[str] ``
153+ :param stdin: pass STDIN text to the process
154+ :type stdin: ``typing.Union[bytes, str, bytearray, None] ``
149155 :param exception_class: Exception class for errors. Subclass of CalledProcessError is mandatory.
150156 :type exception_class: typing.Type[CalledProcessError]
151157 :rtype: ExecResult
@@ -157,7 +163,7 @@ API: Subprocess
157163 .. versionchanged :: 2.9.3 Exception class can be substituted
158164 .. versionchanged :: 2.11.0 Expected is not optional, defaults os dependent
159165
160- .. py :method :: check_stderr(command, verbose = False , timeout = 1 * 60 * 60 , error_info = None , raise_on_err = True , * , log_mask_re = None , expected = (0 ,), exception_class = CalledProcessError, ** kwargs)
166+ .. py :method :: check_stderr(command, verbose = False , timeout = 1 * 60 * 60 , error_info = None , raise_on_err = True , * , expected = (0 ,), log_mask_re = None , stdin = None , exception_class = CalledProcessError, ** kwargs)
161167
162168 Execute command expecting return code 0 and empty STDERR.
163169
@@ -176,6 +182,8 @@ API: Subprocess
176182 :param log_mask_re: regex lookup rule to mask command for logger.
177183 all MATCHED groups will be replaced by '<*masked *>'
178184 :type log_mask_re: ``typing.Optional[str] ``
185+ :param stdin: pass STDIN text to the process
186+ :type stdin: ``typing.Union[bytes, str, bytearray, None] ``
179187 :param exception_class: Exception class for errors. Subclass of CalledProcessError is mandatory.
180188 :type exception_class: typing.Type[CalledProcessError]
181189 :rtype: ExecResult
0 commit comments