[Python-ideas] High time for a builtin function to manage packages (simply)?

Giovanni Cannata cannatag at gmail.com
Sat Sep 5 20:03:34 CEST 2015

In reading this discussion with interest. pip and PyPI are what make the Python ecosystem live and vital. 

Especially PyPI is what surprises any Python newbie. A single repository freely available where to find valuable ready-to-use software, accessible from anywhere, it's hard to believe if you are, for example, a Java or .NET developer. 

But are you aware of the problems that PyPI is currently suffering? It's about two weeks that its searching engine is faulty and doesn't find many packages, even if they are available.

This is a very bad thing because PyPI is the frontgate to the Python system for many people, more than the python.org site itself.

I think that PyPI should deserve a special attention for the sake of the whole Python community.

-------- Messaggio originale --------
Da:Donald Stufft <donald at stufft.io>
Inviato:Sat, 05 Sep 2015 18:38:29 +0200
A:Steven D'Aprano <steve at pearwood.info>,python-ideas at python.org
Oggetto:Re: [Python-ideas] High time for a builtin function to manage packages (simply)?

>On September 5, 2015 at 11:40:17 AM, Steven D'Aprano (steve at pearwood.info) wrote:
>> On Sat, Sep 05, 2015 at 04:08:24PM +0900, Stephen J. Turnbull wrote:
>> > Steven D'Aprano writes:
>> >
>> > > You say "of course", but did you actually look at the python-list
>> > > archives? If you do, you will see posts like these two within the last
>> > > 24 hours:
>> >
>> > So let's fix it, already![1] Now that we have a blessed package
>> > management module, why not have a builtin that handles the simple
>> > cases? Say
>> >
>> > def installer(package, command='install'):
>> > ...
>> Python competes strongly with R in the scientific software area, and R
>> supports a built-in to do just that:
>> https://stat.ethz.ch/R-manual/R-devel/library/utils/html/install.packages.html 
>I don't know anything about R, but a built in function is a bad idea. It'll be
>a pretty big footgun I believe. For instance, if you already have requests 2.x
>installed and imported, and then you run the builtin and install something
>that triggers requests 1.x to be installed you'll end up with your Python in
>an inconsistent state. You might even end up importing something from requests
>and ending up with modules from two different versions of requests ending up
>in sys.modules. In addition, the standard library is not really enough to
>accurately install packages from PyPI. You need a real HTML parser that can
>handle malformed input safely, an implementation of PEP 440 versions and
>specifiers (currently implemented in the "packaging" library on PyPI), you also
>need some mechanism for inspecting the currently installed set of packages, so
>you need something like pkg_resources available to properly support that.
>Donald Stufft
>PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
>Python-ideas mailing list
>Python-ideas at python.org
>Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150905/5d4d51a0/attachment.html>

More information about the Python-ideas mailing list