Index: Misc/ACKS =================================================================== --- Misc/ACKS (revision 61432) +++ Misc/ACKS (working copy) @@ -33,6 +33,7 @@ Stig Bakken Greg Ball Luigi Ballabio +Jeff Balogh Michael J. Barber Chris Barker Quentin Barnes Index: Misc/NEWS =================================================================== --- Misc/NEWS (revision 61432) +++ Misc/NEWS (working copy) @@ -30,6 +30,8 @@ Core and Builtins ----------------- +- Issue #2282: io.TextIOWrapper was not overriding seekable() from io.IOBase. + - Issue #2115: Important speedup in setting __slot__ attributes. Also prevent a possible crash: an Abstract Base Class would try to access a slot on a registered virtual subclass. Index: Lib/io.py =================================================================== --- Lib/io.py (revision 61432) +++ Lib/io.py (working copy) @@ -1208,7 +1208,7 @@ # were rendered by the decoder after feeding it those bytes. We # use this to reconstruct intermediate decoder states in tell(). - def _seekable(self): + def seekable(self): return self._seekable def flush(self): Index: Lib/test/test_io.py =================================================================== --- Lib/test/test_io.py (revision 61432) +++ Lib/test/test_io.py (working copy) @@ -895,6 +895,12 @@ txt.seek(pos) self.assertEquals(txt.read(4), "BBB\n") + def test_issue2282(self): + buffer = io.BytesIO(self.testdata) + txt = io.TextIOWrapper(buffer, encoding="ascii") + + self.assertEqual(buffer.seekable(), txt.seekable()) + def test_newline_decoder(self): import codecs decoder = codecs.getincrementaldecoder("utf-8")()