Repository navigation
Add Trio backend - #143
Add Trio backend#143
Conversation
| if size == 0: | ||
| return b"" |
There was a problem hiding this comment.
Trio has "must be greater than 0" for their receive_some(max_size=...).
Should we error in the zero case? (Given that b"" is supposed to indicate EOF)
There was a problem hiding this comment.
Again, okay for this to be a follow-up.
We can tighten up the bolts as we get the API contract into place.
| async def connect_tls( | ||
| self, host: str, port: int, hostname: str = "" | ||
| ) -> AsyncNetworkStream: | ||
| raise NotImplementedError() # pragma: nocover |
There was a problem hiding this comment.
I guess we'll also want a well defined NetworkError exception that can be raised by code in this module.
We oughta spec the API so that the only expected failure modes are a NetworkError. (Or a Timeout if wrapped in a timeout context manager.)
There was a problem hiding this comment.
We can do that as a follow up maybe?
lovelydinosaur
left a comment
There was a problem hiding this comment.
Looks good. I think this is ready to go in.
eb64b36 to
5a96fa4
Compare
#138