Repository: pypa/pip

Issue:
Messages about ignoring packages due to environment markers should not be on stderr
* Pip version: 9.0.1
* Python version: 2.7.14
* Operating system: Ubuntu 16.04

### Description:

In one or our projects, we've added environment marker specifiers to our requirements file, such that the same file can be used with both Python 2 and 3 (as part of our gradual transition to Python 3). 

Unfortunately the log output about skipping this package is output to `stderr` rather than `stdout`, which causes tools like Vagrant to output it red text compared to the green text of stdout. This confuses contributors to our project, since they think the provision didn't complete successfully, when in fact these messages are entirely expected and not an error.

IMO this output should be on stdout instead, by using `logger.info()` not `logger.warning()`, here:
https://github.com/pypa/pip/blob/b9feb191a90e6ed4ef376d41ea9c1a896861f65b/src/pip/_internal/req/req_set.py#L69

### What I've run:

1. Create a requirements file containing:
```
requests==2.18.4
aiohttp==2.3.2; python_version >= '3'
```
2. Using Python 2, run `pip install` on that requirements file

### Expected:
There is nothing output on stderr, and stdout includes:
`Ignoring aiohttp: markers 'python_version >= "3"' don't match your environment`

### Actual:
stderr includes:
`Ignoring aiohttp: markers 'python_version >= "3"' don't match your environment`

Example of the end result when being run via tooling that colours console output:

![pip-marker-stderr](https://user-images.githubusercontent.com/501702/33022729-04f4ff60-cdfe-11e7-8cc8-c250dba6d632.png)



Discussion:
This would also avoid issues like #4826.

Resolving patch:
diff --git a/src/pip/_internal/req/req_set.py b/src/pip/_internal/req/req_set.py
--- a/src/pip/_internal/req/req_set.py
+++ b/src/pip/_internal/req/req_set.py
@@ -59,16 +59,16 @@ def add_requirement(self, install_req, parent_req_name=None,
             already be added. Note that None implies that this is a user
             supplied requirement, vs an inferred one.
         :param extras_requested: an iterable of extras used to evaluate the
-            environement markers.
+            environment markers.
         :return: Additional requirements to scan. That is either [] if
             the requirement is not applicable, or [install_req] if the
             requirement is applicable and has just been added.
         """
         name = install_req.name
         if not install_req.match_markers(extras_requested):
-            logger.warning("Ignoring %s: markers '%s' don't match your "
-                           "environment", install_req.name,
-                           install_req.markers)
+            logger.info("Ignoring %s: markers '%s' don't match your "
+                        "environment", install_req.name,
+                        install_req.markers)
             return []
 
         # This check has to come after we filter requirements with the


Test patch:
diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py
--- a/tests/functional/test_install.py
+++ b/tests/functional/test_install.py
@@ -1202,10 +1202,10 @@ def test_basic_install_environment_markers(script):
         )
     """))
 
-    res = script.pip('install', '--no-index', pkga_path, expect_stderr=True)
+    res = script.pip('install', '--no-index', pkga_path)
     # missing_pkg should be ignored
     assert ("Ignoring missing-pkg: markers 'python_version == \"1.0\"' don't "
-            "match your environment") in res.stderr, str(res)
+            "match your environment") in res.stdout, str(res)
     assert "Successfully installed pkga-0.1" in res.stdout, str(res)
 
 
diff --git a/tests/functional/test_install_reqs.py b/tests/functional/test_install_reqs.py
--- a/tests/functional/test_install_reqs.py
+++ b/tests/functional/test_install_reqs.py
@@ -484,11 +484,10 @@ def test_install_unsupported_wheel_link_with_marker(script):
     result = script.pip(
         'install', '-r', script.scratch_path / 'with-marker.txt',
         expect_error=False,
-        expect_stderr=True,
     )
 
     assert ("Ignoring asdf: markers 'sys_platform == \"xyz\"' don't match "
-            "your environment") in result.stderr
+            "your environment") in result.stdout
     assert len(result.files_created) == 0