Skip to content

Releases: netinvent/command_runner

command & conquer the standard out/err

14 Oct 13:35
Compare
Choose a tag to compare

Features

This release adds the possibility to disable stdout/stderr capture by adding stdout=False and/or stderr=False parameters on top of the existing file and/or pipe parameters.

Misc

Add python 3.10 to the test matrix

command (threads) & conquer

09 Sep 16:45
Compare
Choose a tag to compare

Minor release

This release adresses some race conditions that happen only under some circonstances with pypy 3.7, where the timeout check thread hasn't yet returned but the process monitor already stops because the process to monitor has finished.
In that case, timeouts were enforced, but the exit code was 137 (corresponding to the exit code of a killed process).

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

  • Tests are now more verbose
  • Black formatter is now enforced
  • Timeout tests are less strict for some platform delays

command (runner) & conquer

07 Sep 17:11
Compare
Choose a tag to compare

Major release v1.2.0

This release is a major refactor of the stdout capture methods employed within command_runner.
So we jump from v0.7.0 to v1.2.0 since we have a major rework, and minor fixes too.
Since we include a critical fix, everybody is encouraged to migrate to this version.

Critical fixes

  • There was a quite rare but annoying issue where the process finished, but there was still output to read in the pipe reader queue, rendering partial outputs. This has been fully refactored, and a test with 2500 rounds of file reading was added

Features

  • 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)

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

Fixes

  • 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.-

The windows GUI

02 Jul 09:28
22b3024
Compare
Choose a tag to compare

This is a bugfix release that adresses a problem where Windows GUI applications console output cannot be read properly, preventing the timeout to work, since we're stuck reading.
We introduced a threaded pipe reader, which may be stopped regardless of read state.

Keep it working more

03 Jun 13:06
Compare
Choose a tag to compare

This is a quick maintenance release that mainly streamlines packaging, and also fixes a possible encoding issue where command_runner may fail under Python <=3.4 when running executables within Powershell containing non unicode output.

keep_it_working

15 Mar 15:29
Compare
Choose a tag to compare

This is a simple release that fixes the setup.py issue with Python 2.7.

make_it_work

22 Feb 11:29
Compare
Choose a tag to compare

This is essentially a release to address various testing issues on github actions, adding windows test matrix and expanding tests in general.
The elevation library still needs proper tests written for it.

There's still a small bugfix that made it into this release:

  • Added a check to prevent using command_runner option windows_no_window below Python 3.7 or when not running on windows

make_it_simple

22 Dec 11:27
Compare
Choose a tag to compare

This is the first public release of command_runner and elevate.