From 7efaeba283f030a4a01c17f93c0b697bdd890e76 Mon Sep 17 00:00:00 2001 From: roberto Date: Sun, 8 Mar 2026 21:25:45 +0100 Subject: [PATCH] chore: migrate Settings to Pydantic v2 ConfigDict Replace deprecated Pydantic v1 `class Config:` inner class with `model_config = SettingsConfigDict(...)` to eliminate the deprecation warning emitted on every test run. Co-Authored-By: Claude Sonnet 4.6 --- app/config/settings.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/config/settings.py b/app/config/settings.py index dd8b292..796cdad 100644 --- a/app/config/settings.py +++ b/app/config/settings.py @@ -1,5 +1,5 @@ from typing import Literal -from pydantic_settings import BaseSettings +from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): @@ -54,9 +54,7 @@ class Settings(BaseSettings): ENV: Literal["dev", "prod"] = "dev" - class Config: - env_file = ".env" - env_file_encoding = "utf-8" + model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8") settings = Settings()