Bump version: 0.6.1 → 0.7.0
Markus Gerstel
5 years ago
0 | 0 |
=======
|
1 | 1 |
History
|
2 | 2 |
=======
|
|
3 |
|
|
4 |
0.7.0 (2018-05-13)
|
|
5 |
------------------
|
|
6 |
|
|
7 |
* Unicode fixes. Fix crash on invalid UTF-8 input.
|
|
8 |
* Clarify that stdout/stderr values are returned as bytestrings.
|
|
9 |
* Callbacks receive the data decoded as UTF-8 unicode strings
|
|
10 |
with unknown characters replaced by \ufffd (unicode replacement
|
|
11 |
character). Same applies to printing of output.
|
|
12 |
* Mark stdin broken on Windows.
|
3 | 13 |
|
4 | 14 |
0.6.1 (2018-05-02)
|
5 | 15 |
------------------
|
32 | 32 |
|
33 | 33 |
* runs an external process and waits for it to finish
|
34 | 34 |
* does not deadlock, no matter the process stdout/stderr output behaviour
|
35 | |
* returns the exit code, stdout, stderr (separately), and the total process
|
36 | |
runtime as a dictionary
|
|
35 |
* returns the exit code, stdout, stderr (separately, both as bytestrings),
|
|
36 |
and the total process runtime as a dictionary
|
37 | 37 |
* process can run in a custom environment, either as a modification of
|
38 | 38 |
the current environment or in a new environment from scratch
|
39 | 39 |
* stdin can be fed to the process, the returned dictionary contains
|
40 | 40 |
information how much was read by the process
|
41 | 41 |
* stdout and stderr is printed by default, can be disabled
|
42 | 42 |
* stdout and stderr can be passed to any arbitrary function for
|
43 | |
live processing
|
|
43 |
live processing (separately, both as unicode strings)
|
44 | 44 |
* optionally enforces a time limit on the process
|
45 | 45 |
|
46 | 46 |
Credits
|
8 | 8 |
|
9 | 9 |
To test for successful completion::
|
10 | 10 |
|
11 | |
assert result['exitcode'] == 0
|
|
11 |
assert not result['exitcode']
|
|
12 |
assert result['exitcode'] == 0 # alternatively
|
12 | 13 |
|
13 | 14 |
To test for no STDERR output::
|
14 | 15 |
|
15 | |
assert result['stderr'] == ''
|
|
16 |
assert not result['stderr']
|
|
17 |
assert result['stderr'] == b'' # alternatively
|
16 | 18 |
|
17 | 19 |
To run with a specific environment variable set::
|
18 | 20 |
|
52 | 52 |
|
53 | 53 |
__author__ = """Markus Gerstel"""
|
54 | 54 |
__email__ = 'scientificsoftware@diamond.ac.uk'
|
55 | |
__version__ = '0.6.1'
|
|
55 |
__version__ = '0.7.0'
|
56 | 56 |
|
57 | 57 |
logger = logging.getLogger('procrunner')
|
58 | 58 |
logger.addHandler(logging.NullHandler())
|
|
298 | 298 |
:param win32resolve: If on Windows, find the appropriate executable first.
|
299 | 299 |
This allows running of .bat, .cmd, etc. files without
|
300 | 300 |
explicitly specifying their extension.
|
301 | |
:return: A dictionary containing stdout, stderr, runtime, exitcode,
|
302 | |
and more.
|
|
301 |
:return: A dictionary containing stdout, stderr (both as bytestrings),
|
|
302 |
runtime, exitcode, and more.
|
303 | 303 |
'''
|
304 | 304 |
|
305 | 305 |
time_start = time.strftime("%Y-%m-%d %H:%M:%S GMT", time.gmtime())
|
0 | 0 |
[bumpversion]
|
1 | |
current_version = 0.6.1
|
|
1 |
current_version = 0.7.0
|
2 | 2 |
commit = True
|
3 | 3 |
tag = True
|
4 | 4 |
|
49 | 49 |
test_suite='tests',
|
50 | 50 |
tests_require=test_requirements,
|
51 | 51 |
url='https://github.com/DiamondLightSource/python-procrunner',
|
52 | |
version='0.6.1',
|
|
52 |
version='0.7.0',
|
53 | 53 |
zip_safe=False,
|
54 | 54 |
)
|