On Mon, Nov 6, 2017 at 9:29 AM, Barry Scott <ba...@barrys-emacs.org> wrote: > On Saturday, 4 November 2017 20:22:25 GMT Guido van Rossum wrote: >> On Sat, Nov 4, 2017 at 7:05 AM, Nick Coghlan <ncogh...@gmail.com> wrote: >> > Perhaps typing could switch to being a bundled module, such that it >> > had its own version, independent of the Python standard library >> > version, but was still present by default in new installations? >> >> This is beginning to sound like the most attractive solution. We could >> possibly do away with typing_extensions. Are there precedents of how to >> bundle a module in this way? Or is it going to be another special case like >> pip? > > Is the outcome you want that you ship a version of typing with the python kit, > but if you install from pip it overrides the one shipped in the python kit? > > That would be a matter of being having a suitable sys.path/site config I > guess. pip folder before the bundled packages folder. > > If this is a mechanism that python kitting has then you would be able to > bundle other packages like requests or six as well as typing, but because > you can use pip to override the one shipped a user can optionally keep > up with the latest versions.
If this were to happen, I would be inclined to put these "bootstrap" modules into their own directory in sys.path, after the rest of the stdlib. Then someone who's paranoid about stdlib shadowing could put pip-installed modules after the bulk of the stdlib (thus preventing any third-party package from overriding "import random", for instance) but still update modules that are specifically intended for updating; plus it'd mean you can get a directory listing of that, and go grab all the "blessed by python.org as an extension of the stdlib" packages. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/