gh-117764: Add signatures for __reduce__ and __reduce_ex__ in the _io module (GH-117773)

__reduce__() does not have parameters, __reduce_ex__() has a single
parameter.
This commit is contained in:
Serhiy Storchaka 2024-04-12 12:22:17 +03:00 committed by GitHub
parent 2638c28be0
commit 35f60c3def
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 10 deletions

View File

@ -2531,8 +2531,8 @@ static PyMethodDef bufferedreader_methods[] = {
_IO__BUFFERED_TRUNCATE_METHODDEF
_IO__BUFFERED___SIZEOF___METHODDEF
{"__reduce__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce__", _PyIOBase_cannot_pickle, METH_NOARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_O},
{NULL, NULL}
};
@ -2591,8 +2591,8 @@ static PyMethodDef bufferedwriter_methods[] = {
_IO__BUFFERED_TELL_METHODDEF
_IO__BUFFERED___SIZEOF___METHODDEF
{"__reduce__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce__", _PyIOBase_cannot_pickle, METH_NOARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_O},
{NULL, NULL}
};
@ -2709,8 +2709,8 @@ static PyMethodDef bufferedrandom_methods[] = {
_IO_BUFFEREDWRITER_WRITE_METHODDEF
_IO__BUFFERED___SIZEOF___METHODDEF
{"__reduce__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce__", _PyIOBase_cannot_pickle, METH_NOARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_O},
{NULL, NULL}
};

View File

@ -1178,8 +1178,8 @@ static PyMethodDef fileio_methods[] = {
_IO_FILEIO_FILENO_METHODDEF
_IO_FILEIO_ISATTY_METHODDEF
{"_dealloc_warn", (PyCFunction)fileio_dealloc_warn, METH_O, NULL},
{"__reduce__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce__", _PyIOBase_cannot_pickle, METH_NOARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_O},
{NULL, NULL} /* sentinel */
};

View File

@ -3337,8 +3337,8 @@ static PyMethodDef textiowrapper_methods[] = {
_IO_TEXTIOWRAPPER_TELL_METHODDEF
_IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF
{"__reduce__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_VARARGS},
{"__reduce__", _PyIOBase_cannot_pickle, METH_NOARGS},
{"__reduce_ex__", _PyIOBase_cannot_pickle, METH_O},
{NULL, NULL}
};