This essentially allows me to do an overall check general check by running the tests using pytest's `-k basic` syntax. Given that I like running tests often and that, in general, I make typos more often than changes that break core functionality, I think this will reduce cycle times for me.
* Add a global option to disable colors
This is a fix for issue #2449
All it does is simply add a global option --no-color
Internally it switches ColorizedStreamHandler to StreamHandler if
this flag is detected.
* Fix lint errors
* not sure it makes the code more readable though ...
* Fix typo
* Choose logging class before assigning
* As requested per review
* Make the code shorter and easier to follow
* Be polite to followers, add commas
* Add functional test for the --no-color output
* Better detection of windows
* Fix fragile tests - can't trust script --quiet
* The version found in Travis-CI does not respect this flag
It added a prefix line and suffix line found if one does not
add the flag --quiet (script from util-linux 2.26.2).
As such the out put is:
Script started on Fri 27 Oct 2017 07:17:30 AM CEST
\x1b[31mCannot uninstall requirement noSuchPackage, not installed\x1b[0m\n
Script done on Fri 27 Oct 2017 07:17:31 AM CEST
With this change, the test should pass, and is hopefully more stable.
* Simplify testing for color or no-color
pip uninstall no longer aborts if a package is not installed; instead
it prints a warning that the package is not installed and it is
skipping the uninstallation of it for this reason.
Installed files are recorded by Pip in the order the underlying tool
(Distutils, Setuptools, ...) recorded them.
Unfortunately, at least Setuptools doesn't record them in a
deterministic order in the case of a directory being installed, as it
uses os.walk to find the list of files.
We could fix all those underlying tools to record their files in a
deterministic order in all situations. But fixing it once here in Pip
for all tools is certainly simpler and more future-proof.
This makes the installation more reproducible, and therefore more
verifiable.
* Add `--retry-status <HTTP code>` to allow specifying custom HTTP staus codes to retry on.
This is useful for AWS S3 or Cloudflare, which at times return codes other than 503 for
itermitent failures.
* stripping option related code, hardcoding the statuses
* Reword the news file
* changing ndash to regular ascii dash
* Add failing tests for issue #1139 re: --force-reinstall.
* Address issue #1139: make --force-reinstall not require --upgrade.
* Address review comments.
* Address @xavfernandez's review comments.
This makes the new tests not require network access.
* Add failing test for issue #4507.
* Add looks_like_hash() with tests.
* Add news file.
* Address issue #4507 by using looks_like_hash().
* Tweak warning text.
* Fix test after rebasing.
* Remove extra line.
* Add the RevOptions class, and test.
* Start using the RevOptions class.
* Add news file.
* Update for mypy.
* Fix test after rebasing.
* Address @xavfernandez's review comments.