GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — _pyio buffered classes raise AttributeError after detach() instead of ValueError · Issue #160472 · python/cpython Closed as duplicate Closed as duplicate Copy link DescriptionBug descriptionAfter import io, _pyio for mod in (io, _pyio): b = mod.BufferedReader(mod.BytesIO(b"abcdef")) b.detach() for op, args in [("read", (1,)), ("seek", (0,)), ("truncate", ()), ("flush", ())]: try: getattr(b, op)(*args) result = "no error" except Exception as exc: result = type(exc).__name__ print(mod.__name__, op, "->", result) Same shape for CauseIn def detach(self): if self.raw is None: raise ValueError("raw stream already detached") self.flush() raw = self._raw self._raw = None return raw so the class already knows the detached state, but only Expected behaviour
Why it matters beyond error text
ScopeI have not opened a patch, following the guidance in #160467 that the expected Found by differential testing CPython versions tested onCPython main branch (3.16.0a1+) Operating systems tested onLinux Activity
MetadataMetadataAssigneesLabelsNo labels ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |