pydantic-settings breaking changes
Updated December 4, 2026
On this page
Latest version 2.16.4, released December 3, 2026. Source repository
Its 2.16.0 release requires Python 3.11 or later. Python end of life dates.
pydantic-settings 2.16.4 breaking changes
- Behavior changed
With case_sensitive=False, an exactly named secret is now used over its case variants, and each secret is listed once under its lower-cased name. github.com - Behavior changed
With env_ignore_empty=True, an explicit empty CLI argument is now kept as an empty value instead of falling back to the environment or default. For non-string fields this now fails validation. github.com - Behavior changed
A value for a nested AliasPath-only CLI option that is not a single JSON value now raises SettingsError. github.com - Behavior changed
NestedSecretsSettingsSource
The _env_prefix, _case_sensitive, _env_nested_delimiter, _env_prefix_target and _env_nested_max_split settings now also apply to NestedSecretsSettingsSource. github.com - Behavior changed
SecretsSettingsSource
On POSIX, secret files are now opened below secrets_dir without following symlinks, so symlinked secret files may no longer load. github.com - Signature changed
pydantic_settings.NestedSecretsSettingsSource.load_secrets
Was @classmethod def load_secrets(cls, path: Path) -> dict[str, str]; now @classmethod def load_secrets(cls, path: Path, max_size: int | None = None) -> dict[str, str]. pypi.org - Signature changed
pydantic_settings.SecretsSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], secrets_dir: PathType | None = None, case_sensitive: bool | None = None, env_prefix: str | None = None, env_prefix_target: EnvPrefixTarget | None = None, env_ignore_empty: bool |... pypi.org - Signature changed
pydantic_settings.sources.providers.nested_secrets.NestedSecretsSettingsSource.load_secrets
Was @classmethod def load_secrets(cls, path: Path) -> dict[str, str]; now @classmethod def load_secrets(cls, path: Path, max_size: int | None = None) -> dict[str, str]. pypi.org - Signature changed
pydantic_settings.sources.providers.secrets.SecretsSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], secrets_dir: PathType | None = None, case_sensitive: bool | None = None, env_prefix: str | None = None, env_prefix_target: EnvPrefixTarget | None = None, env_ignore_empty: bool |... pypi.org
pydantic-settings 2.16.3 breaking changes
- Behavior changed
NestedSecretsSettingsSource
NestedSecretsSettingsSource again skips entries whose names start with a dot, and raises SettingsError after 10,000 entries. github.com - Behavior changed
SecretsSettingsSource
A secret file that is a symlink resolving outside secrets_dir is no longer read; it is skipped with a warning. Move or copy the targets into secrets_dir if you rely on them. github.com
pydantic-settings 2.16.2 breaking changes
- Behavior changed
NestedSecretsSettingsSource
The wrapper's secrets_dir argument now wins over the wrapped source's directory and model config. If you pass both Settings(_secrets_dir=...) and NestedSecretsSettingsSource(..., secrets_dir=...), the wrapper's argument is used. github.com
pydantic-settings 2.16.0 breaking changes
- Behavior changed
pydantic-settings now requires Python 3.11+. Users on Python 3.10 must upgrade their interpreter. The toml extra is kept as an empty extra. github.com - Behavior changed
case_sensitive
With case_sensitive=False, args after -- and CliUnknownArgs keep their case, and unrecognized options are reported with their original case. github.com - Behavior changed
nested_model_default_partial_update
With nested_model_default_partial_update=True, the default is only dropped when the incoming value selects a different union member. github.com - Behavior changed
validate_by_alias
With validate_by_alias=False, env vars, secrets, CLI flags and defaults use only field names; env vars named after aliases are now ignored. github.com - Behavior changed
validation_alias
When alias and validation_alias differ, the validation_alias is used for file and CLI values, which now load instead of being ignored. github.com - Default changed
json_file_encoding
Config files are read as UTF-8 instead of the locale encoding; json_file_encoding and yaml_file_encoding still override it. github.com - Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_prefix_target: EnvPrefixTarget | None = None, _env_file: DotenvType |... pypi.org - Signature changed
pydantic_settings.DotEnvSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], env_file: DotenvType | None = ENV_FILE_SENTINEL, env_file_encoding: str | None = None, dotenv_filtering: DotenvFiltering | None = None, case_sensitive: bool | None = None... pypi.org - Signature changed
pydantic_settings.sources.providers.azure.AzureKeyVaultMapping.__init__
Was def __init__(self, secret_client: SecretClient, case_sensitive: bool, snake_case_conversion: bool, env_prefix: str | None) -> None; now def __init__(self, secret_client: SecretClient, case_sensitive: bool, snake_case_conversion: bool... pypi.org - Signature changed
pydantic_settings.sources.providers.gcp.GoogleSecretManagerMapping.__init__
Was def __init__(self, secret_client: SecretManagerServiceClient, project_id: str, case_sensitive: bool) -> None; now def __init__(self, secret_client: SecretManagerServiceClient, project_id: str, case_sensitive: bool, env_parse_none_str... pypi.org
And 7 more in this version. Sign up to see every change
pydantic-settings 2.15.0 breaking changes
- Removed
pydantic_settings.sources.providers.toml.PathType
pydantic_settings.sources.providers.toml.PathType was removed in pydantic-settings 2.15.0 pypi.org - Behavior changed
Fields with unresolved forward references now raise IncompleteFieldDefinitionWarning telling users to call model_rebuild(). Users with filterwarnings set to error may see new failures. github.com - Behavior changed
Secret files are now read as UTF-8 rather than the platform locale encoding, which changes how existing secret files decode on some platforms. github.com - Behavior changed
Non-JSON environment values for strict fields now raise ValidationError instead of a less specific error. github.com - Behavior changed
case_sensitive
Init kwargs and JSON/TOML/YAML config sources now honor case_sensitive, so case-insensitive matching becomes the default for these sources. Nested keys still match case-sensitively. github.com - Behavior changed
GoogleSecretManagerSettingsSource
The list_secrets call is skipped when case_sensitive=True, so the required IAM permissions drop to roles/secretmanager.secretAccessor. github.com - Behavior changed
NestedSecretsSettingsSource
Symlinks pointing outside secrets_dir are no longer followed, so values reached through them will no longer load. github.com - Signature changed
pydantic_settings.AWSSecretsManagerSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], secret_id: str, region_name: str | None = None, endpoint_url: str | None = None, case_sensitive: bool | None = True, env_prefix: str | None = None, env_nested_delimiter: str | None =... pypi.org - Signature changed
pydantic_settings.AzureKeyVaultSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], url: str, credential: TokenCredential, dash_to_underscore: bool = False, case_sensitive: bool | None = None, snake_case_conversion: bool = False, env_prefix: str | None = None... pypi.org - Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_prefix_target: EnvPrefixTarget | None = None, _env_file: DotenvType |... pypi.org
And 23 more in this version. Sign up to see every change
pydantic-settings 2.14.2 breaking changes
- Behavior changed
NestedSecretsSettingsSource
NestedSecretsSettingsSource with secrets_nested_subdir=True no longer follows symbolic links that point outside secrets_dir, so settings that relied on such links will no longer load those values. github.com - Signature changed
pydantic_settings.NestedSecretsSettingsSource.load_secrets
Was @staticmethod def load_secrets(path: Path) -> dict[str, str]; now @classmethod def load_secrets(cls, path: Path) -> dict[str, str]. pypi.org
Older versions
22 older versions, each with its first changes. Sign up to see every change
Show 22 older versions
pydantic-settings 2.14.0 breaking changes
- Signature changed
pydantic_settings.DotEnvSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], env_file: DotenvType | None = ENV_FILE_SENTINEL, env_file_encoding: str | None = None, case_sensitive: bool | None = None, env_prefix: str | None = None, env_prefix_target... pypi.org - Signature changed
pydantic_settings.sources.utils._get_alias_names
Was def _get_alias_names(field_name: str, field_info: Any, alias_path_args: dict[str, int | None] | None = None, case_sensitive: bool = True) -> tuple[tuple[str, ...], bool]; now def _get_alias_names(field_name: str, field_info: Any... pypi.org
pydantic-settings 2.13.0 breaking changes
- Signature changed
pydantic_settings.AWSSecretsManagerSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], secret_id: str, region_name: str | None = None, endpoint_url: str | None = None, case_sensitive: bool | None = True, env_prefix: str | None = None, env_nested_delimiter: str | None =... pypi.org - Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str |... pypi.org
And 13 more in this version.
pydantic-settings 2.12.0 breaking changes
- Removed
The package no longer supports Python 3.9. Upgrade Python to keep using this release. github.com - Behavior changed
Settings sources now apply in the order init, env, dotenv, secrets, then defaults. Check code that relies on the previous precedence. github.com
And 6 more in this version.
pydantic-settings 2.11.0 breaking changes
- Removed
pydantic_settings.CliSettingsSource.cli_parse_args
CliSettingsSource.cli_parse_args was removed in pydantic-settings 2.11.0 pypi.org - Behavior changed
allow_abbrev is turned off on CLI subparsers, so abbreviated long options no longer match on subcommands. github.com
And 7 more in this version.
pydantic-settings 2.10.0 breaking changes
- Signature changed
pydantic_settings.AWSSecretsManagerSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], secret_id: str, env_prefix: str | None = None, env_parse_none_str: str | None = None, env_parse_enums: bool | None = None) -> None; now def __init__(self, settings_cls... pypi.org - Signature changed
pydantic_settings.AzureKeyVaultSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], url: str, credential: TokenCredential, env_prefix: str | None = None, env_parse_none_str: str | None = None, env_parse_enums: bool | None = None) -> None; now def __init__(self... pypi.org
And 6 more in this version.
pydantic-settings 2.9.0 breaking changes
- Removed
Python 3.8 is no longer supported by this release, so upgrade to a newer Python before installing it. github.com - Removed
pydantic_settings.sources.BaseSettings
pydantic_settings.sources.BaseSettings was removed in pydantic-settings 2.9.0 pypi.org
And 11 more in this version.
pydantic-settings 2.8.1 breaking changes
- Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(self, /, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None =... pypi.org
pydantic-settings 2.8.0 breaking changes
- Behavior changed
env_nested_delimiter
When env_nested_delimiter is empty, environment variables are no longer exploded into nested values. Code relying on the previous splitting behavior must be updated. github.com - Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str |... pypi.org
And 2 more in this version.
pydantic-settings 2.7.0 breaking changes
- Behavior changed
The internal CLI parser has abbreviations disabled, so abbreviated flag names are no longer accepted. Users who typed shortened option names must use the full flag names. github.com - Default changed
protected_namespaces
The default protected_namespaces setting was relaxed, so fewer field names trigger protected-namespace warnings. Code that relied on the old default warnings or behavior may need review. github.com
And 2 more in this version.
pydantic-settings 2.6.1 breaking changes
- Removed
pydantic_settings.utils.path_type_labels
pydantic_settings.utils.path_type_labels was removed in pydantic-settings 2.6.1 pypi.org - Behavior changed
The release reverts the earlier fix for context not being passed to field validators, so code that relied on that fix may behave differently. Check any field validators that use context. github.com
pydantic-settings 2.6.0 breaking changes
- Removed
pydantic_settings.SettingsConfigDict.cli_settings_source
SettingsConfigDict.cli_settings_source was removed in pydantic-settings 2.6.0 pypi.org - Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str |... pypi.org
And 3 more in this version.
pydantic-settings 2.5.0 breaking changes
- Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None... pypi.org - Signature changed
pydantic_settings.CliSettingsSource.__call__
Was def __call__(self, *, args: list[str] | tuple[str, ...] | bool | None = None, parsed_args: Namespace | dict[str, list[str] | str] | None = None) -> dict[str, Any] | CliSettingsSource[T]; now def __call__(self, *, args: list[str] |... pypi.org
And 4 more in this version.
pydantic-settings 2.4.0 breaking changes
- Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None... pypi.org - Signature changed
pydantic_settings.CliSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], cli_prog_name: str | None = None, cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, cli_parse_none_str: str | None = None, cli_hide_none_type: bool | None = None... pypi.org
pydantic-settings 2.3.2 breaking changes
- Signature changed
pydantic_settings.EnvSettingsSource.next_field
Was @staticmethod def next_field(field: FieldInfo | Any | None, key: str) -> FieldInfo | None; now @staticmethod def next_field(field: FieldInfo | Any | None, key: str, case_sensitive: bool | None = None) -> FieldInfo | None. pypi.org
pydantic-settings 2.3.0 breaking changes
- Signature changed
pydantic_settings.BaseSettings.__init__
Was def __init__(__pydantic_self__, _case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = ENV_FILE_SENTINEL, _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None... pypi.org - Signature changed
pydantic_settings.DotEnvSettingsSource.__init__
Was def __init__(self, settings_cls: type[BaseSettings], env_file: DotenvType | None = ENV_FILE_SENTINEL, env_file_encoding: str | None = None, case_sensitive: bool | None = None, env_prefix: str | None = None, env_nested_delimiter: str |... pypi.org
And 3 more in this version.
pydantic-settings 2.2.1 breaking changes
- Removed
pydantic_settings.SettingsConfigDict.toml_file_encoding
SettingsConfigDict.toml_file_encoding was removed in pydantic-settings 2.2.1 pypi.org - Removed
pydantic_settings.TomlConfigSettingsSource.toml_file_encoding
TomlConfigSettingsSource.toml_file_encoding was removed in pydantic-settings 2.2.1 pypi.org
And 4 more in this version.
pydantic-settings 2.2.0 breaking changes
- Behavior changed
Environment variables that are set but empty are now ignored by the settings sources. Code that relied on an empty value being read must set a non-empty value or pass the value another way. github.com - Behavior changed
Values from the nested environment variable source now take precedence over the nested init source. Code relying on the previous precedence may get different values. github.com
And 9 more in this version.
pydantic-settings 2.1.0 breaking changes
- Removed
Python 3.7 is no longer supported in this release. Users on Python 3.7 must upgrade Python before upgrading pydantic-settings. github.com
pydantic-settings 2.0.1 breaking changes
- Default changed
PydanticBaseEnvSettingsSource.__init__
PydanticBaseEnvSettingsSource.__init__ now uses config values as its defaults, so code relying on the old default arguments may behave differently. github.com
pydantic-settings 2.0.0 breaking changes
- Removed
pydantic_settings.main.env_file_sentinel
pydantic_settings.main.env_file_sentinel was removed in pydantic-settings 2.0.0 pypi.org - Removed
pydantic_settings.sources.find_case_path
pydantic_settings.sources.find_case_path was removed in pydantic-settings 2.0.0 pypi.org
And 11 more in this version.
pydantic-settings 2.0a3 breaking changes
- Behavior changed
env_prefix
When a field sets validation_alias, the env_prefix no longer applies to that field. Code relying on the prefix for such fields will read different environment variables. github.com - Behavior changed
field_is_complex
The release changed how field_is_complex decides whether a field is complex, to match pydantic v1. Check code that relies on its results. github.com
pydantic-settings 1.99 breaking changes
- Removed
pydantic_settings.__author__
pydantic_settings.__author__ was removed in pydantic-settings 1.99 pypi.org - Removed
pydantic_settings.attrs_docs
pydantic_settings.attrs_docs was removed in pydantic-settings 1.99 pypi.org
And 17 more in this version.
Related packages
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.