@@ -608,16 +608,6 @@ buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))
608608 return PyObject_CallMethodObjArgs (self -> raw , _PyIO_str_isatty , NULL );
609609}
610610
611- /* Serialization */
612-
613- static PyObject *
614- buffered_getstate (buffered * self , PyObject * Py_UNUSED (ignored ))
615- {
616- PyErr_Format (PyExc_TypeError ,
617- "cannot serialize '%s' object" , Py_TYPE (self )-> tp_name );
618- return NULL ;
619- }
620-
621611/* Forward decls */
622612static PyObject *
623613_bufferedwriter_flush_unlocked (buffered * );
@@ -2394,7 +2384,6 @@ static PyMethodDef bufferedreader_methods[] = {
23942384 {"fileno" , (PyCFunction )buffered_fileno , METH_NOARGS },
23952385 {"isatty" , (PyCFunction )buffered_isatty , METH_NOARGS },
23962386 {"_dealloc_warn" , (PyCFunction )buffered_dealloc_warn , METH_O },
2397- {"__getstate__" , (PyCFunction )buffered_getstate , METH_NOARGS },
23982387
23992388 _IO__BUFFERED_READ_METHODDEF
24002389 _IO__BUFFERED_PEEK_METHODDEF
@@ -2485,7 +2474,6 @@ static PyMethodDef bufferedwriter_methods[] = {
24852474 {"fileno" , (PyCFunction )buffered_fileno , METH_NOARGS },
24862475 {"isatty" , (PyCFunction )buffered_isatty , METH_NOARGS },
24872476 {"_dealloc_warn" , (PyCFunction )buffered_dealloc_warn , METH_O },
2488- {"__getstate__" , (PyCFunction )buffered_getstate , METH_NOARGS },
24892477
24902478 _IO_BUFFEREDWRITER_WRITE_METHODDEF
24912479 _IO__BUFFERED_TRUNCATE_METHODDEF
@@ -2579,8 +2567,6 @@ static PyMethodDef bufferedrwpair_methods[] = {
25792567 {"close" , (PyCFunction )bufferedrwpair_close , METH_NOARGS },
25802568 {"isatty" , (PyCFunction )bufferedrwpair_isatty , METH_NOARGS },
25812569
2582- {"__getstate__" , (PyCFunction )buffered_getstate , METH_NOARGS },
2583-
25842570 {NULL , NULL }
25852571};
25862572
@@ -2652,7 +2638,6 @@ static PyMethodDef bufferedrandom_methods[] = {
26522638 {"fileno" , (PyCFunction )buffered_fileno , METH_NOARGS },
26532639 {"isatty" , (PyCFunction )buffered_isatty , METH_NOARGS },
26542640 {"_dealloc_warn" , (PyCFunction )buffered_dealloc_warn , METH_O },
2655- {"__getstate__" , (PyCFunction )buffered_getstate , METH_NOARGS },
26562641
26572642 {"flush" , (PyCFunction )buffered_flush , METH_NOARGS },
26582643
0 commit comments