Skip to content

Commit 997aef6

Browse files
David Fritzschedavidfritzsche
authored andcommitted
Support mypy>=0.931,<1.1 and pytest>=7,<7.3
* Require mypy>=0.931 and add support for mypy 1.0.x * Require pytest>=7 and add support for pytest 7.2.x
1 parent d2af068 commit 997aef6

File tree

4 files changed

+78
-60
lines changed

4 files changed

+78
-60
lines changed

README.md

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -108,57 +108,87 @@ decorators are extracted from the ast.
108108
-U -r requirements.txt`.
109109
* Start developing.
110110
* To run all tests with [tox](https://tox.readthedocs.io/en/latest/),
111-
Python 3.7, 3.8, 3.9 and 3.10 must be available. You might want to look
111+
Python 3.7, 3.8, 3.9, 3.10 and 3.11 must be available. You might want to look
112112
into using [pyenv](https://github.com/pyenv/pyenv).
113113

114114

115115
# Changelog
116116

117-
## Upcoming
117+
## v0.1.0
118118

119-
* Implement support for flexible matching of mypy error codes
119+
* Implement support for flexible matching of mypy error codes (towards [#36][i36], [#41][p41])
120+
* Add support for pytest 7.2.x ([#42][p42])
121+
* Add support for mypy 1.0.x ([#42][p42])
122+
* Add support for Python 3.11 ([#42][p42])
123+
* Drop support for pytest 6.x ([#42][p42])
124+
* Drop support for mypy versions less than 0.931 ([#42][p42])
120125

121126
## v0.0.12
122127

123-
* Allow Windows drives in filename (#17, #34)
124-
* Support async def tests (#30, #31)
125-
* Add support for mypy 0.971 (#27)
126-
* Remove support for Python 3.6 (#32)
128+
* Allow Windows drives in filename ([#17][i17], [#34][p34])
129+
* Support async def tests ([#30][i30], [#31][p31])
130+
* Add support for mypy 0.971 ([#35][i35], [#27][i27])
131+
* Remove support for Python 3.6 ([#32][p32])
132+
* Bump development dependencies ([#40][p40])
127133

128134
## v0.0.11
129135

130-
* Add support for mypy 0.960 (#25)
136+
* Add support for mypy 0.960 ([#25][p25])
131137

132138
## v0.0.10
133139

134-
* Add support for pytest 7.0.x and require Python >= 3.7 (#23)
135-
* Bump dependencies (#24)
140+
* Add support for pytest 7.0.x and require Python >= 3.7 ([#23][p23])
141+
* Bump dependencies ([#24][p24])
136142

137143
## v0.0.9
138144

139-
* Disable soft error limit (#21)
145+
* Disable soft error limit ([#21][p21])
140146

141147
## v0.0.8
142148

143-
* Normalize messages to enable support for mypy 0.902 and pytest 6.2.4 (#20)
149+
* Normalize messages to enable support for mypy 0.902 and pytest 6.2.4 ([#20][p20])
144150

145151
## v0.0.7
146152

147-
* Fix `PYTEST_VERSION_INFO` - by [@blueyed](https://github.com/blueyed) (#8)
148-
* Always pass `--check-untyped-defs` to mypy (#11)
149-
* Respect pytest config `python_files` when identifying pytest test modules (#12)
153+
* Fix `PYTEST_VERSION_INFO` - by [@blueyed](https://github.com/blueyed) ([#8][p8])
154+
* Always pass `--check-untyped-defs` to mypy ([#11][p11])
155+
* Respect pytest config `python_files` when identifying pytest test modules ([#12][p12])
150156

151157
## v0.0.6 - add pytest 5.4 support
152158

153-
* Update the plugin to work with pytest 5.4 (#7)
159+
* Update the plugin to work with pytest 5.4 ([#7][p7])
154160

155161
## v0.0.5 - CI improvements
156162

157-
* Make invoke tasks work (partially) on Windows (#6)
163+
* Make invoke tasks work (partially) on Windows ([#6][p6])
158164
* Add an invoke task to run tox environments by selecting globs (e.g.,
159-
`inv tox -e py-*`) (#6)
165+
`inv tox -e py-*`) ([#6][p6])
160166
* Use coverage directly for code coverage to get more consistent
161-
parallel run results (#6)
167+
parallel run results ([#6][p6])
162168
* Use flit fork dflit to make packaging work with `LICENSES` directory
163-
(#6)
164-
* Bump dependencies (#6)
169+
([#6][p6])
170+
* Bump dependencies ([#6][p6])
171+
172+
173+
[i17]: https://github.com/davidfritzsche/pytest-mypy-testing/issues/17
174+
[i27]: https://github.com/davidfritzsche/pytest-mypy-testing/issues/27
175+
[i30]: https://github.com/davidfritzsche/pytest-mypy-testing/issues/30
176+
[i35]: https://github.com/davidfritzsche/pytest-mypy-testing/issues/35
177+
[i36]: https://github.com/davidfritzsche/pytest-mypy-testing/issues/36
178+
179+
[p6]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/6
180+
[p7]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/7
181+
[p8]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/8
182+
[p11]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/11
183+
[p12]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/12
184+
[p20]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/20
185+
[p21]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/21
186+
[p23]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/23
187+
[p24]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/24
188+
[p25]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/25
189+
[p31]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/31
190+
[p32]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/32
191+
[p34]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/34
192+
[p40]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/40
193+
[p41]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/41
194+
[p42]: https://github.com/davidfritzsche/pytest-mypy-testing/pull/42

pyproject.toml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ classifiers = [
2222
"Programming Language :: Python :: 3.8",
2323
"Programming Language :: Python :: 3.9",
2424
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
2526
"Typing :: Typed",
2627
]
2728
description-file = "README.md"
2829
dist-name = "pytest-mypy-testing"
2930
home-page = "https://github.com/davidfritzsche/pytest-mypy-testing"
3031
license = "Apache-2.0 OR MIT"
3132
requires = [
32-
"pytest>=6,<8",
33-
"mypy",
33+
"pytest>=7,<8",
34+
"mypy>=0.931",
3435
]
3536
requires-python = ">=3.7"
3637

@@ -42,20 +43,11 @@ include = ["src/pytest_mypy_testing/_version.py"]
4243

4344
[tool.black]
4445
line-length = 88
45-
target-version = ['py37', 'py38']
46+
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
4647
include = '\.pyi?$'
47-
exclude = '''
48+
extend-exclude = '''
4849
(
49-
/\.eggs/
50-
| /\.git/
51-
| /\.hg/
52-
| /\.mypy_cache/
53-
| /\.tox/
54-
| /\.venv/
55-
| /_build/
56-
| /_version\.py
57-
| /buck-out/
58-
| /build/
50+
/_version\.py
5951
| /dist/
6052
)
6153
'''

tests/test_plugin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import pytest
99
from _pytest.config import Config
10-
from py._path.local import LocalPath
1110

1211
from pytest_mypy_testing.message import Severity
1312
from pytest_mypy_testing.parser import MypyTestFile
@@ -19,6 +18,12 @@
1918
from pytest_mypy_testing.strutil import dedent
2019

2120

21+
try:
22+
from py._path.local import LocalPath
23+
except ModuleNotFoundError:
24+
from _pytest._py.path import LocalPath
25+
26+
2227
PYTEST_VERSION = pytest.__version__
2328
PYTEST_VERSION_INFO = tuple(int(part) for part in PYTEST_VERSION.split(".")[:3])
2429

tox.ini

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
11
# SPDX-FileCopyrightText: David Fritzsche
22
# SPDX-License-Identifier: CC0-1.0
3+
34
[tox]
45
isolated_build = True
56
envlist =
6-
{py37,py38,py39}-pytest{62,70,71}-mypy{0910,0931,0971}
7-
{py310}-pytest{62,71}-mypy{0910,0931,0971}
8-
py-pytest{62,70,71}-mypy{0910,0931,0971}
7+
{py37,py38,py39}-pytest{70,71,72}-mypy{093,097,10}
8+
{py310,py311}-pytest{70,71,72}-mypy{093,097,10}
9+
py-pytest{70,71,72}-mypy{093,097,10}
910
linting
1011

1112
[testenv]
1213
deps =
1314
coverage[toml]
14-
pytest53: pytest~=5.3.5
15-
pytest54: pytest~=5.4.1
16-
pytest60: pytest~=6.0.2
17-
pytest61: pytest~=6.1.2
18-
pytest62: pytest~=6.2.5
1915
pytest70: pytest~=7.0.1
20-
pytest71: pytest~=7.1.2
21-
pytest-cov
22-
pytest-html
23-
mypy0902: mypy==0.902
24-
mypy0910: mypy==0.910
25-
mypy0921: mypy==0.921
26-
mypy0931: mypy==0.931
27-
mypy0942: mypy==0.942
28-
mypy0950: mypy==0.950
29-
mypy0960: mypy==0.960
30-
mypy0961: mypy==0.961
31-
mypy0971: mypy==0.971
16+
pytest71: pytest~=7.1.3
17+
pytest72: pytest~=7.2.1
18+
mypy093: mypy==0.931
19+
mypy094: mypy==0.942
20+
mypy095: mypy==0.950
21+
mypy096: mypy==0.960
22+
mypy096: mypy==0.961
23+
mypy097: mypy==0.971
24+
mypy099: mypy==0.991
25+
mypy10: mypy==1.0.1
3226
setenv =
3327
COVERAGE_FILE={toxinidir}/build/{envname}/coverage
3428
commands =
35-
python -m coverage run --context "{envname}" -m pytest \
36-
{posargs} \
37-
--html={toxinidir}/build/{envname}/pytest-report.html \
38-
--junitxml={toxinidir}/build/{envname}/junit.xml
29+
python -m coverage run --context "{envname}" -m pytest {posargs} --junitxml={toxinidir}/build/{envname}/junit.xml
3930

4031
[testenv:black]
4132
basepython = python3.10

0 commit comments

Comments
 (0)