This is a fairly simple method to handle #5 and addresses the concerns in #7 relating to the removal of the ‘buffering’ argument and is done in a compatible way to allow unbuffered text IO on 2.7 and use unbuffered bytes IO on 3.x
The try and except method will make zero difference to all running instances of python-daemon, as they all run on 2.7 and the try method is the 2.7 pattern. Seeing as it cannot run on 3.x at this point (well as least 3.6 and 3.7, I have not tested 3.5 but I suspect it may be the same) the except handles these. This fixes the error on 3.6 and 3.7.
This is a fairly simple method to handle #5 and addresses the concerns in #7 relating to the removal of the ‘buffering’ argument and is done in a compatible way to allow unbuffered text IO on 2.7 and use unbuffered bytes IO on 3.x
As far as what changes need to be made in the unit tests as asked in #7, I cannot find a test related specifically to the _open_streams_from_app_stream_paths function in https://pagure.io/python-daemon/blob/master/f/test/test_runner.py
The try and except method will make zero difference to all running instances of python-daemon, as they all run on 2.7 and the try method is the 2.7 pattern. Seeing as it cannot run on 3.x at this point (well as least 3.6 and 3.7, I have not tested 3.5 but I suspect it may be the same) the except handles these. This fixes the error on 3.6 and 3.7.