-
-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken/incompatible --skip-missing-interpreters false
behavior since 4.1.2
#2811
Comments
I'll try to fix |
why with |
I tested with tox<4.1.2 and with
Something is wrong with an editable installation |
Yes, that seems to be another bug, it apparently throws that for interpreters that are not present. But I thought I'd try to keep the report in scope and have just one thing in it. |
* Update swift from branch 'master' to f77172e2ad6fef4b226637b8ae099a6faf810978 - CI: pin tox at the project level No sooner do we fix the gate than tox has a new release that breaks it again. Let's give them a bit to settle down; in the mean time, stick with 3.x. See tox-dev/tox#2811 Also simplify our warning suppressions. The message filter is a regex, so any prefix of the message will suffice. This allows us to also drop a new message seen on CentOS 8: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6. As we've previously seen with cryptography warnings, this can slow down our probe tests to the point that they time out. Change-Id: I316170442c67c1b4a5b87f9a1168cc04ca2417b8
No sooner do we fix the gate than tox has a new release that breaks it again. Let's give them a bit to settle down; in the mean time, stick with 3.x. See tox-dev/tox#2811 Also simplify our warning suppressions. The message filter is a regex, so any prefix of the message will suffice. This allows us to also drop a new message seen on CentOS 8: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6. As we've previously seen with cryptography warnings, this can slow down our probe tests to the point that they time out. Change-Id: I316170442c67c1b4a5b87f9a1168cc04ca2417b8
Patching like this would fix the problem with use_develop def child_pkg_envs(self, run_conf: EnvConfigSet) -> Iterator[PackageToxEnv]:
- if run_conf["package"] == "wheel":
+ if run_conf["package"] in {"wheel", "editable"}:
env = self._wheel_build_envs.get(run_conf["wheel_build_env"])
if env is not None and env.name != self.name:
yield env but tox would fail with default |
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
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
* Update neutron from branch 'master' to d59bf5ff6c75c9f32129cd4ee49c2acb23e8bb9c - Temporary update envlist for tox4 tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Once [1] is fixed we can update the list as per default supported py3 version for a release. [1] tox-dev/tox#2811 Change-Id: I3afc539c59f223338920d7fd59f0df76e842ece1
tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Once [1] is fixed we can update the list as per default supported py3 version for a release. [1] tox-dev/tox#2811 Change-Id: I3afc539c59f223338920d7fd59f0df76e842ece1
Resolve the following warnings: tox.tox_env.errors.Fail: pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS' Also, reduce down the envlist as tox 4 when run in OpenStack CI is also attempting to validate interpreters utilizing the --skip-missing-interpreters=false setting [1]. Finally, fix up the integration job so that it passes on Ubuntu 22.04. This necessitates removing any Python 2-based dependencies used in the these jobs (since these are no longer available on Ubuntu 22.04) and removing tests for pip versions that are not compatible with Python 3.10 (the Python version found on Ubuntu 22.04). [1] tox-dev/tox#2811 Change-Id: Ib4dbe4e09e269219c08a87f6fb64ad9628b5864a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Update pbr from branch 'master' to 491ce1ab095b122b442de1ce662ebc2e29d27de3 - Update tox.ini to work with tox 4 Resolve the following warnings: tox.tox_env.errors.Fail: pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS' Also, reduce down the envlist as tox 4 when run in OpenStack CI is also attempting to validate interpreters utilizing the --skip-missing-interpreters=false setting [1]. Finally, fix up the integration job so that it passes on Ubuntu 22.04. This necessitates removing any Python 2-based dependencies used in the these jobs (since these are no longer available on Ubuntu 22.04) and removing tests for pip versions that are not compatible with Python 3.10 (the Python version found on Ubuntu 22.04). [1] tox-dev/tox#2811 Change-Id: Ib4dbe4e09e269219c08a87f6fb64ad9628b5864a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Update neutron-lib from branch 'master' to 2ce390093be7bb722feddc81a770d878ede15dfd - Merge "Update envlist for tox4" - Update envlist for tox4 tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Even though [1] is fixed we are still seeing this failure. [1] tox-dev/tox#2811 Also updated basepython to use TOX_PYTHON if set. Change-Id: I18765db9682fced05e8441a1e2122f9f814cd31b
tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Even though [1] is fixed we are still seeing this failure. [1] tox-dev/tox#2811 Also updated basepython to use TOX_PYTHON if set. Change-Id: I18765db9682fced05e8441a1e2122f9f814cd31b
tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Even though [1] is fixed we are still seeing this failure. [1] tox-dev/tox#2811 Also had to add "ignore_basepython_conflict = True". Change-Id: I351870695b1c6706888d8a51fa33ea0fcbc63cd7
* Update neutron-specs from branch 'master' to e5e141f134e88703d2a25909ea22c7627f9a6fb7 - Update envlist for tox4 tox4 even when running specific env with -e option tries to find python version for all envs defined in envlist[1] when running with --skip-missing-interpreters=false and fails if interpreter missing for any of the env. With py38 in envlist it tries to find python3.8 which is not available in ubuntu-jammy by default and fails, hence use generic version instead i.e py3 to handle it. Even though [1] is fixed we are still seeing this failure. [1] tox-dev/tox#2811 Also had to add "ignore_basepython_conflict = True". Change-Id: I351870695b1c6706888d8a51fa33ea0fcbc63cd7
Issue
Since tox 4.1.2,
tox --skip-missing-interpreters false -e someenv
seems to want interpreters present also for envs that are not invoked.Up to 4.1.1, since from I don't remember when (3.x a long time ago), this used to work the way I'd assume: fail on missing interpreters only for environments that are actually going to be used. 4.1.2..4.1.3 have the problem.
Environment
Provide at least:
pip list
of the host Python wheretox
is installed:Output of running tox
Provide the output of
tox -rvv
:(please note the actual invoked command has additionally
--skip-missing-interpreters false -e py310
)Minimal example
If possible, provide a minimal reproducer for the issue:
tox.ini producing the above:
The text was updated successfully, but these errors were encountered: