bpo-33138: Change standard error message for non-pickleable and non-c… · python/cpython@0353b4e (original) (raw)

`@@ -608,16 +608,6 @@ buffered_isatty(buffered *self, PyObject *Py_UNUSED(ignored))

`

608

608

`return PyObject_CallMethodObjArgs(self->raw, _PyIO_str_isatty, NULL);

`

609

609

`}

`

610

610

``

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

``

-

621

611

`/* Forward decls */

`

622

612

`static PyObject *

`

623

613

`_bufferedwriter_flush_unlocked(buffered *);

`

`@@ -2394,7 +2384,6 @@ static PyMethodDef bufferedreader_methods[] = {

`

2394

2384

` {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},

`

2395

2385

` {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},

`

2396

2386

` {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},

`

2397

``

`-

{"getstate", (PyCFunction)buffered_getstate, METH_NOARGS},

`

2398

2387

``

2399

2388

`_IO__BUFFERED_READ_METHODDEF

`

2400

2389

`_IO__BUFFERED_PEEK_METHODDEF

`

`@@ -2485,7 +2474,6 @@ static PyMethodDef bufferedwriter_methods[] = {

`

2485

2474

` {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},

`

2486

2475

` {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},

`

2487

2476

` {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},

`

2488

``

`-

{"getstate", (PyCFunction)buffered_getstate, METH_NOARGS},

`

2489

2477

``

2490

2478

`_IO_BUFFEREDWRITER_WRITE_METHODDEF

`

2491

2479

`_IO__BUFFERED_TRUNCATE_METHODDEF

`

`@@ -2579,8 +2567,6 @@ static PyMethodDef bufferedrwpair_methods[] = {

`

2579

2567

` {"close", (PyCFunction)bufferedrwpair_close, METH_NOARGS},

`

2580

2568

` {"isatty", (PyCFunction)bufferedrwpair_isatty, METH_NOARGS},

`

2581

2569

``

2582

``

`-

{"getstate", (PyCFunction)buffered_getstate, METH_NOARGS},

`

2583

``

-

2584

2570

` {NULL, NULL}

`

2585

2571

`};

`

2586

2572

``

`@@ -2652,7 +2638,6 @@ static PyMethodDef bufferedrandom_methods[] = {

`

2652

2638

` {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},

`

2653

2639

` {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},

`

2654

2640

` {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},

`

2655

``

`-

{"getstate", (PyCFunction)buffered_getstate, METH_NOARGS},

`

2656

2641

``

2657

2642

` {"flush", (PyCFunction)buffered_flush, METH_NOARGS},

`

2658

2643

``