BufferedIOBase and TextIOBase should derive from IOBase, not from RawIOBase!
diff --git a/Lib/io.py b/Lib/io.py
index f943f80..9f2a647 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -354,7 +354,7 @@
         return self._sock.fileno()
 
 
-class BufferedIOBase(RawIOBase):
+class BufferedIOBase(IOBase):
 
     """Base class for buffered IO objects.
 
@@ -779,8 +779,7 @@
         return BufferedWriter.write(self, b)
 
 
-# XXX That's not the right base class
-class TextIOBase(BufferedIOBase):
+class TextIOBase(IOBase):
 
     """Base class for text I/O.