8000 gh-122559: Synchronize C and Python implementation of the io module about pickling by serhiy-storchaka · Pull Request #122628 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-122559: Synchronize C and Python implementation of the io module about pickling #122628

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

Merged
merged 5 commits into from
May 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into io-classes-getstate
  • Loading branch information
serhiy-storchaka authored May 4, 2025
commit c13733cf46b08754aa852e66a3a5b8f1b3c550ed
16 changes: 16 additions & 0 deletions Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3994,6 +3994,22 @@ def __setstate__(slf, state):
self.assertEqual(newtxt.tag, 'ham')
del MyTextIO

@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
def test_read_non_blocking(self):
import os
r, w = os.pipe()
try:
os.set_blocking(r, False)
with self.io.open(r, 'rt') as textfile:
r = None
# Nothing has been written so a non-blocking read raises a BlockingIOError exception.
with self.assertRaises(BlockingIOError):
textfile.read()
finally:
if r is not None:
os.close(r)
os.close(w)


class MemviewBytesIO(io.BytesIO):
'''A BytesIO object whose read method returns memoryviews
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0