#4736 BufferRWPair.closed shouldn't try to call another property as a function
diff --git a/Lib/io.py b/Lib/io.py
index 7f93898..320a4b9 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -1167,7 +1167,7 @@
@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 8a7da60..967018e 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -554,8 +554,9 @@
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 7753924..026e478 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -86,6 +86,8 @@
Library
-------
+- Issue #4736: io.BufferedRWPair's closed property now functions properly.
+
- Issue #3954: Fix a potential SystemError in _hotshot.logreader error
handling.