[SciPy-User] Opportunity to contribute: 'pip upgrade'

Nathaniel Smith njs at pobox.com
Sat Oct 17 02:19:26 EDT 2015


Hi all,

Just wanted to bring this to the attention of a wider audience --

Right now, if you're using pip to manage packages in a virtualenv,
then upgrading to a new version of some package is *super annoying*,
because you run

pip install -U <whatever package>

and then it starts upgrading not just the package you requested, but
all the packages that it depends on. And if one of those packages is
numpy or scipy or whatever, then suddenly your laptop is overheating
and what should have been a 10 second process takes an hour and might
fail and arrrghh frustrating. Then this also has nasty knock-on
effects at the ecosystem level, because it motivates lots of numerical
python packages to simply lie about what their dependencies are, on
the theory that 'pip install -U' can't mess up a dependency that it
can't see. Which resolves the immediate problem, but is obviously not
a good long-term solution.

>From some recent discussions on distutils-sig, one outcome was that
the pip maintainers are actually totally happy to fix this if anyone
wants to write a patch -- basically the idea would be to add a 'pip
upgrade' command that works the way you'd expect (only upgrades the
named package, plus whatever other packages are minimally required in
order to satisfy its new dependencies -- basically the equivalent of
'pip install foo=<latest version>'), and deprecate 'install -U':

    https://github.com/pypa/pip/issues/59#issuecomment-147149208

So if anyone is feeling inspired to make a highly-visible fix to one
of the most-widely-used Python programs, and earn the undying
gratitude of lots of maintainers and users, then writing a patch to
implement 'pip upgrade' and submitting it upstream would be a great
opportunity for that ;-)

-n

-- 
Nathaniel J. Smith -- http://vorpus.org



More information about the SciPy-User mailing list