Replies: 1 comment 2 replies
-
I strongly disagree with that form being anti-pattern.
I consider this a strong feature. Who does not update the envlist matrix effectively means the project has not been validated with other versions. The fact that you need to update tox.ini is an explicit statement that we checked and this project does support version xy.
I consider this an anti-pattern and I'm willing to document this in the README. The Python interpreter is not semver versioned, so the fact that a project works with version pyxy does not offer any guarantees that pyx(y+/-1) is also suppored. Generally CPython deprecates something in version a, and then removes it in version a + 2. This makes it non-semver, and only validating with the major version offers no guarantees that any other version will work.
What is the current one here? The tox version? This at worst just needs to be documented.
The like format you specified is already supported and documented.
We do raise errors when we detect this. At worst we just need to improve the detection logic, for this we need specific examples where the current case breaks.
This is hard to do and underspecified. How do you even know what versions are available (other than the tox owns)? If the tox ones do not satisfy how do you find and pick another one?
For this, we would first need to know what versions of python are installed. This is not generally available information, so first we would need to formalize this.
tox 4 allows a list of specs for base_python, so you can do In general, though I'd like to fill direct issues where you think there's something actionable because such lung threads will mean we'll miss a lot of actionable parts in between juggling multiple topics... |
Beta Was this translation helpful? Give feedback.
-
The first example from the project readme advertises what proved to be an anti-pattern for tox.ini long-term maintenance: the use of explicit python versions like
envlist = py37,py38
, or similarpy{37,36,35,27}
.The issue with this pattern is that it requires permanent maintenance of the tox.ini file in order to advertise new python versions.
As an alternative to this, I seen project maintainers migrating towards using only a non specific one like
py3
which resolves to the current python3 version available on the system, while not preventing user from running with a particular version.The interaction between
envlist
,skip_missing_interpreters
andignore_basepython_conflict
can easily produce problems with CI/CD pipelines, some of them with very dangerous effects: running jobs using unexpected version of python and giving false-positives --- hard to spot. Over the last years I encountered several cases like this.I opened this subject with the hope that we can document a safe and optimal reference use-example that we can advertise to users, especially as many of them do not know all the complex details on how tox runs.
Things that we may want to cover:
-e pyXY
)I do expect that covering all these may be possible only with tox4, but that is not a problem.
Beta Was this translation helpful? Give feedback.
All reactions