Skip to content

Commit

Permalink
Merge pull request #163 from dmtucker/py312
Browse files Browse the repository at this point in the history
Add support for Python 3.12
  • Loading branch information
dmtucker authored Feb 12, 2024
2 parents 2684be7 + 9608c7e commit 9160e6d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Testing",
]
Expand Down
8 changes: 2 additions & 6 deletions tests/test_pytest_mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,9 @@ def pyfunc(x):
mypy_status_check = 1
mypy_checks = mypy_file_checks + mypy_status_check
outcomes = {"passed": mypy_checks}
# mypy doesn't emit annotation-unchecked warnings until 0.990:
min_mypy_version = Version("0.990")
if MYPY_VERSION >= min_mypy_version and PYTEST_VERSION >= Version("7.0"):
# assert_outcomes does not support `warnings` until 7.x.
outcomes["warnings"] = 1
result.assert_outcomes(**outcomes)
if MYPY_VERSION >= min_mypy_version:
# mypy doesn't emit annotation-unchecked warnings until 0.990:
if MYPY_VERSION >= Version("0.990"):
result.stdout.fnmatch_lines(["*MypyWarning*"])
assert result.ret == 0

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ envlist =
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}
py310-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
py311-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
py312-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
publish
static

Expand All @@ -18,13 +19,15 @@ python =
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}
3.10: py310-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.78, 0.x, 1.0, 1.x}
3.11: py311-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}
3.12: py312-pytest{6.2, 6.x, 7.0, 7.x}-mypy{0.90, 0.x, 1.0, 1.x}

[testenv]
deps =
pytest4.6: pytest ~= 4.6.0
pytest5.0: pytest ~= 5.0.0
pytest5.x: pytest ~= 5.0
pytest6.0: pytest ~= 6.0.0
pytest6.2: pytest ~= 6.2.0
pytest6.x: pytest ~= 6.0
pytest7.0: pytest ~= 7.0.0
pytest7.x: pytest ~= 7.0
Expand Down

0 comments on commit 9160e6d

Please sign in to comment.