-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-122179: Fix hashlib.file_digest and non-blocking I/O #122183
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
Conversation
While this is technically an API change, I think this should be backported to releases that are still in bugfix mode, as the current behavior can cause hard to find bugs instead of failing fast. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a positive change as is and test covers if this regresses in the future.
I think part of the cause of this is RawIO
(ex. FileIO
) vs. BufferedIO
(and TextIO
). Code exists in the wild using RawIO with this, which returns None, so updating to be more batteries included makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed this last year, before I knew more about the workflow so here are some improved comments.
Sorry, @srittau and @gpshead, I could not cleanly backport this to
|
hashlib.file_digest()
can't handle non-blocking I/O #122179