diff --git a/pyproject.toml b/pyproject.toml index b06a8a2e..101323e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,6 +73,15 @@ dependencies = [ "ruff", ] +[[tool.hatch.envs.default.matrix]] +pydantic = ["v1", "v2"] + +[tool.hatch.envs.default.overrides] +matrix.pydantic.extra-dependencies = [ + {value = "pydantic<2.0", if = ["v1"]}, + {value = "pydantic>=2.0", if = ["v2"]}, +] + [tool.hatch.envs.default.scripts] test = "pytest --cov=fastapi_users/ --cov-report=term-missing --cov-fail-under=100" test-cov-xml = "pytest --cov=fastapi_users/ --cov-report=xml --cov-fail-under=100"