mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +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
|
|
@ -2891,14 +2891,6 @@ _io_TextIOWrapper_isatty_impl(textio *self)
|
|||
return _PyObject_CallMethodId(self->buffer, &PyId_isatty, NULL);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
textiowrapper_getstate(textio *self, PyObject *args)
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"cannot serialize '%s' object", Py_TYPE(self)->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
_io.TextIOWrapper.flush
|
||||
[clinic start generated code]*/
|
||||
|
|
@ -3132,7 +3124,6 @@ static PyMethodDef textiowrapper_methods[] = {
|
|||
_IO_TEXTIOWRAPPER_READABLE_METHODDEF
|
||||
_IO_TEXTIOWRAPPER_WRITABLE_METHODDEF
|
||||
_IO_TEXTIOWRAPPER_ISATTY_METHODDEF
|
||||
{"__getstate__", (PyCFunction)textiowrapper_getstate, METH_NOARGS},
|
||||
|
||||
_IO_TEXTIOWRAPPER_SEEK_METHODDEF
|
||||
_IO_TEXTIOWRAPPER_TELL_METHODDEF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue