-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-57531 add BufferedReader.read() return value check for non-blocking stream mode #105224
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
Please resolve conflicts and add tests. Also capitalize the first letter of a sentence in a NEWS entry. |
@serhiy-storchaka Conflicts resolved & NEWS entry edited. I'm wondering if I need to open another PR for the tests or just add them in this one. |
It is better to add new tests in the same PR. It makes easier to check that they fail without this change and pass with it. |
I've added a simple test case and I found that the test case would fail the C implementation. Since I'm unfamiliar with the C code, might need some help from others to modify the C code. |
It is more complex issue than covered in this PR. If change the behavior of text file read() for non-blocking buffered readers, the same change should be done for non-blocking raw files. If change the behavior for "read-until-end", the same change should be done for partial read. And of course the behavior of both C and Python implementation should be consistent. Thank you for reviving this issue, I will look what can I do with this. |
gh-57531 add
BufferedReader.read()
return value check for non-blocking stream mode, simply opt theTextIOWrapper
error raising.