From 697aaa621eb184a51e2e2729d8146b5ef4b2b7cc Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Mon, 23 Jun 2025 09:36:40 +0200 Subject: [PATCH 1/3] Fix UnboundLocalError error in _replace_field_names_case_insensitively (#639) --- pydantic_settings/sources/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pydantic_settings/sources/base.py b/pydantic_settings/sources/base.py index 96c019be..b2c4d166 100644 --- a/pydantic_settings/sources/base.py +++ b/pydantic_settings/sources/base.py @@ -416,6 +416,7 @@ class Settings(BaseSettings): model_fields: dict[str, FieldInfo] = annotation.model_fields # Find field in sub model by looking in fields case insensitively + field_key: str | None = None for sub_model_field_name, sub_model_field in model_fields.items(): aliases, _ = _get_alias_names(sub_model_field_name, sub_model_field) _search = (alias for alias in aliases if alias.lower() == name.lower()) From 36b8bfed902cce5d870fe09688014902d3894cab Mon Sep 17 00:00:00 2001 From: Victorien <65306057+Viicos@users.noreply.github.com> Date: Mon, 23 Jun 2025 11:11:30 +0200 Subject: [PATCH 2/3] Remove unknown file reference in documentation (#640) --- docs/index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 089bb75c..bfb82ce6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1691,8 +1691,6 @@ class Settings(BaseSettings): If a shortcut collides (is mapped to multiple fields), it will apply to the first matching field in the model. -See the [test cases](../tests/test_source_cli.py) for more advanced usage and edge cases. - ### Integrating with Existing Parsers A CLI settings source can be integrated with existing parsers by overriding the default CLI settings source with a user From 6bae3ab4fb321434feca35d120f05509d5c4ac55 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Tue, 24 Jun 2025 15:14:28 +0200 Subject: [PATCH 3/3] Prepare release 2.10.1 (#642) --- pydantic_settings/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_settings/version.py b/pydantic_settings/version.py index 5bed97f9..79585b42 100644 --- a/pydantic_settings/version.py +++ b/pydantic_settings/version.py @@ -1 +1 @@ -VERSION = '2.10.0' +VERSION = '2.10.1'