uasyncio V3 stream readline: is this correct?
The readline method returns if the final character is a newline. However it is possible that self.s.readline() might return more than one line. Should Stream.readline find the first newline and return a partial result? CPython docs:
Read one line, where “line” is a sequence of bytes ending with \n.
In the existing design the onus is on the device s to return a maximum of one line. Is this correct?
uasyncio/stream: write immediately
I'm trying to eliminate buffer copies when using asyncio. These are particularly painful WRT memory fragmentation when using 1400 byte buffers to nicely fill packets... One reallocation & copy site is the uasyncio write method and I'm trying to find some way to use it where I can eliminate that copy. This PR is the best I've come up so far that doesn't diverge from CPython. In fact, it more closely implements the CPython doc semantics: "The method attempts to write the data to the underlying socket immediately. If that fails, the data is queued in an internal write buffer until it can be sent."
If this enhancement is acceptable I'd create some unit tests. I'm happy to hear about alternatives.