Armin Rigo  committed c96af09 Merge

merge heads

  • Participants
  • Parent commits 1101ea5, 203f1a1

Comments (0)

Files changed (2)

File pypy/module/_io/

 class W_BytesIO(RStringIO, W_BufferedIOBase):
     def __init__(self, space):
-        W_BufferedIOBase.__init__(self, space)
+        W_BufferedIOBase.__init__(self, space, add_to_autoflusher=False)
     def descr_init(self, space, w_initial_bytes=None):

File pypy/module/_io/

 class W_IOBase(W_Root):
-    def __init__(self, space):
+    def __init__(self, space, add_to_autoflusher=True):
         # XXX: IOBase thinks it has to maintain its own internal state in
         # `__IOBase_closed` and call flush() by itself, but it is redundant
         # with whatever behaviour a non-trivial derived class will implement. = space
         self.w_dict = space.newdict()
         self.__IOBase_closed = False
-        get_autoflusher(space).add(self)
+        if add_to_autoflusher:
+            get_autoflusher(space).add(self)
     def getdict(self, space):
         return self.w_dict