changeset: 96181:962b42d67b9e user: Antoine Pitrou date: Wed May 20 21:50:59 2015 +0200 files: Lib/test/test_io.py Misc/ACKS Misc/NEWS Modules/_io/iobase.c description: Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura Rupprecht. diff -r c93e5ba1cc20 -r 962b42d67b9e Lib/test/test_io.py --- a/Lib/test/test_io.py Wed May 20 22:02:43 2015 +0300 +++ b/Lib/test/test_io.py Wed May 20 21:50:59 2015 +0200 @@ -722,10 +722,10 @@ @support.cpython_only class APIMismatchTest(unittest.TestCase): - @unittest.expectedFailure # Test to be fixed by issue9858. def test_RawIOBase_io_in_pyio_match(self): """Test that pyio RawIOBase class has all c RawIOBase methods""" - mismatch = support.detect_api_mismatch(pyio.RawIOBase, io.RawIOBase) + mismatch = support.detect_api_mismatch(pyio.RawIOBase, io.RawIOBase, + ignore=('__weakref__',)) self.assertEqual(mismatch, set(), msg='Python RawIOBase does not have all C RawIOBase methods') def test_RawIOBase_pyio_in_io_match(self): diff -r c93e5ba1cc20 -r 962b42d67b9e Misc/ACKS --- a/Misc/ACKS Wed May 20 22:02:43 2015 +0300 +++ b/Misc/ACKS Wed May 20 21:50:59 2015 +0200 @@ -1212,6 +1212,7 @@ Audun S. Runde Eran Rundstein Rauli Ruohonen +Laura Rupprecht Jeff Rush Sam Rushing Mark Russell diff -r c93e5ba1cc20 -r 962b42d67b9e Misc/NEWS --- a/Misc/NEWS Wed May 20 22:02:43 2015 +0300 +++ b/Misc/NEWS Wed May 20 21:50:59 2015 +0200 @@ -52,6 +52,9 @@ Library ------- +- Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura + Rupprecht. + - Issue #22955: attrgetter, itemgetter and methodcaller objects in the operator module now support pickling. Added readable and evaluable repr for these objects. Based on patch by Josh Rosenberg. diff -r c93e5ba1cc20 -r 962b42d67b9e Modules/_io/iobase.c --- a/Modules/_io/iobase.c Wed May 20 22:02:43 2015 +0300 +++ b/Modules/_io/iobase.c Wed May 20 21:50:59 2015 +0200 @@ -952,9 +952,25 @@ return result; } +static PyObject * +rawiobase_readinto(PyObject *self, PyObject *args) +{ + PyErr_SetNone(PyExc_NotImplementedError); + return NULL; +} + +static PyObject * +rawiobase_write(PyObject *self, PyObject *args) +{ + PyErr_SetNone(PyExc_NotImplementedError); + return NULL; +} + static PyMethodDef rawiobase_methods[] = { _IO__RAWIOBASE_READ_METHODDEF _IO__RAWIOBASE_READALL_METHODDEF + {"readinto", rawiobase_readinto, METH_VARARGS}, + {"write", rawiobase_write, METH_VARARGS}, {NULL, NULL} };