Repository: conda/conda

Issue:
confusing messages at downgrading
When I willfully downgrade a package, confusing dialogs are given related to dependency conflicts, possibly because the same dialog/logging is used when an automatic downgrade requirement was being determined:

```bash
(stable) └─❱❱❱ conda install pandas=0.19                                        +6295 8:05 ❰─┘
Fetching package metadata ...........
Solving package specifications: ..........

Package plan for installation in environment /Users/klay6683/miniconda3/envs/stable:

The following packages will be DOWNGRADED due to dependency conflicts:

    pandas: 0.20.1-np112py36_0 conda-forge --> 0.19.2-np112py36_1 conda-forge

Proceed ([y]/n)?
```

I think it would be preferable, that in the deliberate downgrade the messages should not say `due to dependency conflicts` and that this part is only added to the dialog when a dependency conflict was automatically found.

version: 4.2.13 on macOS


Discussion:
Seems to me the simplest thing for us to do here is to drop the "due to dependency conflicts." It's not clear to me we can reliably say that anyway.

Resolving patch:
diff --git a/conda/plan.py b/conda/plan.py
--- a/conda/plan.py
+++ b/conda/plan.py
@@ -235,7 +235,7 @@ def format(s, pkg):
             print(format(oldfmt[pkg] + arrow + newfmt[pkg], pkg))
 
     if downgraded:
-        print("\nThe following packages will be DOWNGRADED due to dependency conflicts:\n")
+        print("\nThe following packages will be DOWNGRADED:\n")
         for pkg in sorted(downgraded):
             print(format(oldfmt[pkg] + arrow + newfmt[pkg], pkg))
 


Test patch:
diff --git a/tests/test_plan.py b/tests/test_plan.py
--- a/tests/test_plan.py
+++ b/tests/test_plan.py
@@ -215,7 +215,7 @@ def test_display_actions():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython: 0.19.1-py33_0 --> 0.19-py33_0
 
@@ -241,7 +241,7 @@ def test_display_actions():
 
     cython:   0.19-py33_0  --> 0.19.1-py33_0
 
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     dateutil: 2.1-py33_1   --> 1.5-py33_0   \n\
 
@@ -268,7 +268,7 @@ def test_display_actions():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 --> 0.19-py33_0
     dateutil: 2.1-py33_1    --> 1.5-py33_0 \n\
@@ -356,7 +356,7 @@ def test_display_actions_show_channel_urls():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython: 0.19.1-py33_0 <unknown> --> 0.19-py33_0 <unknown>
 
@@ -382,7 +382,7 @@ def test_display_actions_show_channel_urls():
 
     cython:   0.19-py33_0  <unknown> --> 0.19.1-py33_0 <unknown>
 
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     dateutil: 2.1-py33_1   <unknown> --> 1.5-py33_0    <unknown>
 
@@ -409,7 +409,7 @@ def test_display_actions_show_channel_urls():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 <unknown> --> 0.19-py33_0 <unknown>
     dateutil: 2.1-py33_1    <unknown> --> 1.5-py33_0  <unknown>
@@ -440,7 +440,7 @@ def test_display_actions_show_channel_urls():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 my_channel --> 0.19-py33_0 <unknown> \n\
     dateutil: 2.1-py33_1    <unknown>  --> 1.5-py33_0  my_channel
@@ -497,7 +497,7 @@ def test_display_actions_link_type():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 --> 0.19-py33_0 (softlink)
     dateutil: 2.1-py33_1    --> 1.5-py33_0  (softlink)
@@ -547,7 +547,7 @@ def test_display_actions_link_type():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 --> 0.19-py33_0
     dateutil: 2.1-py33_1    --> 1.5-py33_0 \n\
@@ -597,7 +597,7 @@ def test_display_actions_link_type():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 --> 0.19-py33_0 (copy)
     dateutil: 2.1-py33_1    --> 1.5-py33_0  (copy)
@@ -655,7 +655,7 @@ def test_display_actions_link_type():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     cython:   0.19.1-py33_0 my_channel --> 0.19-py33_0 <unknown>  (copy)
     dateutil: 2.1-py33_1    <unknown>  --> 1.5-py33_0  my_channel (copy)
@@ -699,7 +699,7 @@ def test_display_actions_features():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     numpy: 1.7.1-py33_p0 [mkl] --> 1.7.0-py33_p0 [mkl]
 
@@ -776,7 +776,7 @@ def test_display_actions_features():
         display_actions(actions, index)
 
     assert c.stdout == """
-The following packages will be DOWNGRADED due to dependency conflicts:
+The following packages will be DOWNGRADED:
 
     numpy: 1.7.1-py33_p0 <unknown> [mkl] --> 1.7.0-py33_p0 <unknown> [mkl]