]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔨 Resolve Pydantic deprecation warnings in internal script (#13696)
authorEmmanuel Ferdman <emmanuelferdman@gmail.com>
Tue, 17 Jun 2025 07:50:19 +0000 (10:50 +0300)
committerGitHub <noreply@github.com>
Tue, 17 Jun 2025 07:50:19 +0000 (09:50 +0200)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
scripts/label_approved.py

index 271444504027f354c000786b6b01996cb2933e35..81de92efbe84dd2fdc66087e145d0d28ca5126fa 100644 (file)
@@ -27,7 +27,7 @@ if settings.debug:
     logging.basicConfig(level=logging.DEBUG)
 else:
     logging.basicConfig(level=logging.INFO)
-logging.debug(f"Using config: {settings.json()}")
+logging.debug(f"Using config: {settings.model_dump_json()}")
 g = Github(settings.token.get_secret_value())
 repo = g.get_repo(settings.github_repository)
 for pr in repo.get_pulls(state="open"):
@@ -48,7 +48,7 @@ for pr in repo.get_pulls(state="open"):
     ]
     config = settings.config or default_config
     for approved_label, conf in config.items():
-        logging.debug(f"Processing config: {conf.json()}")
+        logging.debug(f"Processing config: {conf.model_dump_json()}")
         if conf.await_label is None or (conf.await_label in pr_label_by_name):
             logging.debug(f"Processable PR: {pr.number}")
             if len(approved_reviews) >= conf.number: