Skip to content

Remove subclass IOBase from TextIOBase. #1505

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 2 commits into from
Jul 29, 2017
Merged

Remove subclass IOBase from TextIOBase. #1505

merged 2 commits into from
Jul 29, 2017

Conversation

matthiaskramm
Copy link
Contributor

This used to cause TextIOBase to subclass both BinaryIO and TextIO, even
though those two are incompatible.

This used to cause TextIOBase to subclass both BinaryIO and TextIO, even
though those two are incompatible.
@matthiaskramm
Copy link
Contributor Author

matthiaskramm commented Jul 28, 2017

Also fixed fcntl.pyi to use IO instead of IOBase.
E.g. fcntl.fcntl() works for files (as in: the return value of open()), but files are not instances of IOBase.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't we think of this before?

(I'll merge once internal tests pass.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants