Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
z764969689 wants to merge22 commits intopython:mainfromz764969689:fix-issue-57531

Conversation

z764969689
Copy link
Contributor

gh-57531 addBufferedReader.read() return value check for non-blocking stream mode, simply opt theTextIOWrapper error raising.

@serhiy-storchaka
Copy link
Member

Please resolve conflicts and add tests. Also capitalize the first letter of a sentence in a NEWS entry.

@z764969689
Copy link
ContributorAuthor

z764969689 commentedJan 18, 2024
edited
Loading

@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.

@serhiy-storchaka
Copy link
Member

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.

@z764969689
Copy link
ContributorAuthor

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.
BTW, not pretty clear on the implementation differences, is it okay that the error-raising logic varies between them?

@serhiy-storchaka
Copy link
Member

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.

z764969689 reacted with thumbs up emoji

@z764969689z764969689 deleted the fix-issue-57531 branchJanuary 30, 2024 07:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@z764969689@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp