Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r69018:c96af09f9fcd Date: 2014-01-30 12:29 +0100 http://bitbucket.org/pypy/pypy/changeset/c96af09f9fcd/
Log: merge heads diff --git a/pypy/module/_io/interp_bytesio.py b/pypy/module/_io/interp_bytesio.py --- a/pypy/module/_io/interp_bytesio.py +++ b/pypy/module/_io/interp_bytesio.py @@ -11,7 +11,7 @@ class W_BytesIO(RStringIO, W_BufferedIOBase): def __init__(self, space): - W_BufferedIOBase.__init__(self, space) + W_BufferedIOBase.__init__(self, space, add_to_autoflusher=False) self.init() def descr_init(self, space, w_initial_bytes=None): diff --git a/pypy/module/_io/interp_iobase.py b/pypy/module/_io/interp_iobase.py --- a/pypy/module/_io/interp_iobase.py +++ b/pypy/module/_io/interp_iobase.py @@ -44,14 +44,15 @@ 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. self.space = 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit