Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix error messages for host not found when `host` is passed in as bytes #633
open_tcp_stream can take
OSError: all attempts to connect to localhost:8081 failed
but when passed as bytes I would get the exception:
TypeError: a bytes-like object is required, not 'str'
This PR adds a single line to convert bytes to a string before running the rest of the function (and some tests).
The test failure is #624, nothing to worry about here.
The one thing that jumped out at me is that the interaction of hostnames and text encoding is stupidly complicated. So is a plain
So I think the right thing to do here is
And finally, can you add a newsfragment? Just create a file called
@@ Coverage Diff @@ ## master #633 +/- ## ========================================== + Coverage 99.28% 99.28% +<.01% ========================================== Files 91 91 Lines 10763 10767 +4 Branches 768 768 ========================================== + Hits 10686 10690 +4 Misses 58 58 Partials 19 19