Why? What's wrong with pip install? Why complicate things? Your motivation is really weak here. "beneficial"? "difficult cases"?
On Sat, Oct 28, 2017 at 8:57 PM, Nick Coghlan <[email protected]> wrote: > Over on python-dev, the question of recommending MRAB's "regex" module > over the standard library's "re" module for more advanced regular > expressions recently came up again. > > Because of various logistical issues and backwards compatibility risks, > it's highly unlikely that we'll ever be able to swap out the current _sre > based re module implementation in the standard library for an > implementation based on the regex module. > > At the same time, it would be beneficial to have a way to offer an even > stronger recommendation to redistributors that we think full-featured > general purpose Python scripting environments should offer the regex module > as an opt-in alternative to the baseline re feature set, since that would > also help with other currently difficult cases like the requests module. > > What I'm thinking is that we could make some relatively simple additions > to the `ensurepip` and `venv` modules to help with this: > > 1. Add a ensurepip.RECOMMENDED_PACKAGES mapping keyed by standard library > module names containing dependency specifiers for recommended third party > packages for particular tasks (e.g. "regex" as an enhanced alternative to > "re", "requests" as an enhanced HTTPS-centric alternative to > "urllib.request") > > 2. Add a new `install_recommended` boolean flag to ensurepip.bootstrap > > 3. Add a corresponding `--install-recommended flag to the `python -m > ensurepip` CLI > > 4. Add a corresponding `--install-recommended flag to the `python -m venv` > CLI (when combined with `--without-pip`, this would run pip directly from > the bundled wheel file to do the installations) > > We'd also need either a new informational PEP or else a section in the > developer guide to say that the contents of `ensurepip.RECOMMENDED_PACKAGES` > are up to the individual module maintainers (hence keying the mapping by > standard library module name, rather than having a single flat list for the > entire standard library). > > For redistributors with weak dependency support, these reference > interpreter level recommendations could become redistributor level > recommendations. Redistributors without weak dependency support could still > make a distinction between "default" installations (which would include > them) and "minimal" installations (which would exclude them). > > Folks writing scripts and example code for independent distribution (i.e. > no explicitly declared dependencies) could then choose between relying on > just the standard library (as now), or on the standard library plus > independently versioned recommended packages. > > Cheers, > Nick. > > -- > Nick Coghlan | [email protected] | Brisbane, Australia > > _______________________________________________ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
