The following throws an exception instead of succeeding:
from io import BytesIO
f = BytesIO()
f.read()
class MyBytesIO(BytesIO):
def read(self, n=None):
raise Exception
f = MyBytesIO()
BytesIO.read(f)
See also #1129 and #1070.
Ran into this issue when trying to run:
make.ps1 test-"CPython.test_iter|IronPython.test_io_stdlib"
In this case it was causing a StackOverflowException:
from io import BytesIO
f = BytesIO()
f.read()
class MyBytesIO(BytesIO):
def read(self, n=None):
return super().read(n)
f = MyBytesIO()
f.read()