-
-
Notifications
You must be signed in to change notification settings - Fork 519
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
tox 4 does not support factor all conditionals as 3 #2747
Comments
This change is not just 4.0.13; it's any 4.0 version; the reporting claims otherwise, but I get the same behavior with 4.0. I'm surprised this worked in tox 3 because we use the , as an OR operator... So py27,py35 means the environment is py27 or py35, so we match. Then !py27,!py35 means not py27 or not py35, so both lines are valid. What would you expect the second conditional to explode to? Note, in tox 4, you can test this with:
Here are two more filter expressions that worked with 3.0 and are not parsed with [tox]
envlist = py{27,34,36}-django{15,16}-{sqlite,mysql}
[testenv]
deps =
sqlite-!py34: E2 # (same as the line above)
!py34-!py36: neither # use if neither py34 nor py36 are in the env name |
A PR trying to address this regression would be welcomed. |
The specific expression we used, Can you suggest an expression hat works with tox 4.0.13 and up that means "environment is NOT py27 AND NOT py35"? |
My test shows it doesn't work with 4.0.12 🤔 PR welcome. I don't plan to work on this. This is a free open source project. |
I can confirm this bug. Fox example zope.event uses:
With tox 4.0.12:
With tox 4.0.13:
|
To go a little bit deeper, this function tox/src/tox/config/loader/ini/factor.py Lines 70 to 81 in 9972a82
raises |
Confirmed as well, with 4.0.13 and 4.0.14 astropy jobs are failing on |
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Resolves #2747
We use factors to differentiate test setups like this:
This worked fine until version 4.0.13. Now the
py27
andpy35
environments match both the first and second condition, bothcommands_pre
are run.Environment
Provide at least:
pip list
of the host Python wheretox
is installed:The text was updated successfully, but these errors were encountered: