mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-33138: Change standard error message for non-pickleable and non-copyable types. (GH-6239)
This commit is contained in:
parent
3f819ca138
commit
0353b4eaaf
11 changed files with 17 additions and 91 deletions
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue