From d2a633d2f5fb826eb1ce6c33b649e19096043a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Wed, 12 Jul 2023 09:55:47 +0200 Subject: [PATCH] Setup Hatch matrix to support Pydantic V1 and V2 --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) 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"