Skip to content

Commit d94f0b6

Browse files
committed
hard-require pydantic v2 or greater
1 parent b8fea20 commit d94f0b6

File tree

3 files changed

+86
-205
lines changed

3 files changed

+86
-205
lines changed

pyproject.toml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authors = [
1010

1111
dependencies = [
1212
"httpx>=0.23.0, <1",
13-
"pydantic>=1.9.0, <3",
13+
"pydantic>=2.0.0, <3",
1414
"typing-extensions>=4.14, <5",
1515
"anyio>=3.5.0, <5",
1616
"distro>=1.7.0, <2",
@@ -46,12 +46,7 @@ aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
4646
[tool.uv]
4747
managed = true
4848
required-version = ">=0.9"
49-
conflicts = [
50-
[
51-
{ group = "pydantic-v1" },
52-
{ group = "pydantic-v2" },
53-
],
54-
]
49+
conflicts = []
5550

5651
[dependency-groups]
5752
# version pins are in uv.lock
@@ -69,13 +64,6 @@ dev = [
6964
"pytest-xdist>=3.6.1",
7065
"dotenv>=0.9.9",
7166
]
72-
pydantic-v1 = [
73-
"pydantic>=1.9.0,<2",
74-
]
75-
pydantic-v2 = [
76-
"pydantic~=2.0 ; python_full_version < '3.14'",
77-
"pydantic~=2.12 ; python_full_version >= '3.14'",
78-
]
7967

8068
[build-system]
8169
requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme", "packaging"]

scripts/test

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,8 @@ PY_VERSION_MIN=">=3.9.0"
1414
PY_VERSION_MAX=">=3.14.0"
1515

1616
function run_tests() {
17-
echo "==> Running tests with Pydantic v2"
17+
echo "==> Running tests"
1818
uv run --isolated --all-extras pytest "$@"
19-
20-
# Skip Pydantic v1 tests on latest Python (not supported)
21-
if [[ "$UV_PYTHON" != "$PY_VERSION_MAX" ]]; then
22-
echo "==> Running tests with Pydantic v1"
23-
uv run --isolated --all-extras --group=pydantic-v1 pytest "$@"
24-
fi
2519
}
2620

2721
# If UV_PYTHON is already set in the environment, just run the command once

0 commit comments

Comments
 (0)