[Python-Dev] Remove typing from the stdlib (original) (raw)

Donald Stufft donald at stufft.io
Mon Nov 6 19:35:22 EST 2017


On Nov 6, 2017, at 4:35 AM, Paul Moore <p.f.moore at gmail.com> wrote:

1. Without typing available, some programs using type annotations won't run. That is, using type annotations (a test-time/development-time feature) introduces a runtime dependency on typing, and hence introduces an extra deployment concern (unlike other development-type features like test frameworks). 2. For some people, if something isn't in the Python standard library (technically, in a standard install), it's not available (without significant effort, or possibly not at all). For those people, a runtime dependency on a non-stdlib typing module means "no use of type annotations allowed". 3. Virtual environments typically only include the stdlib, and "use system site-packages" has affects more than just a single module, so bundling still has issues for virtualenvs - and in the packaging tutorials, we're actively encouraging people to use virtualenvs. We (python-dev) can work around this issue for venv by auto-installing typing, but that still leaves virtualenv (which is critically short of resources, and needs to support older versions of Python, so a major change like bundling typing is going to be a struggle to get implemented).

Maybe we just need to fully flesh out the idea of a "Python Core" (What exists now as “Python”) and a “Python Platform” (Python Core + A select set of preinstalled libraries). Then typing can just be part of the Python Platform, and gets installed as part of your typical installation, but is otherwise an independent piece of code. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171106/efd1b9c9/attachment-0001.html>



More information about the Python-Dev mailing list