-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
do not use setup.cfg file that does not have tox:tox namespace #1045
Comments
@williamjamir at the moment if we fail to find a configuration fail we stop with error and the message:
If you did not get it means you most probably had a tox.ini file discovered by following the rules from https://tox.readthedocs.io/en/latest/config.html#configuration-discovery. Furthermore, if you call tox with a verbose flag you'll see explicitly stated what config is used (we recommend passing at least one verbosity in CI to help debug when things fail):
The tools/checks are already there I think, you just need to use it. Let me know if you need anything else. |
Thanks for the answer @gaborbernat =)
On the documentation the following note is added:
My
Perhaps the existence of the |
Indeed it should, not sure how trivial it is to added will have a look. Feel free to shoot a pr if you have time for it. |
This now surprised me as well. In Fedora, we promote the use of I'll try to have a look on how to solve this, no timeline thou. |
When tox is invoked without a tox configuration file (and without command line options that could be used instead), it fails with: $ tox ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found This is useful: If there is no config, test didn't run and such error should not pass silently. However, until this commit, when there was a setup.cfg file it was considered as a tox config even when there was no [tox:tox] section: $ tox GLOB sdist-make: .../setup.py python create: .../.tox/python python inst: ... python installed: ... python run-test-pre: PYTHONHASHSEED='1234567890' ___________________________________ summary ____________________________________ python: commands succeeded congratulations :) That is not safe, because setup.cfg can exist even if there is no tox configuration in it and teh success creates a false sense of safety. To fix this and to match the behavior of pyproject.toml without a tox section, tox now skips setup.cfg, if there is no [tox:tox] section. Fixes tox-dev#1045
When tox is invoked without a tox configuration file (and without command line options that could be used instead), it fails with: $ tox ERROR: tox config file (either pyproject.toml, tox.ini, setup.cfg) not found This is useful: If there is no config, test didn't run and such error should not pass silently. However, until this commit, when there was a setup.cfg file it was considered as a tox config even when there was no [tox:tox] section: $ tox GLOB sdist-make: .../setup.py python create: .../.tox/python python inst: ... python installed: ... python run-test-pre: PYTHONHASHSEED='1234567890' ___________________________________ summary ____________________________________ python: commands succeeded congratulations :) That is not safe, because setup.cfg can exist even if there is no tox configuration in it and the success creates a false sense of safety. To fix this and to match the behavior of pyproject.toml without a tox section, tox now skips setup.cfg, if there is no [tox:tox] section. Fixes tox-dev#1045
Here #1642 |
Released via https://pypi.org/project/tox/3.19.0/ |
This update breaks system.cfg files that use [tox], rather than [tox:tox], giving the following error:
Was this intentional? |
I was following the documentation in here. |
Sorry for the brief comment previously. According to the docs, the configuration in |
I think it's intentional breaking here. |
Hi,
I would like to suggest a check to ensure that a
tox.ini
file is present when calling thetox
command.I'm saying this because by mistake I've named the file
tox.ini
as.tox.ini
and took me a time to figure it out the problem.The build had five stages:
Link for the Travis build with all stages listed
The stages py27, py36, py37 was marked as "successful", even though nothing was tested.
Link for the job py37
While the stages
linting
anddocs
were raising anError
I believe that this type of information leads to misinterpretation since the user could believe that the configuration is ok (because the py* was marked as successful) and the problem is related with the "linting/docs" stage.
The text was updated successfully, but these errors were encountered: