Codebase list python-procrunner / 41313de
Merge branch 'flag-forwarding' Markus Gerstel 2 years ago
4 changed file(s) with 19 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
00 [bumpversion]
1 current_version = 2.3.2
1 current_version = 2.3.3
22 commit = True
33 tag = True
44
1414 (previously deprecated in `#62 <https://github.com/DiamondLightSource/python-procrunner/pull/62>`_)
1515 * The run() function no longer accepts a 'debug' argument
1616 (previously deprecated in `#63 <https://github.com/DiamondLightSource/python-procrunner/pull/63>`_)
17
18 2.3.3 (2022-03-23)
19 ------------------
20 * Allow specifying 'preexec_fn' and 'creationflags' keywords, which will be passed through to
21 the subprocess call
1722
1823 2.3.2 (2022-01-28)
1924 ------------------
00 [metadata]
11 name = procrunner
22 description = Versatile utility function to run external processes
3 version = 2.3.2
3 version = 2.3.3
44 author = Diamond Light Source - Scientific Software et al.
55 author_email = scientificsoftware@diamond.ac.uk
66 classifiers =
4545 # stderr=b'/bin/ls: cannot access /some/path/containing spaces: No such file or directory\n'
4646 # )
4747
48 __version__ = "2.3.2"
48 __version__ = "2.3.3"
4949
5050 logger = logging.getLogger("procrunner")
5151 logger.addHandler(logging.NullHandler())
303303 command,
304304 *,
305305 timeout: Optional[float] = None,
306 stdin: Optional[Union[bytes, int]] = None,
307 print_stdout: bool = True,
308 print_stderr: bool = True,
306 callback_stderr: Optional[Callable] = None,
309307 callback_stdout: Optional[Callable] = None,
310 callback_stderr: Optional[Callable] = None,
308 creationflags: int = 0,
311309 environment: Optional[dict[str, str]] = None,
312310 environment_override: Optional[dict[str, str]] = None,
311 preexec_fn: Optional[Callable] = None,
312 print_stderr: bool = True,
313 print_stdout: bool = True,
314 raise_timeout_exception: Any = ...,
315 stdin: Optional[Union[bytes, int]] = None,
313316 win32resolve: bool = True,
314317 working_directory: Optional[str] = None,
315 raise_timeout_exception: Any = ...,
316318 ) -> subprocess.CompletedProcess:
317319 """
318320 Run an external process.
330332 stdout line.
331333 :param callback_stderr: Optional function which is called for each
332334 stderr line.
335 :param creationflags: flags that will be passed to subprocess call
333336 :param dict environment: The full execution environment for the command.
334337 :param dict environment_override: Change environment variables from the
335338 current values for command execution.
339 :param preexec_fn: pre-execution function, will be passed to subprocess call
336340 :param boolean win32resolve: If on Windows, find the appropriate executable
337341 first. This allows running of .bat, .cmd, etc.
338342 files without explicitly specifying their
398402 stdin=stdin_pipe,
399403 stdout=subprocess.PIPE,
400404 stderr=subprocess.PIPE,
405 creationflags=creationflags,
406 preexec_fn=preexec_fn,
401407 )
402408
403409 thread_pipe_pool = []