Closed
Description
Bug report
Bug description:
This came up in python/typeshed#12414.
The current implementation of file_digest()
does not check the return value of fileobj.readinto()
for None
:
Lines 232 to 236 in 2a5d1eb
While buffered file objects can't return None
, unbuffered ones can when they are doing non-blocking I/O. Specifically, file_digest()
is documented to take SocketIO
objects, which can very much return None
:
Lines 694 to 714 in 2a5d1eb
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other
Linked PRs
Metadata
Metadata
Assignees
Labels
An unexpected behavior, bug, or errorAn unexpected behavior, bug, or error