[pypy-svn] pypy default: StringIO.line_buffering is always false.
alex_gaynor
commits-noreply at bitbucket.org
Wed Feb 2 21:12:58 CET 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r41578:0207326e3669
Date: 2011-02-02 15:06 -0500
http://bitbucket.org/pypy/pypy/changeset/0207326e3669/
Log: StringIO.line_buffering is always false.
diff --git a/pypy/module/_io/test/test_stringio.py b/pypy/module/_io/test/test_stringio.py
--- a/pypy/module/_io/test/test_stringio.py
+++ b/pypy/module/_io/test/test_stringio.py
@@ -16,6 +16,7 @@
assert sio.seekable()
assert not sio.isatty()
assert not sio.closed
+ assert not sio.line_buffering
sio.close()
assert sio.readable()
assert sio.writable()
diff --git a/pypy/module/_io/interp_stringio.py b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -146,6 +146,10 @@
def closed_get_w(space, self):
return space.wrap(self.buf is None)
+ def line_buffering_get_w(space, self):
+ self._check_closed(self)
+ return space.w_False
+
W_StringIO.typedef = TypeDef(
'StringIO', W_TextIOBase.typedef,
__module__ = "_io",
@@ -161,4 +165,5 @@
seekable = interp2app(W_StringIO.seekable_w),
close = interp2app(W_StringIO.close_w),
closed = GetSetProperty(W_StringIO.closed_get_w),
+ line_buffering = GetSetProperty(W_StringIO.line_buffering_get_w),
)
More information about the Pypy-commit
mailing list