Skip to content

Switch default upgrade strategy to only-if-needed #4500

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

Merged
merged 2 commits into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ strategies supported:
the new parent requirements
- ``only-if-needed``: upgrades a dependency only if it does not satisfy the new
parent requirements
Currently, the default strategy is ``eager``, which was the strategy prior to
the ``--upgrade-strategy`` option being added.

The default strategy is ``only-if-needed``. This was changed in pip 10.0 due to
the breaking nature of ``eager`` when upgrading conflicting dependencies.

As an historic note, an earlier "fix" for getting the ``only-if-needed``
behaviour was::
Expand Down
1 change: 1 addition & 0 deletions news/4500.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch the default upgrade strategy to be 'only-if-needed'
2 changes: 1 addition & 1 deletion pip/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __init__(self, *args, **kw):
cmd_opts.add_option(
'--upgrade-strategy',
dest='upgrade_strategy',
default='eager',
default='only-if-needed',
choices=['only-if-needed', 'eager'],
help='Determines how dependency upgrading should be handled '
'(default: %(default)s). '
Expand Down