Codebase list python-procrunner / 79d5885
Bump version: 0.6.1 → 0.7.0 Markus Gerstel 5 years ago
6 changed file(s) with 22 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
00 =======
11 History
22 =======
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.
313
414 0.6.1 (2018-05-02)
515 ------------------
3232
3333 * runs an external process and waits for it to finish
3434 * 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
3737 * process can run in a custom environment, either as a modification of
3838 the current environment or in a new environment from scratch
3939 * stdin can be fed to the process, the returned dictionary contains
4040 information how much was read by the process
4141 * stdout and stderr is printed by default, can be disabled
4242 * stdout and stderr can be passed to any arbitrary function for
43 live processing
43 live processing (separately, both as unicode strings)
4444 * optionally enforces a time limit on the process
4545
4646 Credits
88
99 To test for successful completion::
1010
11 assert result['exitcode'] == 0
11 assert not result['exitcode']
12 assert result['exitcode'] == 0 # alternatively
1213
1314 To test for no STDERR output::
1415
15 assert result['stderr'] == ''
16 assert not result['stderr']
17 assert result['stderr'] == b'' # alternatively
1618
1719 To run with a specific environment variable set::
1820
5252
5353 __author__ = """Markus Gerstel"""
5454 __email__ = 'scientificsoftware@diamond.ac.uk'
55 __version__ = '0.6.1'
55 __version__ = '0.7.0'
5656
5757 logger = logging.getLogger('procrunner')
5858 logger.addHandler(logging.NullHandler())
298298 :param win32resolve: If on Windows, find the appropriate executable first.
299299 This allows running of .bat, .cmd, etc. files without
300300 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.
303303 '''
304304
305305 time_start = time.strftime("%Y-%m-%d %H:%M:%S GMT", time.gmtime())
00 [bumpversion]
1 current_version = 0.6.1
1 current_version = 0.7.0
22 commit = True
33 tag = True
44
4949 test_suite='tests',
5050 tests_require=test_requirements,
5151 url='https://github.com/DiamondLightSource/python-procrunner',
52 version='0.6.1',
52 version='0.7.0',
5353 zip_safe=False,
5454 )