From 00726e51ade10c7e3535811eb700418725244230 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 4 May 2021 03:02:49 -0700 Subject: bpo-38352: Add to typing.__all__ (GH-25821) (#25885) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds IO, TextIO, BinaryIO, Match, and Pattern. Co-authored-by: Ɓukasz Langa Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit b11557973476963f7c0fd0041eac175bc0d4c514) Co-authored-by: Jelle Zijlstra --- Lib/typing.py | 7 +++++++ Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst diff --git a/Lib/typing.py b/Lib/typing.py index 3556b8a..123fbc2 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -95,6 +95,13 @@ __all__ = [ 'NamedTuple', # Not really a type. 'TypedDict', # Not really a type. 'Generator', + + # Other concrete types. + 'BinaryIO', + 'IO', + 'Match', + 'Pattern', + 'TextIO', # One-off things. 'AnyStr', diff --git a/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst b/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst new file mode 100644 index 0000000..bf8fe75 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-05-02-13-54-25.bpo-38352.N9MlhV.rst @@ -0,0 +1,2 @@ +Add ``IO``, ``BinaryIO``, ``TextIO``, ``Match``, and ``Pattern`` to +``typing.__all__``. Patch by Jelle Zijlstra. -- cgit v0.12