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.

classification
Title: typing.TextIO and BinaryIO are not aliases of IO[...]
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: asvetlov, docs@python, gvanrossum, levkivskyi, ned.deily, srittau
Priority: release blocker Keywords: patch

Created on 2017-12-12 00:34 by srittau, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4832 merged srittau, 2017-12-13 08:08
PR 4833 merged python-dev, 2017-12-13 08:40
Messages (6)
msg308083 - (view) Author: Sebastian Rittau (srittau) * Date: 2017-12-12 00:34
See https://github.com/python/typing/issues/518 for context.

The typing documentation for 3.6.4rc1 states:

> typing.io ... defines the generic type IO[AnyStr] and aliases TextIO and BinaryIO for respectively IO[str] and IO[bytes].

In the current implementation TextIO and BinaryIO are not aliases, but instead derived from IO. This means that values of type IO[...], and especially IO[Any] can not be assigned where TextIO or BinaryIO is expected.
msg308087 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2017-12-12 02:57
This doc bug should be fixed before 3.6.4 final goes out.
msg308191 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-13 08:40
New changeset c3e070f84931c847d1b35e7fb36aa71edd6215f6 by Andrew Svetlov (Sebastian Rittau) in branch 'master':
bpo-32284: Fix documentation of BinaryIO and TextIO (#4832)
https://github.com/python/cpython/commit/c3e070f84931c847d1b35e7fb36aa71edd6215f6
msg308192 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-13 08:59
New changeset b0358e8784821867ab05b3d890717c37309be849 by Andrew Svetlov (Miss Islington (bot)) in branch '3.6':
bpo-32284: Fix documentation of BinaryIO and TextIO (GH-4832) (#4833)
https://github.com/python/cpython/commit/b0358e8784821867ab05b3d890717c37309be849
msg308193 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-12-13 08:59
Done
msg308619 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-12-19 07:50
New changeset 898a3e4901b3b6de9b540e18faa457a6ac3e49bb by Ned Deily (Miss Islington (bot)) in branch '3.6':
bpo-32284: Fix documentation of BinaryIO and TextIO (GH-4832) (#4833)
https://github.com/python/cpython/commit/898a3e4901b3b6de9b540e18faa457a6ac3e49bb
History
Date User Action Args
2022-04-11 14:58:55adminsetgithub: 76465
2017-12-19 07:50:50ned.deilysetmessages: + msg308619
2017-12-13 08:59:55asvetlovsetmessages: + msg308193
2017-12-13 08:59:40asvetlovsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2017-12-13 08:59:07asvetlovsetmessages: + msg308192
2017-12-13 08:40:30python-devsetpull_requests: + pull_request4725
2017-12-13 08:40:01asvetlovsetnosy: + asvetlov
messages: + msg308191
2017-12-13 08:39:15asvetlovsetversions: + Python 3.7
2017-12-13 08:08:58srittausetkeywords: + patch
stage: patch review
pull_requests: + pull_request4723
2017-12-12 07:57:42levkivskyisetnosy: + levkivskyi
2017-12-12 02:57:47gvanrossumsetpriority: normal -> release blocker
nosy: + gvanrossum, ned.deily
messages: + msg308087

2017-12-12 00:34:35srittaucreate