[issue38291] Unclear status of the typing.io and typing.re pseudo-modules in docs and runtime

New submission from dgelessus dgelessus+bugs.python.org@me.com:
According to bpo-35089 (and the GitHub issues linked there), the typing.io and typing.re modules should no longer be used. Starting with Python 3.6, the typing documentation no longer mentions the typing.io and typing.re modules, and instead documents their contents as part of the main typing module.
However, the typing module at runtime still supports typing.io and typing.re as before. Since these modules are not meant to be used anymore and are no longer documented, I would expect at least a DeprecationWarning when using them at runtime.
The documentation on this could also be a bit clearer. As long as the modules are still supported at runtime, I would expect the documentation to mention that they still exist, but shouldn't be used anymore. In its current state, the documentation is confusing when coming from Python 3.5 (where typing.io and typing.re were the only documented way to access IO, Pattern, etc., but accessing typing.IO and typing.Pattern directly also works at runtime).
---------- assignee: docs@python components: Documentation, Library (Lib) messages: 353356 nosy: dgelessus, docs@python priority: normal severity: normal status: open title: Unclear status of the typing.io and typing.re pseudo-modules in docs and runtime type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue38291 _______________________________________

Ivan Levkivskyi levkivskyi@gmail.com added the comment:
Guido, what is your final opinion on this?
---------- nosy: +gvanrossum, levkivskyi
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue38291 _______________________________________

Jelle Zijlstra jelle.zijlstra@gmail.com added the comment:
The documentation (https://docs.python.org/3.10/library/typing.html#typing.BinaryIO) now mentions the typing.io and typing.re namespaces.
I would prefer that they be deprecated and eventually completely removed. They don't work with most static type checkers. https://bugs.python.org/issue42001 makes the same points.
---------- nosy: +Jelle Zijlstra title: Unclear status of the typing.io and typing.re pseudo-modules in docs and runtime -> Deprecate the typing.io and typing.re pseudo-modules versions: +Python 3.10, Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue38291 _______________________________________

Change by Sebastian Rittau srittau@rittau.biz:
---------- nosy: +srittau
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue38291 _______________________________________
participants (4)
-
dgelessus
-
Ivan Levkivskyi
-
Jelle Zijlstra
-
Sebastian Rittau