Skip to content

Commit d09a536

Browse files
committed
Release 21.3: Improve ionice integration (support busybox)
1 parent 9388878 commit d09a536

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

Diff for: CHANGELOG.rst

+16
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,22 @@ to `semantic versioning`_.
1111
.. _Keep a Changelog: http://keepachangelog.com/
1212
.. _semantic versioning: http://semver.org/
1313

14+
`Release 21.3`_ (2018-11-17)
15+
----------------------------
16+
17+
Merged pull request `#16`_ that changes the ``ionice`` integration to accept
18+
the strings '1', '2' and '3' in addition to 'idle', 'best-effort' and
19+
'realtime' because ``busybox`` doesn't support the verbose strings.
20+
21+
It's still up to the caller to pick the right kind of value and I'm a bit
22+
conflicted about that because it's creating a leaky abstraction. I may at a
23+
later point decide to add automatic translation from the verbose labels to the
24+
numeric codes (which seem to be the lowest common denominator that's always
25+
supported) ...
26+
27+
.. _Release 21.3: https://github.com/xolox/python-executor/compare/21.2...21.3
28+
.. _#16: https://github.com/xolox/python-executor/pull/16
29+
1430
`Release 21.2`_ (2018-10-11)
1531
----------------------------
1632

Diff for: executor/__init__.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Programmer friendly subprocess wrapper.
44
#
55
# Author: Peter Odding <peter@peterodding.com>
6-
# Last Change: October 30, 2018
6+
# Last Change: November 17, 2018
77
# URL: https://executor.readthedocs.io
88

99
"""
@@ -68,7 +68,7 @@
6868
from executor.process import ControllableProcess
6969

7070
# Semi-standard module versioning.
71-
__version__ = '21.2'
71+
__version__ = '21.3'
7272

7373
# Initialize a logger.
7474
logger = logging.getLogger(__name__)
@@ -2116,6 +2116,13 @@ def validate_ionice_class(value):
21162116
'best-effort', or 'realtime').
21172117
:raises: :exc:`~exceptions.ValueError` when the given value isn't one of
21182118
the strings mentioned above.
2119+
2120+
The strings 'idle', 'best-effort' and 'realtime' are preferred for
2121+
readability but not supported in minimalistic environments like busybox
2122+
which only support the values '1', '2' and '3' (refer to `#16`_). It's up
2123+
to the caller to choose the correct value, no translation is done.
2124+
2125+
.. _#16: https://github.com/xolox/python-executor/pull/16
21192126
"""
21202127
expected = ('idle', 'best-effort', 'realtime', '1', '2', '3')
21212128
if value not in expected:

0 commit comments

Comments
 (0)