diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-31 00:28:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-31 00:28:07 (GMT) |
commit | 0353b4eaaf451ad463ce7eb3074f6b62d332f401 (patch) | |
tree | ee6c8d6f8368ae88711440e187aaa7294f423f6c /Modules/_io/bufferedio.c | |
parent | 3f819ca138db6945ee4271bf13e42db9f9b3b1e4 (diff) | |
download | cpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.zip cpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.tar.gz cpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.tar.bz2 |
bpo-33138: Change standard error message for non-pickleable and non-copyable types. (GH-6239)
Diffstat (limited to 'Modules/_io/bufferedio.c')
-rw-r--r-- | Modules/_io/bufferedio.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index 9d3b446..2eb5262 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -608,16 +608,6 @@ buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored)) return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_isatty, NULL); } -/* Serialization */ - -static PyObject * -buffered_getstate(buffered *self, PyObject *Py_UNUSED(ignored)) -{ - PyErr_Format(PyExc_TypeError, - "cannot serialize '%s' object", Py_TYPE(self)->tp_name); - return NULL; -} - /* Forward decls */ static PyObject * _bufferedwriter_flush_unlocked(buffered *); @@ -2394,7 +2384,6 @@ static PyMethodDef bufferedreader_methods[] = { {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS}, {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS}, {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O}, - {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS}, _IO__BUFFERED_READ_METHODDEF _IO__BUFFERED_PEEK_METHODDEF @@ -2485,7 +2474,6 @@ static PyMethodDef bufferedwriter_methods[] = { {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS}, {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS}, {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O}, - {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS}, _IO_BUFFEREDWRITER_WRITE_METHODDEF _IO__BUFFERED_TRUNCATE_METHODDEF @@ -2579,8 +2567,6 @@ static PyMethodDef bufferedrwpair_methods[] = { {"close", (PyCFunction)bufferedrwpair_close, METH_NOARGS}, {"isatty", (PyCFunction)bufferedrwpair_isatty, METH_NOARGS}, - {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS}, - {NULL, NULL} }; @@ -2652,7 +2638,6 @@ static PyMethodDef bufferedrandom_methods[] = { {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS}, {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS}, {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O}, - {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS}, {"flush", (PyCFunction)buffered_flush, METH_NOARGS}, |