tox: tox 4 no longer creates session views for packages

Issue

CI with tox often begins by upgrading tox (with python -m pip install --upgrade pip tox), but in the last hour since the latest tox release, running tox with the latest version is causing an error. See a build log here which fails, even though previous builds succeeded (like this one). Excerpt below:

Run tox -e py310-test-alldeps-cov -- --remote-data
.pkg: install_requires> python -I -m pip install setuptools setuptools_scm wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: install_requires_for_build_sdist> python -I -m pip install setuptools_scm
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py310-test-alldeps-cov: install_package_deps> python -I -m pip install 'asdf>=2.7.4' 'asteval>=0.9.23' 'astropy>=4.3' astroquery 'bqplot-image-gl>=1.4.[11](https://github.com/spacetelescope/jdaviz/actions/runs/3641786210/jobs/6148140940#step:5:12)' 'bqplot>=0.[12](https://github.com/spacetelescope/jdaviz/actions/runs/3641786210/jobs/6148140940#step:5:13).36' 'echo>=0.5.0' 'glue-astronomy>=0.5.1' 'glue-core>=1.6.0' 'glue-jupyter>=0.[14](https://github.com/spacetelescope/jdaviz/actions/runs/3641786210/jobs/6148140940#step:5:15).2' 'gwcs>=0.[16](https://github.com/spacetelescope/jdaviz/actions/runs/3641786210/jobs/6148140940#step:5:17).1' idna 'ipygoldenlayout>=0.3.0' 'ipypopout>=0.0.11' 'ipysplitpanes>=0.1.0' 'ipyvue>=1.6' 'ipyvuetify>=1.7.0' 'ipywidgets<8.0' matplotlib packaging 'photutils>=1.4' pytest pytest-astropy pytest-tornasync 'pyyaml>=5.4.1' 'regions>=0.6' scikit-image 'sidecar>=0.5.1' 'specreduce<1.3.0,>=1.2.0' 'specutils>=1.9' 'traitlets>=5.0.5' 'vispy>=0.6.5' 'voila<0.4,>=0.3.5'
py310-test-alldeps-cov: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/jdaviz/jdaviz/.tox/.pkg/dist/jdaviz-3.2.dev[18](https://github.com/spacetelescope/jdaviz/actions/runs/3641786210/jobs/6148140940#step:5:19)1+gcd9da78c.tar.gz
py310-test-alldeps-cov: commands[0] .tmp/py310-test-alldeps-cov> jupyter --paths
py310-test-alldeps-cov: exit 2 (0.00 seconds) .tmp/py310-test-alldeps-cov> jupyter --paths
.pkg: _exit> python /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py310-test-alldeps-cov: FAIL code 2 (85.30=setup[85.30]+cmd[0.00] seconds)
  evaluation failed :( (85.85 seconds)

Environment

Provide at least:

  • OS: ubuntu-latest (github actions)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

I found the issue I think: change_dir says that the directory is created if it doesn’t exist, but that does not seem to be the case:

Change to this working directory when executing the test command. If the directory does not exist yet, it will be created (required for Windows to be able to execute any command).

with change_dir = foo the tests don’t run and show the error above.

When I do mkdir foo myself before, it works.

Definitely a bug 👍

Thanks for the quick response!

Hello! We’re trying to figure it out over at https://github.com/astropy/astropy/pull/14139 . @maxnoe thinks it might be the .tmp vs .temp renaming. In our case, we use https://github.com/OpenAstronomy/github-actions-workflows/ that always installs stable tox upstream for us, so we cannot control that. While I can suggest that they test against dev tox, it illustrates a case where downstream doesn’t always have control of which version of tox that gets installed.