pypa/pip — pull request #1109 by dstufft (2013-08-05 03:24:56+00:00)
Title: Colorize Log Output

This colorized all log output for logging levels >= WARN. It uses yellow for WARN and red for ERROR/FATAL.

It will intelligently disable coloring when it's not suitable (such as when piping to a file) and it *should* support colorization on Windows as well (this uses Colorama but I have not tested it).

It vendors the BSD licensed colorama package.

It also introduces a new a new logger method ``Log.deprecated`` which takes a position argument for the version that the deprecated item is slated to be removed in. It will then set the log level to WARN or ERROR based on how many versions until the deprecated item is slated to be removed (WARN is > 1, ERROR otherwise).

It also moves the warning messages introduced in dc559473e2667de130cd3ed4d57c4e125ee10d93 to the new ``Log.deprecated`` method.

This fixes #1099 but the ``Log.deprecated`` work depends on a resolution to the backwards compatibility question (Semver vs Django style). It is currently written to support Django style but could easily be adapted to Semver.

Here is a picture of the logged messages at the warn and error levels:

![Logged Errors](http://d.stufft.io/image/1T1e1F0F370o/Image%202013.08.04%2010%3A56%3A56%20PM.png)