Skip to content

Commit

Permalink
Remove Python 2 from documentation examples (#1539)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed May 28, 2024
1 parent fa807e7 commit c339d33
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
8 changes: 4 additions & 4 deletions docs/config/environment/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ dependencies = [
]

[[tool.hatch.envs.test.matrix]]
python = ["2.7", "3.8"]
python = ["3.10", "3.11"]
version = ["42", "3.14"]

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9"]
python = ["3.11", "3.12"]
version = ["9000"]
feature = ["foo", "bar"]
```
Expand Down Expand Up @@ -117,7 +117,7 @@ dependencies = [
cov = 'pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=pkg --cov=tests'

[[tool.hatch.envs.test.matrix]]
python = ["2.7", "3.8"]
python = ["3.11", "3.12"]
version = ["42", "3.14"]
```

Expand Down Expand Up @@ -177,7 +177,7 @@ matrix.auth.features = [
]

[[tool.hatch.envs.test.matrix]]
python = ["2.7", "3.8"]
python = ["3.11", "3.12"]
version = ["legacy", "latest"]
auth = ["oauth2", "kerberos", "noauth"]
```
Expand Down
32 changes: 16 additions & 16 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,13 @@ dependencies = [
]

[[tool.hatch.envs.test.matrix]]
python = ["2.7", "3.8"]
python = ["3.10", "3.11"]
version = ["42", "3.14"]

[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9"]
python = ["3.11", "3.12"]
version = ["9000"]
features = ["foo", "bar"]
feature = ["foo", "bar"]
```

Using the [`env show`](cli/reference.md#hatch-env-show) command would then display:
Expand All @@ -150,19 +150,19 @@ $ hatch env show --ascii
+=========+=========+
| default | virtual |
+---------+---------+
Matrices
+------+---------+---------------------+--------------+
| Name | Type | Envs | Dependencies |
+======+=========+=====================+==============+
| test | virtual | test.py2.7-42 | pytest |
| | | test.py2.7-3.14 | |
| | | test.py3.8-42 | |
| | | test.py3.8-3.14 | |
| | | test.py3.8-9000-foo | |
| | | test.py3.8-9000-bar | |
| | | test.py3.9-9000-foo | |
| | | test.py3.9-9000-bar | |
+------+---------+---------------------+--------------+
Matrices
+------+---------+----------------------+--------------+
| Name | Type | Envs | Dependencies |
+======+=========+======================+==============+
| test | virtual | test.py3.10-42 | pytest |
| | | test.py3.10-3.14 | |
| | | test.py3.11-42 | |
| | | test.py3.11-3.14 | |
| | | test.py3.11-9000-foo | |
| | | test.py3.11-9000-bar | |
| | | test.py3.12-9000-foo | |
| | | test.py3.12-9000-bar | |
+------+---------+----------------------+--------------+
```

## Removal
Expand Down
14 changes: 7 additions & 7 deletions docs/meta/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ The only caveat is that currently there is no support for re-creating an environ
```ini tab="tox.ini"
[tox]
envlist =
py{27,38}-{42,3.14}
py{38,39}-{9000}-{foo,bar}
py{38,39}-{42,3.14}
py{39,310}-{9000}-{foo,bar}

[testenv]
usedevelop = true
Expand Down Expand Up @@ -184,19 +184,19 @@ The only caveat is that currently there is no support for re-creating an environ

[tool.hatch.envs.default.overrides]
matrix.version.env-vars = "PRODUCT_VERSION"
matrix.features.env-vars = "EXPERIMENTAL=true"
matrix.features.dependencies = [
matrix.feature.env-vars = "EXPERIMENTAL=true"
matrix.feature.dependencies = [
{ value = "cryptography", if = ["foo"] },
]

[[tool.hatch.envs.default.matrix]]
python = ["2.7", "3.8"]
python = ["3.8", "3.9"]
version = ["42", "3.14"]

[[tool.hatch.envs.default.matrix]]
python = ["3.8", "3.9"]
python = ["3.9", "3.10"]
version = ["9000"]
features = ["foo", "bar"]
feature = ["foo", "bar"]
```

## Fast CLI?
Expand Down

0 comments on commit c339d33

Please sign in to comment.