forked from gevent/gevent
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore basepython for default factors (gevent#477) (gevent#841)
* Add 'ignore_basepython_conflict' option (gevent#477) tox provides a number of default factors - py27, py34, py35 etc. - that are tied to particular interpreter versions. It is possible to override these through individual sections or the global [testenv] section. For example, consider the following 'tox.ini' file: [tox] skipsdist = True minversion = 2.0 distribute = False envlist = py35,py27,pep8,py34-test [testenv] basepython = python3 install_command = pip install {opts} {packages} commands = python --version [testenv:py27] basepython = python2.7 Running any target except for 'py27' will result in the same interpreter being used. On Fedora 28 with the 'python3-tox' package: $ tox -qq -e py27 Python 2.7.15 $ tox -qq -e py35 Python 3.6.5 $ tox -qq -e py34-test Python 3.6.5 This is broken by design. Overriding these makes no sense and is a source of common misconfigurations, as noted in gevent#477. The only sane thing to do here is ignore the request and use the correct interpreter or raise a warning. There is merit to both approaches, so this functionality is exposed by way of a new global configuration option, 'ignore_basepython_conflict'.
- Loading branch information
1 parent
47454a7
commit d5b9c0a
Showing
9 changed files
with
189 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ dist | |
doc/_build/ | ||
tox.egg-info | ||
.tox | ||
.venv | ||
.cache | ||
.python-version | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Add ``ignore_basepython_conflict``, which determines whether conflicting | ||
``basepython`` settings for environments containing default factors, such as | ||
``py27`` or ``django18-py35``, should be ignored or result in warnings. This | ||
was a common source of misconfiguration and is rarely, if ever, desirable from | ||
a user perspective - by @stephenfin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.