Skip to content

Commit

Permalink
Remove tox envdir configuration broken in tox 4
Browse files Browse the repository at this point in the history
Our tox configuration tries to reuse tox environment directories, in
order to (potentially) save time installing dependencies for different
tasks. This worked in tox 3 but is broken in tox 4, and is explicitly
discouraged by the tox developers, see

https://tox.wiki/en/latest/upgrading.html#reuse-of-environments
tox-dev/tox#2788

This behavior is observable when running tox here, as you'll see
messages like this:

unittest: recreate env because env type changed from {'name': 'validate-migrations', 'type': 'VirtualEnvRunner'} to {'name': 'unittest', 'type': 'VirtualEnvRunner'}
unittest: remove tox env folder /Users/chosaka/Projects/consumerfinance.gov/.tox/unittest

This commit removes our tox envDir directives.
  • Loading branch information
chosak committed Oct 10, 2024
1 parent 0f901d6 commit 0b8e40e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ commands=
[testenv:unittest]
# Invoke with: tox -e unittest
recreate=False
envdir={toxworkdir}/unittest
deps=
{[unittest-config]deps}
commands={[unittest-config]commands}
Expand All @@ -105,7 +104,6 @@ commands={[unittest-config]commands}
[testenv:lint]
# Invoke with: tox -e lint
recreate=False
envdir={toxworkdir}/lint
deps={[lint-config]deps}
commands={[lint-config]commands}

Expand Down Expand Up @@ -134,7 +132,6 @@ commands=
# Invoke with: tox -e validate-migrations
# Ensure that we're not missing any migations
recreate=False
envdir={toxworkdir}/unittest
changedir={[unittest-config]changedir}
deps=
{[unittest-config]deps}
Expand Down Expand Up @@ -164,7 +161,6 @@ commands=
# NOTE: Requires gettext. Will overwrite any existing
# */locale/*/LC_MESSAGES/django.po files.
recreate=False
envdir={toxworkdir}/unittest
changedir={[unittest-config]changedir}
deps=
{[unittest-config]deps}
Expand Down

0 comments on commit 0b8e40e

Please sign in to comment.