Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extmod/uasyncio: Add StreamReader.readexactly(n) method. #6285

Merged

Conversation

dpgeorge
Copy link
Member

It raises on EOFError instead of an IncompleteReadError (which is what CPython does). But the latter is derived from EOFError so code compatible with MicroPython and CPython can be written by catching EOFError (eg see included test).

Fixes issue #6156.

It raises on EOFError instead of an IncompleteReadError (which is what
CPython does).  But the latter is derived from EOFError so code compatible
with MicroPython and CPython can be written by catching EOFError (eg see
included test).

Fixes issue micropython#6156.

Signed-off-by: Damien George <damien@micropython.org>
@dpgeorge dpgeorge added the extmod Relates to extmod/ directory in source label Jul 25, 2020
@dpgeorge dpgeorge merged commit 441460d into micropython:master Jul 26, 2020
@dpgeorge dpgeorge deleted the extmod-uasyncio-stream-readexactly branch July 26, 2020 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extmod Relates to extmod/ directory in source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant