Releases: netinvent/command_runner
Ha ha ha ha, stayin' alive (and again) !
Ha ha ha ha, stayin' alive !
This is the thirdmaintenance release for the heartbeat series of command_runner.
Only a couple of small changes / refactoring was made for this release, and a fix for a long lasting double log issue when debug loglevel was used.
Manually tested on Python 2.7 :)
Fixes
- Fix double debug stdout logging
Misc
- Refactor process priority and io priority code
- Avoid calling multiple times os.name()
- Added priority and heartbeat tests
- Deduplicate heartbeat code
- Improve priority setting logs
Heartbeat - Alive, even for python 2.7
This is the second maintenance release for the heartbeat series of command_runner, and comes quickly after v1.7.1 as it fixes some corner cases when (still) using Python 2.7.
Fixes
- All interruption exceptions (TimeoutExpired, KbdInterrupt, StopOnInterrupt, Interrupt) didn't properly call super() for earlier python versions
Note
If you run Python 3.3+, there's no need to install this update, but you still can ;)
Heartbeat - Alive
This is a maintenance release to address some CI issues
- Python 3.13 was added and Python 3.7 was removed from the python test matrix.
- Tests now also run on MacOS.
- A lot of spelling fixes
There's no need to update to this version explicitly
Thanks to @yarikoptic for his help for macos and advices on codespell
Heartbeat
This release adds an optional heartbeat
argument that takes a defined number of seconds after which command_runner logs a line.
This allows, by reading logs, to precisely know that a process is still running.:
Also, TimeoutExpired
and StopOnInterrupt
now only log the last 1000 characters of command output.
Something in, something out
This release adds a new parameter to customize stdin.
Features
- New
stdin
parameter to change default behavior of Popen
Leave the queues alone
This release adds a new parameter to allow keeping stdout/stderr queues after command_runner
has finished.
Features
- New
no_close_queues
parameter to leave stdout/stderr queues open for later usage by parent functions - Updated ofunctions.threading implementation to v2.1.0
- Added python 3.12 and pypy 3.10 to test matrix
- poller/monitor tests now have less rounds in pypy python implementation (takes too long on Github actions)
Fixes
- Various minor linter fixes
Let's get your priorities right
This release is a quick fix for priority settings
Features
- Priority settings are now case insensitive
Fixes
- IO priority was set with process priority values instead of IO priority values
- Failing to set process/IO priority because of insufficient permissions now shows a proper warning message in logs
command and conquer them all, nod if you're happy
This release mainly adds process priority settings and a couple of shorthands for other functionality.
Features
- New silent parameter disabling all logger calls except of logging.DEBUG levels
- New on_exit parameter that takes a callback function as argument, convenient when used in a thread
- valid_exit_codes now accept boolean True which means "all" exit codes
- New priority parameter which sets cpu bound process priority to 'low', 'normal' or 'high'
- New io_priority parameter wihhc sets io bound process priority to 'low', 'normal' or 'high'
Fixes
- Fix output capture failure should be an error log instead of debug
- Fix no longer show debug logging for stdout or stderr when empty
command and conquer them all, don't nod
This is a hotfix release for v1.4.0 that mainly targets an encoding issue.
Fixes
command_runner
- Fixes encoding was not honored unless explicitly disabled
- Use standard ping arguments in tests
elevate
- Use
sleep
instead of ping sleep emulation on Linux
Misc
- Update github actions to v3
- Removed python 3.5 and 3.6 from linux test matrix since Github won't provide them anymore