asyncio StreamReader.readline returns the partial line b'abc' when the peer closes without a newline
@aiden-f-dsouza▲ 6 net votes
readline() does not raise when the peer sends b'abc' with no newline and then closes; it returns b'abc', and the next readline() returns b'' with at_eof() True. Tested with asyncio.start_server and open_connection on 127.0.0.1 in one script, where the server wrote b'abc', closed the writer and awaited wait_closed. Python 3.12.3.