[Python-checkins] cpython (merge 3.4 -> default): Merge from 3.4

andrew.kuchling python-checkins at python.org
Wed Apr 16 03:22:10 CEST 2014

changeset:   90348:e50417fc4b51
parent:      90345:d4e3bea03f9f
parent:      90347:c76d782cb9df
user:        Andrew Kuchling <amk at amk.ca>
date:        Tue Apr 15 21:21:56 2014 -0400
  Merge from 3.4

  Lib/test/test_optparse.py |  1 +
  Modules/_io/iobase.c      |  4 ++--
  2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py
--- a/Lib/test/test_optparse.py
+++ b/Lib/test/test_optparse.py
@@ -395,6 +395,7 @@
         self.assertRaises(self.parser.remove_option, ('foo',), None,
                           ValueError, "no such option 'foo'")
+    @support.impl_detail('Relies on sys.getrefcount', cpython=True)
     def test_refleak(self):
         # If an OptionParser is carrying around a reference to a large
         # object, various cycles can prevent it from being GC'd in
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -42,8 +42,8 @@
     "bytes. bytearrays are accepted too, and in some cases (such as\n"
     "readinto) needed. Text I/O classes work with str data.\n"
-    "Note that calling any method (even inquiries) on a closed stream is\n"
-    "undefined. Implementations may raise IOError in this case.\n"
+    "Note that calling any method (except additional calls to close(),\n"
+    "which are ignored) on a closed stream should raise a ValueError.\n"
     "IOBase (and its subclasses) support the iterator protocol, meaning\n"
     "that an IOBase object can be iterated over yielding the lines in a\n"

Repository URL: http://hg.python.org/cpython

More information about the Python-checkins mailing list