summaryrefslogtreecommitdiffstats
path: root/Modules/_io/fileio.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-31 00:28:07 (GMT)
committerGitHub <noreply@github.com>2018-10-31 00:28:07 (GMT)
commit0353b4eaaf451ad463ce7eb3074f6b62d332f401 (patch)
treeee6c8d6f8368ae88711440e187aaa7294f423f6c /Modules/_io/fileio.c
parent3f819ca138db6945ee4271bf13e42db9f9b3b1e4 (diff)
downloadcpython-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/fileio.c')
-rw-r--r--Modules/_io/fileio.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 44d51c9..ffcb730 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -1120,14 +1120,6 @@ _io_FileIO_isatty_impl(fileio *self)
return PyBool_FromLong(res);
}
-static PyObject *
-fileio_getstate(fileio *self, PyObject *Py_UNUSED(ignored))
-{
- PyErr_Format(PyExc_TypeError,
- "cannot serialize '%s' object", Py_TYPE(self)->tp_name);
- return NULL;
-}
-
#include "clinic/fileio.c.h"
static PyMethodDef fileio_methods[] = {
@@ -1145,7 +1137,6 @@ static PyMethodDef fileio_methods[] = {
_IO_FILEIO_FILENO_METHODDEF
_IO_FILEIO_ISATTY_METHODDEF
{"_dealloc_warn", (PyCFunction)fileio_dealloc_warn, METH_O, NULL},
- {"__getstate__", (PyCFunction)fileio_getstate, METH_NOARGS, NULL},
{NULL, NULL} /* sentinel */
};