From 8151577b7559a5ba11afaca836edba1fa4a146cf Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sun, 5 Feb 2023 15:35:41 +0000 Subject: [PATCH] CI: Limit to Tox < 4.0 to avoid plugin incompatibility I'm abandoning tox-factor because having any [tox] requires = ... causes tox 3.x to create an isolated virtualenv for running tox itself. Since Tox 4.x was released that virtualenv gets it, which is incompatible with the tox-factor plugin. e.g. ``` Traceback (most recent call last): File "/Users/runner/work/1/s/.tox/.tox/lib/python3.10/site-packages/tox_factor/compat.py", line 2, in from tox.config.parallel import ENV_VAR_KEY_PUBLIC as TOX_PARALLEL_ENV ModuleNotFoundError: No module named 'tox.config.parallel' ``` --- .ci/azure-pipelines-steps.yml | 9 ++++++++- tox.ini | 2 -- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.ci/azure-pipelines-steps.yml b/.ci/azure-pipelines-steps.yml index f4570744..6aeeca93 100644 --- a/.ci/azure-pipelines-steps.yml +++ b/.ci/azure-pipelines-steps.yml @@ -1,3 +1,10 @@ +# Each step entry runs a task (Azure Pipelines analog of an Ansible module). +# https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/?view=azure-pipelines&viewFallbackFrom=azure-devops#tool + +# `{script: ...}` is shorthand for `{task: CmdLine@, inputs: {script: ...}}`. +# https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-script?view=azure-pipelines +# https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/cmd-line-v2?view=azure-pipelines + steps: - task: UsePythonVersion@0 displayName: Install python @@ -11,7 +18,7 @@ steps: displayName: Install build deps condition: and(eq(variables['python.version'], ''), eq(variables['Agent.OS'], 'Linux')) -- script: python -mpip install tox +- script: python -mpip install "tox<4.0" displayName: Install tooling - script: python -mtox -e "$(tox.env)" diff --git a/tox.ini b/tox.ini index 43170f9f..da710933 100644 --- a/tox.ini +++ b/tox.ini @@ -42,8 +42,6 @@ envlist = py{27,36,310}-mode_mitogen-distro_debian{9,10,11}, py{27,36,310}-mode_mitogen-distro_ubuntu{1604,1804,2004}, report, -requires = - tox-factor [testenv] basepython =