-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "upgrade" and "upgrade-all" commands #59
Comments
"upgrade" is a trivial alias for "install --upgrade". Need to think a bit more
|
For the record, I think that seems like good idea, given the ability to For the matter of can_uninstall(), I agree.. this is probably handy to have
|
I'm not entirely unopposed to upgrade as an alias for install --upgrade. But upgrade-all requires you to figure out what is "upgradable". Probably one If we allow something like "zip import" (to bring a package from the parent I tried uninstalling an editable package with "pip uninstall" and it quite
|
Yeah, you're right that can_uninstall and can_upgrade are different. I would think if we had "pip import" we still wouldn't want to upgrade
|
+1 for this bug
|
Issue #167 was marked as a duplicate of this issue.
|
install -U This should upgrade upgrade all installed packages (including pip itself). If Of course it has high risk of failure -- if upgrading one of the packages
|
+1 for upgrade --all Why at the moment all Python module management facilities have to suck? Why no
|
I wouldn't mind taking a shot at an implementation, but first a few questions. Is the general consensus that a new "upgrade" command that supports a '--all' Running pip upgrade should only affect the environment it is running in. If
|
Kelsey: from my reading of the above discussion, I don't see any real
|
Carl: Cool, I will get started and update this ticket with the results.
|
While working on the upgrade command the following questions came up:
pip upgrade use cases and how to handle them:
requirement is not satisfied upgrade to the requested version. This includes
version if available.
some_other_package. My goals are to keep the upgrade command really simple. You can upgrade Thoughts?
|
I think "pip upgrade" should be an exact alias for "pip install --upgrade" as Upgrade --all will require some code for finding the list of currently
|
Carl, thanks for the reply. I have pretty much taken the path you have
|
Got most of the code done, just a little polish left before I post the code TODO:
Running pip using the upgrade command
|
Last set of questions (I hope):
For each non-editable item in the requirements file I would like to check the Any tips are welcome (currently looking at pip.req.parse_requirements)
Right now I am only adding packages to the upgrade list when:
|
Carl after re-reading your post, it seems I am doing more than what is
|
1 similar comment
Carl after re-reading your post, it seems I am doing more than what is
|
Yeah, it sounds like you're doing more than should be needed. Pip install The only real code to be written here is the code for "upgrade --all" to get
|
Yeah, I knew it. Well, I did learn alot. Even though not required for this I will re-factor and clean things up. Current changes in my fork on the https://bitbucket.org/khightower/pip/changeset/2bdc202b446c
|
I have stripped down the upgrade command per Carl's suggestions (I went to far It seems pip tries to download and re-install the package even when the Running pip upgrade command
-Wstrict-prototypes -fPIC -I/opt/OpenPython-2.7.1/include/python2.7 -c
build/temp.linux-x86_64-2.7/markupsafe/_speedups.o -o
|
Kelsey - Yeah, there are some bugs with install --upgrade; in particular you With upgrade --all, it seems reasonable to me that pip would upgrade itself
|
Thanks Carl, I will wrap this up and start looking at #13
|
If anyone has time please review my upgrade-command branch. In the meanwhile https://bitbucket.org/khightower/pip/src/fa7b2a6d2bf1/pip/commands/upgrade.py
|
@vababiy: i have tried your upgrade-command, but it seems not to work correctly... So i made a own one: |
@jedie i think you meant to direct your comment at @KHightower. @vbabiy migrated her comment to here but did not write the upgrade command. |
+1 |
@kelseyhightower Any progress? |
+1 |
+1! |
On 9/15/16, Nick Coghlan ***@***.***> wrote:
@RonnyPfannschmidt Windows users still outnumber Linux users ~18 to 1, and
they don't have anything comparable to a distro package management community
to fall back on at this point (while the core technology is there in recent
versions, the packaging and curation communities aren't). That means they're
a lot more reliant on user level tools like pip and conda to pick up the
slack.
Isn't then
conda update --all
good enough?
|
|
What about just pip-tools does it like this for |
Maybe we should bike shed once we have some sort of working
implementation... :)
…On Sun, Feb 12, 2017, 20:55 FichteFoll ***@***.***> wrote:
What about just pip install --upgrade without any package names or
specifiers? To easy to run accidentally?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#59 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADH7SfnSBflH8rK3nFLw1hvYBaovjbcGks5rbyRUgaJpZM4AJ4Py>
.
|
How about a version of |
whatever syntax will be used the most important thing is introducing this command, It's unbelievable that is still missing in meanwhile I suggest you to try |
@SMH17 It's entirely believable that it's still missing, as there are exactly zero commercial Python vendors formally providing funded development time to work on Python packaging usability improvements on behalf of their customers. So if you'd like to see the situation improve, it's likely that the most helpful thing you can personally do is to either encourage your Python support vendor to invest developer time in improving the tools you use, or if you don't have a support vendor yet, encourage your employer to pay one. |
As an additional piece of context regarding the lack of urgency around this issue, it's worth keeping in mind that the general recommendations are to
That doesn't mean the commands proposed here aren't useful, they're just markedly less valuable if the current working environment is already being maintained through |
It would be valuable to update the original description as I guess there have been some changes made to |
Hi everyone. I have broken some of my python package dependencies because the following command:
Why not change the default behaviour of the How about this ? |
@sebma I think that the default behaviour should not be changed. Maybe you could try using the |
@sebma, @aaossa, I'll have you both know that it has pretty much been decided already that the default upgrade strategy will change in the future (ref: #3871 (comment)). The necessary feature (i.e. the As @pradyunsg mentioned earlier, this issue is kind of a left-over. The first part is sort of handled by now (see my first paragraph) and the second part is the only reason why this package is still open, it seems. I don't know if a separate "upgrade-all" issue has been created since. |
I've released a nice interactive upgrader for requirements file: https://github.com/simion/pip-upgrader |
#4500 did this.
#4551 for discussion on this. Addressing the points made in the current top-post:
It has been decided against adding an upgrade command or making pip install upgrade already installed packages. pip now does have non-recursive upgrades by default, with the recursive behavior available behind
#4551 exists and it would be nice to have a fresh discussion on this; when #988 is done. @dstufft @xavfernandez @pfmoore Do any of you think this issue should be closed? Edit (05-18-2017): Punctuation + minor text added |
Seems reasonable. |
Hello all, https://gist.github.com/serafeimgr/b4ca5d0de63950cc5349d4802d22f3f0 |
Why not simply do this?
|
Because it's not that easy in reality since you may install versions that don't satisfy some of your other packages' dependencies. |
Based on and with thanks to @serafeimgr's gist, I've written a possibly-useful command-line tool, pip_upgrade_outdated; source on github. Feedback welcome. (See also this issue: Yes, the parallel execution is particularly dangerous, and, yes, this may break things. Nonetheless many people run something like this by hand all the time, so might find it useful.) |
Thank you for taking the time to build a complete solution. I think pipenv & pipfile is going to replace pip/requirements.txt anyway. |
@qoheniac |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
(Updated to reflect reality in April 2020)
This issue was initially scoped for changing the behavior of
pip install --upgrade
, by adding a newupgrade
command with a different behavior when upgrading packages. The older recursive "eager" default caused grief for many (#304) However, after a lot of discussion on this, the approach taken was to add the--upgrade-strategy
flag. The flag initially had a default of "eager" which was changed to a better default in #4500.The tracking issue for "upgrade all packages" functionality is #4551.
The text was updated successfully, but these errors were encountered: