You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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]>
@@ -1582,24 +1584,49 @@ This will generate the following tox environments:
1582
1584
1583
1585
> tox l
1584
1586
default environments:
1585
-
py311-django41-sqlite -> [no description]
1586
-
py311-django41-mysql -> [no description]
1587
-
py311-django40-sqlite -> [no description]
1588
-
py311-django40-mysql -> [no description]
1589
-
py310-django41-sqlite -> [no description]
1590
-
py310-django41-mysql -> [no description]
1591
-
py310-django40-sqlite -> [no description]
1592
-
py310-django40-mysql -> [no description]
1593
1587
py39-django41-sqlite -> [no description]
1594
1588
py39-django41-mysql -> [no description]
1595
1589
py39-django40-sqlite -> [no description]
1596
1590
py39-django40-mysql -> [no description]
1591
+
py310-django41-sqlite -> [no description]
1592
+
py310-django41-mysql -> [no description]
1593
+
py310-django40-sqlite -> [no description]
1594
+
py310-django40-mysql -> [no description]
1595
+
py311-django41-sqlite -> [no description]
1596
+
py311-django41-mysql -> [no description]
1597
+
py311-django40-sqlite -> [no description]
1598
+
py311-django40-mysql -> [no description]
1599
+
1600
+
Both enumerations (``{1,2,3}``) and numerical ranges (``{1-3}``) are supported, and can be mixed together:
1601
+
1602
+
.. code-block:: ini
1603
+
1604
+
[tox]
1605
+
env_list = py3{8-10, 11, 13-14}
1606
+
1607
+
will create the following envs:
1608
+
1609
+
.. code-block:: shell
1610
+
1611
+
> tox l
1612
+
default environments:
1613
+
py38 -> [no description]
1614
+
py39 -> [no description]
1615
+
py310 -> [no description]
1616
+
py311 -> [no description]
1617
+
py313 -> [no description]
1618
+
py314 -> [no description]
1619
+
1620
+
Negative ranges will also be expanded (``{3-1}`` -> ``{3,2,1}``), however, open ranges such as ``{1-}``, ``{-2}``, ``{a-}``, and ``{-b}`` will not be expanded.
1621
+
1622
+
1597
1623
1598
1624
Generative section names
1599
1625
~~~~~~~~~~~~~~~~~~~~~~~~
1600
1626
1601
1627
Suppose you have some binary packages, and need to run tests both in 32 and 64 bits. You also want an environment to
1602
1628
create your virtual env for the developers.
1629
+
This also supports ranges in the same way as generative environment lists.
0 commit comments