From 9268801d08f2af46093be5d2c986f14e4762020e Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Mon, 6 Oct 2025 21:53:21 +0200 Subject: [PATCH] Add `url_preserve_empty_path` entry to `CoreConfig` --- python/pydantic_core/core_schema.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/pydantic_core/core_schema.py b/python/pydantic_core/core_schema.py index ef45a9793..c8a3b6da6 100644 --- a/python/pydantic_core/core_schema.py +++ b/python/pydantic_core/core_schema.py @@ -79,6 +79,7 @@ class CoreConfig(TypedDict, total=False): validate_by_alias: Whether to use the field's alias when validating against the provided input data. Default is `True`. validate_by_name: Whether to use the field's name when validating against the provided input data. Default is `False`. Replacement for `populate_by_name`. serialize_by_alias: Whether to serialize by alias. Default is `False`, expected to change to `True` in V3. + url_preserve_empty_path: Whether to preserve empty URL paths when validating values for a URL type. Defaults to `False`. """ title: str @@ -119,6 +120,7 @@ class CoreConfig(TypedDict, total=False): validate_by_alias: bool # default: True validate_by_name: bool # default: False serialize_by_alias: bool # default: False + url_preserve_empty_path: bool # default: False IncExCall: TypeAlias = 'set[int | str] | dict[int | str, IncExCall] | None'