Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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 wrapper for _PyIOBase_check_seekable.
  • Loading branch information
erlend-aasland committed May 9, 2023
commit 8adc0cd0e7eb3b295f7455eeedb6fc31b2c9d391
8 changes: 7 additions & 1 deletion 8 Modules/_io/iobase.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ _PyIOBase_check_closed(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}

static PyObject *
iobase_check_seekable(PyObject *self, PyObject *args)
{
return _PyIOBase_check_seekable(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 @@ -802,7 +808,7 @@ static PyMethodDef iobase_methods[] = {
_IO__IOBASE_WRITABLE_METHODDEF

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

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.