-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Open
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import io
class MockRawIO:
def __init__(self):
self.closed = NotImplemented
def write(self, b):
return len(data)
def writable(self):
return True
tp = io.BufferedWriter
writer = MockRawIO()
bufio = tp(writer, 8)
bufio.close()SystemError: <method 'close' of '_io.BufferedWriter' objects> returned a result with an exception set
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-IOtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error