-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
warn if user creates an environment that would conflict with an internal directory (dist/distshare/packaging) #696
Comments
Fair point, I don't think this would be backward incompatible upfront as the workdir is kinda private; could prove breaking with users scripts. I would probably prefer having the other way around, e.g. having a |
fwiw, the longer we make the paths for envdirs the more likely we'll run into shebang length limits on posix platforms |
I am -1 on changing this for the same reason that @asottile mentioned. The 80 char limit is there to stay for a long time, so we better make sure we don't add to the length of the path more than we already do. To prevent the above error and make it clearer to users we could add a check that makes sure that no envname is chosen that is "reserved" by tox. This is |
Just as a note, tox should probably check conflicting paths instead of conflicting names. eg, if a user sets |
I haven't dug much so this may be a silly idea. Instead of But yes, at least an error message on anything using those non-env directories. |
* Add pytest and tox #184 * Try again for both 3.4 and 3.7 on Travis * Add PyPy and PyPy3.5 on Travis * Trigger for AppVeyor * Try again on build version setting for AppVeyor * add missing get_version.py * Separate wheel build on AppVeyor * Print sys.version for each Tox env * Drop 32/64 on AppVeyor * fix * Add pypy/pypy3 for AppVeyor * Print sys.version for the AppVeyor virtualenv * Switch to 3.7/venv on AppVeyor * Allow pypy3 to fail on AppVeyor for now Could fork https://github.com/kirbyfan64/python.pypy * fix * fix * Trigger for AppVeyor * Attempt to add wheel job on Travis * Revert "Attempt to add wheel job on Travis" This reverts commit f308893. * Try again for a wheel job on Travis * Add coverage.py/codecov.io * Add back old tests on Travis * and old tests for 2.7 too * correct old tests for 3.7 * sdist as well * and collect sdist as well on AppVeyor * set envdir for dist tox target tox-dev/tox#696 * CI build dist first * kick ci
I would say that we'll keep things as they are for backward compatibility. However, we'll warn if you try to define an environment with the reserved name. |
Problem
Some testenv names may unintentionally conflict with other directories created in the
toxworkdir
. For example, I recently wanted to add a specific build for testing the distribution, naturally naming itdist
. My tox.ini looked something like:Running
tox -e dist
generating the following error, which was a little confusing:The issue was that the sdist was being built in the
dist
directory, which conflicted with thedist
testenv.Proposed changes
envdir
to something like{toxworkdir}/venvs/{envname}
. idk if this would be considered backwards incompatible.envdir
to{toxworkdir}/venvs/{envname}
.This isn't exactly a high priority issue or anything. The immediate fix is to just change the
envdir
, as demonstrated above.The text was updated successfully, but these errors were encountered: