This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author remi.lapeyre
Recipients remi.lapeyre, steverpalmer
Date 2019-01-29.14:43:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548773022.57.0.448833917918.issue35848@roundup.psfhosted.org>
In-reply-to
Content
I checked and io.TextIOBase is the only io.IOBase subclass to lack one of read, readinto or write:


>>> import io, inspect
>>> for name, obj in inspect.getmembers(io, predicate=inspect.isclass):
... 	missing = {'read', 'readinto', 'write'} - {name for name, _ in inspect.getmembers(obj)}
...	if issubclass(obj, io.IOBase) and missing:
...	     print(obj, missing, issubclass(obj, io.TextIOBase))

<class 'io.IOBase'> {'write', 'read', 'readinto'} False
<class '_io.StringIO'> {'readinto'} True
<class 'io.TextIOBase'> {'readinto'} True
<class '_io.TextIOWrapper'> {'readinto'} True

I can open a PR to fix the conflicts between the two parts of the documentation. I think it's appropriate to change TextIOBase to raise UnsupportedOperation when calling readinto and to change the documentation accordingly.
History
Date User Action Args
2019-01-29 14:43:44remi.lapeyresetrecipients: + remi.lapeyre, steverpalmer
2019-01-29 14:43:42remi.lapeyresetmessageid: <1548773022.57.0.448833917918.issue35848@roundup.psfhosted.org>
2019-01-29 14:43:42remi.lapeyrelinkissue35848 messages
2019-01-29 14:43:42remi.lapeyrecreate