10000 gh-101819: Refactor _io in preparation for module isolation by erlend-aasland · Pull Request #104334 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101819: Refactor _io in preparation for module isolation #104334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 9, 2023
Merged
Prev Previous commit
Next Next commit
Refactor: hide delegate
Add method wraper for _PyIOBase_check_readable
  • Loading branch information
erlend-aasland committed May 9, 2023
commit 703440a7e1717d518ac5b848e6fe72dc002d8bf1
8 changes: 7 additions & 1 deletion Modules/_io/iobase.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ iobase_check_seekable(PyObject *self, PyObject *args)
return _PyIOBase_check_seekable(self, args);
}

static PyObject *
iobase_check_readable(PyObject *self, PyObject *args)
{
return _PyIOBase_check_readable(self, args);
}

/* XXX: IOBase thinks it has to maintain its own internal state in
`__IOBase_closed` and call flush() by itself, but it is redundant with
whatever behaviour a non-trivial derived class will implement. */
Expand Down Expand Up @@ -809,7 +815,7 @@ static PyMethodDef iobase_methods[] = {

{"_checkClosed", _PyIOBase_check_closed, METH_NOARGS},
{"_checkSeekable", iobase_check_seekable, METH_NOARGS},
{"_checkReadable", _PyIOBase_check_readable, METH_NOARGS},
{"_checkReadable", iobase_check_readable, METH_NOARGS},
{"_checkWritable", _PyIOBase_check_writable, METH_NOARGS},

_IO__IOBASE_FILENO_METHODDEF
Expand Down
0