Skip to content

Commit 1569764

Browse files
committed
Update tested Pydantic versions
This also adds an exclusion for more recent versions of Python and older versions of Pydantic, as those aren't compatible.
1 parent ef4dd47 commit 1569764

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

noxfile.py

+19-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,30 @@
55
@session
66
@parametrize(
77
"pydantic",
8-
("2.0", "2.1", "2.2", "2.3", "2.4"),
8+
(
9+
(2, 0),
10+
(2, 1),
11+
(2, 2),
12+
(2, 3),
13+
(2, 4),
14+
(2, 5),
15+
(2, 6),
16+
(2, 7),
17+
(2, 8),
18+
(2, 9),
19+
(2, 10),
20+
),
921
)
10-
@parametrize("graphene", ("2.1.8", "2.1.9", "3.0", "3.1", "3.2", "3.3"))
22+
@parametrize("graphene", ("2.1.8", "2.1.9", "3.0", "3.1", "3.2", "3.3", "3.4"))
1123
def tests(session, pydantic, graphene):
12-
if sys.version_info > (3, 10) and pydantic in ("1.7", "1.8"):
24+
if sys.version_info > (3, 10) and pydantic in ((1, 7), (1, 8)):
1325
return session.skip()
1426
if sys.version_info > (3, 10) and graphene <= "3":
15-
# Graphene 2.x doesn't support Python 3.11
1627
return session.skip()
17-
session.install(f"pydantic=={pydantic}")
28+
if sys.version_info > (3, 11) and pydantic < (2, 9):
29+
return session.skip()
30+
pydantic_version_string = ".".join([str(n) for n in pydantic])
31+
session.install(f"pydantic=={pydantic_version_string}")
1832
session.install(f"graphene=={graphene}")
1933
session.install("pytest", "pytest-cov", ".")
2034
session.run(

0 commit comments

Comments
 (0)