-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make shell_tools smarter #4394
Comments
I can take care of this one. |
AFAICT, the functionality in For sake of digestible reviews, the change will be split to several PRs:
|
Add shell_tools.run, a thin wrapper to subprocess.run with a few extra arguments for showing the executed commands. It also supplies updated default values for subprocess.run to approximate behavior of run_cmd and run_shell functions. The purpose of this function is to replace the run_cmd and run_shell functions in the shell_tools module. Partially implements #4394
Stop using shell_tools.run_shell which is slated for removal. Partially implements #4394
Stop using `shell_tools.run_cmd()` which is slated for removal. Get command output with `shell_tools.run()` instead. Update `output_of()` to receive command-line arguments in a list or string in order to have the same interface as `run()`. Remove filtering of the optional None arguments, leave it up to callers to take care of that. Partially implements #4394
Stop using shell_tools.run_cmd which is slated for removal. Partially implements #4394
Remove obsolete functions `shell_tools.run_cmd` and `shell_tools.run_shell`; as they are now replaced by `shell_tools.run`. Remove related classes and auxiliary functions `CommandOutput`, `TeeCapture`, `_async_forward`, `_async_wait_for_process`. This completes and closes #4394
Add shell_tools.run, a thin wrapper to subprocess.run with a few extra arguments for showing the executed commands. It also supplies updated default values for subprocess.run to approximate behavior of run_cmd and run_shell functions. The purpose of this function is to replace the run_cmd and run_shell functions in the shell_tools module. Partially implements quantumlib#4394
Stop using shell_tools.run_shell which is slated for removal. Partially implements quantumlib#4394
…#5541) Stop using `shell_tools.run_cmd()` which is slated for removal. Get command output with `shell_tools.run()` instead. Update `output_of()` to receive command-line arguments in a list or string in order to have the same interface as `run()`. Remove filtering of the optional None arguments, leave it up to callers to take care of that. Partially implements quantumlib#4394
Stop using shell_tools.run_cmd which is slated for removal. Partially implements quantumlib#4394
Remove obsolete functions `shell_tools.run_cmd` and `shell_tools.run_shell`; as they are now replaced by `shell_tools.run`. Remove related classes and auxiliary functions `CommandOutput`, `TeeCapture`, `_async_forward`, `_async_wait_for_process`. This completes and closes quantumlib#4394
Description of the issue
There are two main issues with shell_tools:
The text was updated successfully, but these errors were encountered: