Messages about ignoring packages due to environment markers should not be on stderr #4876
Labels
auto-locked
Outdated issues that have been locked by automation
type: enhancement
Improvements to functionality
Uh oh!
There was an error while loading. Please reload this page.
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 thanstdout
, 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()
notlogger.warning()
, here:pip/src/pip/_internal/req/req_set.py
Line 69 in b9feb19
What I've run:
pip install
on that requirements fileExpected:
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:
The text was updated successfully, but these errors were encountered: