diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 6d5d9a1e355..daff8a3e2d6 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -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:: diff --git a/news/4500.feature b/news/4500.feature new file mode 100644 index 00000000000..5157c0fa87c --- /dev/null +++ b/news/4500.feature @@ -0,0 +1 @@ +Switch the default upgrade strategy to be 'only-if-needed' diff --git a/pip/commands/install.py b/pip/commands/install.py index 433400f0ff2..ac0e88a03eb 100644 --- a/pip/commands/install.py +++ b/pip/commands/install.py @@ -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). '