Command-runner

Latest version: v1.7.0

Safety actively analyzes 682416 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.3.0

Features

- Adds the possibility to redirect stdout/stderr to null with `stdout=False` or `stderr=False` arguments

Misc

- Add python 3.10 to the test matrix

1.2.1

Fixes

- Timeout race condition with pypy 3.7 (!) where sometimes exit code wasn't -254
- Try to use signal.SIGTERM (if exists) to kill a process instead of os API that uses PID in order to prevent possible collision when process is already dead and another process with the same PID exists

Misc

- Unit tests are more verbose
- Black formatter is now enforced
- Timeout tests are less strict to cope with some platform delays

1.2.0

Features

- Added a new capture method (monitor)
- There are now two distinct methods to capture output
- Spawning a thread to enforce timeouts, and using process.communicate() (monitor method)
- Spawning a thread to readlines from stdout pipe to an output queue, and reading from that output queue while enforcing timeouts (polller method)
- On the fly output (live_output=True) option is now explicit (uses poller method only)
- Returns partial stdout output when timeouts are reached
- Returns partial stdout output when CTRL+C signal is received (only with poller method)

Fixes

- CRITICAL: Fixed rare annoying but where output wasn't complete
- Use process signals in favor of direct os.kill API to avoid potential race conditions when PID is reused too fast
- Allow full process subtree killing on Windows & Linux, hence not blocking multiple commands like echo "test" && sleep 100 && echo "done"
- Windows does not maintain an explicit process subtree, so we runtime walk processes to establish the child processes to kill. Obviously, orphaned processes cannot be killed that way.-

Misc

- Adds a default 16K stdout buffer
- Default command execution timeout is 3600s (1 hour)
- Highly improved tests
- All tests are done for both capture methods
- Timeout tests are more accurate
- Added missing encoding tests
- 2500 rounds of file reading and comparaison are added to detect rare queue read misses

0.7.0

Features

- Added threaded pipe reader (poller) in order to enforce timeouts on Windows GUI apps

0.6.4

Fixes

- Fixed possible encoding issue with Python < 3.4 and powershell containing non unicode output
- More packaging fixes

0.6.3

Fixes

- Packaging fixes for Python 2.7

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.