forked from tox-dev/tox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore missing interpreters when classifying env type
We now separate environments into either run or packaging environments [1]. As noted in 'tox.session.env_select.EnvSelector._defined_envs' [2], the name of the environment is not enough to determine what type of environment it is and we must actually build the environment and inspect it. This allows us to prevent users *running* these packaging environments (e.g. 'tox -e .pkg'). Part of this process of building an environment is validating the base python. If this validation fails (i.e. the Python version does not exist), we will raise 'tox.tox_env.python.api.NoInterpreter'. We were not handling this exception, and thus the process of determining the types of each environment would cause a failure if any environment requested a Python version we did not support, even if we weren't actually trying to run this environment. The fix for this is simple: handle the exception and simply ignore these unsupported environments. While we're here, fix some issues with an existing test that were noticed while adding new tests. [1] https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance [2] https://github.com/tox-dev/tox/blob/af35384bb2ee/src/tox/session/env_select.py#L173 Signed-off-by: Stephen Finucane <stephen@that.guru> Closes: tox-dev#2811
- Loading branch information
1 parent
8457a43
commit ac5dcb3
Showing
4 changed files
with
43 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
The combination of ``usedevelop = true`` and ``--skip-missing-interpreters=false`` will no longer fail for environments | ||
that were *not* invoked. |
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
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 |
---|---|---|
|
@@ -142,6 +142,7 @@ replacer | |
repo | ||
reqs | ||
retann | ||
retcode | ||
rfind | ||
rpartition | ||
rreq | ||
|