diff -r c6df85e1d42e Lib/test/test_io.py --- a/Lib/test/test_io.py Tue Apr 14 13:54:09 2015 -0700 +++ b/Lib/test/test_io.py Sun Apr 26 22:50:16 2015 -0700 @@ -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 c6df85e1d42e Modules/_io/iobase.c --- a/Modules/_io/iobase.c Tue Apr 14 13:54:09 2015 -0700 +++ b/Modules/_io/iobase.c Sun Apr 26 22:50:16 2015 -0700 @@ -892,9 +892,25 @@ return result; } +static PyObject * +rawiobase_readinto(PyObject *self, PyObject *args) +{ + PyErr_SetString(PyExc_NotImplementedError, "Not Implemented in c"); + return NULL; +} + +static PyObject * +rawiobase_write(PyObject *self, PyObject *args) +{ + PyErr_SetString(PyExc_NotImplementedError, "Not Implemented in c"); + return NULL; +} + static PyMethodDef rawiobase_methods[] = { {"read", rawiobase_read, METH_VARARGS}, {"readall", rawiobase_readall, METH_NOARGS, rawiobase_readall_doc}, + {"readinto", rawiobase_readinto, METH_VARARGS,}, + {"write", rawiobase_write, METH_VARARGS,}, {NULL, NULL} };