New submission from Mike Lewis :
When using a timeout with check_output(), the call does not terminate unless
the child process generates output after the timeout. Looking at the code, it
appears there is a second call to communicate() after the timeout has happened,
presumably to retrieve
Mike Lewis added the comment:
Example of the output:
$ ./timeout.py
Subprocess with idle stdout at timeout: start at 1518081130.44
Timed out at: 1518081135.45, 5 seconds
Generating stdout from subprocess: start at 1518081135.45
Timed out at: 1518081136.47, 1 seconds
As you see, the 1 second
New submission from Mike Lewis :
When I do
codecs.encode(codecs.decode('\xed\xbc\xad', 'utf8'), 'utf8')
its not throwing an exception. '\xed\xbc\xad' is an invalid UTF8 byte sequence.
It maps to the value U+DF2D which is a "surrogate pair" it
Mike Lewis added the comment:
Sorry, meant to add this part to the quote from the rfc:
This leads to different results for character
numbers above 0x; the CESU-8 encoding of those characters is NOT
valid UTF-8
--
___
Python tracker
<h