-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Allow ranges in generative environment list #3502
Labels
Comments
Go ahead. |
mimre25
added a commit
to mimre25/tox
that referenced
this issue
Mar 21, 2025
Implements tox-dev#3502. Now it is possible to use ranges within the {} of an env specifier such as py3{10-13}. I chose to implement it as a pre-processing string replacement that just replaces the range with a literal enumeration of the range members. This is mainly to avoid more in-depth handling of these ranges when it coto generative environment lists. Also moves CircularChainError from `of_type` to `types` to avoid a circular import error. (kinda ironic :D)
5 tasks
mimre25
added a commit
to mimre25/tox
that referenced
this issue
Mar 21, 2025
Implements tox-dev#3502. Now it is possible to use ranges within the {} of an env specifier such as py3{10-13}. I chose to implement it as a pre-processing string replacement that just replaces the range with a literal enumeration of the range members. This is mainly to avoid more in-depth handling of these ranges when it coto generative environment lists. Also moves CircularChainError from `of_type` to `types` to avoid a circular import error. (kinda ironic :D)
gaborbernat
added a commit
that referenced
this issue
Mar 27, 2025
* feat(config): Allow ranges in envlist Implements #3502. Now it is possible to use ranges within the {} of an env specifier such as py3{10-13}. I chose to implement it as a pre-processing string replacement that just replaces the range with a literal enumeration of the range members. This is mainly to avoid more in-depth handling of these ranges when it coto generative environment lists. Also moves CircularChainError from `of_type` to `types` to avoid a circular import error. (kinda ironic :D) * fixup! feat(config): Allow ranges in envlist * fixup! feat(config): Allow ranges in envlist * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixup! feat(config): Allow ranges in envlist * fixup! feat(config): Allow ranges in envlist --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bernát Gábor <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's the problem this feature will solve?
When supporting multiple versions, eg python 3.8 to python 3.13, I noticed myself always going with an environment definition a la:
Which is a bit tedious and wordy.
Describe the solution you'd like
Before typing the above, I usually go with
just to find out that this doesn't work.
I'd really like to have these ranges in there if possible.
It is terser and follows the natural reading flow of "from python 3.8 to python 3.13" instead of "python 3.8, python 3.9, python 3.10 ...".
Additional context
Happy to contribute a PR if I get a go-ahead. 🙂
The text was updated successfully, but these errors were encountered: