Skip to content

Commit 9160e6d

Browse files
authored
Merge pull request #163 from dmtucker/py312
Add support for Python 3.12
2 parents 2684be7 + 9608c7e commit 9160e6d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
runs-on: ubuntu-20.04
66
strategy:
77
matrix:
8-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
8+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
99
steps:
1010
- uses: actions/checkout@v3
1111
- uses: actions/setup-python@v4

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.9",
2525
"Programming Language :: Python :: 3.10",
2626
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
2728
"Programming Language :: Python :: Implementation :: CPython",
2829
"Topic :: Software Development :: Testing",
2930
]

tests/test_pytest_mypy.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,9 @@ def pyfunc(x):
116116
mypy_status_check = 1
117117
mypy_checks = mypy_file_checks + mypy_status_check
118118
outcomes = {"passed": mypy_checks}
119-
# mypy doesn't emit annotation-unchecked warnings until 0.990:
120-
min_mypy_version = Version("0.990")
121-
if MYPY_VERSION >= min_mypy_version and PYTEST_VERSION >= Version("7.0"):
122-
# assert_outcomes does not support `warnings` until 7.x.
123-
outcomes["warnings"] = 1
124119
result.assert_outcomes(**outcomes)
125-
if MYPY_VERSION >= min_mypy_version:
120+
# mypy doesn't emit annotation-unchecked warnings until 0.990:
121+
if MYPY_VERSION >= Version("0.990"):
126122
result.stdout.fnmatch_lines(["*MypyWarning*"])
127123
assert result.ret == 0
128124

tox.ini

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ envlist =
88
py39-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
99
py310-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
1010
py311-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
11+
py312-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
1112
publish
1213
static
1314

@@ -18,13 +19,15 @@ python =
1819
3.9: py39-pytest{4.6, 5.0, 5.x, 6.0, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
1920
3.10: py310-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
2021
3.11: py311-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
22+
3.12: py312-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
2123

2224
[testenv]
2325
deps =
2426
pytest4.6: pytest ~= 4.6.0
2527
pytest5.0: pytest ~= 5.0.0
2628
pytest5.x: pytest ~= 5.0
2729
pytest6.0: pytest ~= 6.0.0
30+
pytest6.2: pytest ~= 6.2.0
2831
pytest6.x: pytest ~= 6.0
2932
pytest7.0: pytest ~= 7.0.0
3033
pytest7.x: pytest ~= 7.0

0 commit comments

Comments
 (0)