From 9b7ff868ef8918e2367f4f23adb90f234f40e589 Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Thu, 21 Nov 2024 21:37:53 +0100 Subject: [PATCH] Update default pydantic version --- diracx-cli/pyproject.toml | 2 +- diracx-core/pyproject.toml | 2 +- diracx-core/src/diracx/core/config/__init__.py | 1 + diracx-db/pyproject.toml | 2 +- diracx-routers/pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/diracx-cli/pyproject.toml b/diracx-cli/pyproject.toml index d33abfb6..06d52667 100644 --- a/diracx-cli/pyproject.toml +++ b/diracx-cli/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ "diracx-client", "diracx-core", "gitpython", - "pydantic", + "pydantic>=2.10", "rich", "typer", "pyyaml", diff --git a/diracx-core/pyproject.toml b/diracx-core/pyproject.toml index 0c09148a..c9cb8f9e 100644 --- a/diracx-core/pyproject.toml +++ b/diracx-core/pyproject.toml @@ -19,7 +19,7 @@ dependencies = [ "cachetools", "email_validator", "gitpython", - "pydantic >=2", + "pydantic >=2.10", "pydantic-settings", "pyyaml", ] diff --git a/diracx-core/src/diracx/core/config/__init__.py b/diracx-core/src/diracx/core/config/__init__.py index e3ee2f90..60a435ee 100644 --- a/diracx-core/src/diracx/core/config/__init__.py +++ b/diracx-core/src/diracx/core/config/__init__.py @@ -42,6 +42,7 @@ def _apply_default_scheme(value: str) -> str: class AnyUrlWithoutHost(AnyUrl): + _constraints = UrlConstraints(host_required=False) diff --git a/diracx-db/pyproject.toml b/diracx-db/pyproject.toml index ed8309cc..fc4ec487 100644 --- a/diracx-db/pyproject.toml +++ b/diracx-db/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "diracx-core", "fastapi", "opensearch-py[async]", - "pydantic >=2.4", + "pydantic >=2.10", "sqlalchemy[aiomysql,aiosqlite] >= 2", ] dynamic = ["version"] diff --git a/diracx-routers/pyproject.toml b/diracx-routers/pyproject.toml index 91d99023..c72bc191 100644 --- a/diracx-routers/pyproject.toml +++ b/diracx-routers/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "python-multipart", "fastapi", "httpx", - "pydantic >=2.4", + "pydantic >=2.10", "uvicorn", "sqlalchemy", "opentelemetry-api",