[Python-checkins] bpo-35089: Don't mention typing.io and typing.re (GH-10173)

Miss Islington (bot) webhook-mailer at python.org
Sun Oct 28 12:17:10 EDT 2018


https://github.com/python/cpython/commit/a36f04cedbbbe776deb478114c1bc0e4a6fe9380
commit: a36f04cedbbbe776deb478114c1bc0e4a6fe9380
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-10-28T09:17:07-07:00
summary:

bpo-35089: Don't mention typing.io and typing.re (GH-10173)


https://bugs.python.org/issue35089
(cherry picked from commit c8a8d6b347d5a6899feb7c810d28f22f3cb151b8)

Co-authored-by: Sebastian Rittau <srittau at rittau.biz>

files:
A Misc/NEWS.d/next/Documentation/2018-10-28-16-51-31.bpo-35089._stCpS.rst
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index e80cd3f2d75c..915c3da3351c 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -780,32 +780,25 @@ The module defines the following classes, functions and decorators:
 
    .. versionadded:: 3.5.2
 
-.. class:: io
+.. class:: IO
+           TextIO
+           BinaryIO
 
-   Wrapper namespace for I/O stream types.
-
-   This defines the generic type ``IO[AnyStr]`` and subclasses ``TextIO``
-   and ``BinaryIO``, deriving from ``IO[str]`` and ``IO[bytes]``,
-   respectively. These represent the types of I/O streams such as returned by
+   Generic type ``IO[AnyStr]`` and its subclasses ``TextIO(IO[str])``
+   and ``BinaryIO(IO[bytes])``
+   represent the types of I/O streams such as returned by
    :func:`open`.
 
-   These types are also accessible directly as ``typing.IO``,
-   ``typing.TextIO``, and ``typing.BinaryIO``.
-
-.. class:: re
+.. class:: Pattern
+           Match
 
-   Wrapper namespace for regular expression matching types.
-
-   This defines the type aliases ``Pattern`` and ``Match`` which
+   These type aliases
    correspond to the return types from :func:`re.compile` and
    :func:`re.match`.  These types (and the corresponding functions)
    are generic in ``AnyStr`` and can be made specific by writing
    ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
    ``Match[bytes]``.
 
-   These types are also accessible directly as ``typing.Pattern``
-   and ``typing.Match``.
-
 .. class:: NamedTuple
 
    Typed version of namedtuple.
diff --git a/Misc/NEWS.d/next/Documentation/2018-10-28-16-51-31.bpo-35089._stCpS.rst b/Misc/NEWS.d/next/Documentation/2018-10-28-16-51-31.bpo-35089._stCpS.rst
new file mode 100644
index 000000000000..4a469290ad73
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2018-10-28-16-51-31.bpo-35089._stCpS.rst
@@ -0,0 +1,2 @@
+Remove mention of ``typing.io`` and ``typing.re``. Their types should be
+imported from ``typing`` directly.



More information about the Python-checkins mailing list