summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-12-24 15:10:27 +0000
committerBenjamin Peterson <benjamin@python.org>2008-12-24 15:10:27 +0000
commit54686e3c2981a18521db088ffc16d5f4e5983e75 (patch)
tree86afa9a9a67921ac67eecdeba04681deca334843
parente098c4abe5d17fdd469d84ae740eb8bbd8ba9667 (diff)
downloadcpython-git-54686e3c2981a18521db088ffc16d5f4e5983e75.tar.gz
#4736 BufferRWPair.closed shouldn't try to call another property as a function
-rw-r--r--Lib/io.py2
-rw-r--r--Lib/test/test_io.py3
-rw-r--r--Misc/NEWS2
3 files changed, 5 insertions, 2 deletions
diff --git a/Lib/io.py b/Lib/io.py
index 7f938987b7..320a4b9b5f 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -1167,7 +1167,7 @@ class BufferedRWPair(BufferedIOBase):
@property
def closed(self):
- return self.writer.closed()
+ return self.writer.closed
class BufferedRandom(BufferedWriter, BufferedReader):
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 8a7da60947..967018ea45 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -554,8 +554,9 @@ class BufferedRWPairTest(unittest.TestCase):
r = MockRawIO(())
w = MockRawIO()
pair = io.BufferedRWPair(r, w)
+ self.assertFalse(pair.closed)
- # XXX need implementation
+ # XXX More Tests
class BufferedRandomTest(unittest.TestCase):
diff --git a/Misc/NEWS b/Misc/NEWS
index 775392437c..026e4781d7 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -86,6 +86,8 @@ Core and Builtins
Library
-------
+- Issue #4736: io.BufferedRWPair's closed property now functions properly.
+
- Issue #3954: Fix a potential SystemError in _hotshot.logreader error
handling.