Skip to content

Update dependency pydantic-settings to v2.16.2 - #144

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pydantic-settings-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/pydantic-settings-2.x

Conversation

@renovate

@renovate renovate Bot commented Jun 3, 2024 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
pydantic-settings (changelog) 2.2.1 → 2.16.2 age confidence

Release Notes

pydantic/pydantic-settings (pydantic-settings)

v2.16.2

Compare Source

Highlights

This patch release fixes env decoding of nested dictionary values, CliApp handling of AliasPath, nested secrets directory precedence and discriminated union defaults with nested_model_default_partial_update.

Behavior changes
  • An explicit secrets_dir on NestedSecretsSettingsSource now takes precedence (#​1093). Previously it was ignored when the wrapped SecretsSettingsSource inherited a directory from model config, and an explicit empty list was masked too. The order is now: the wrapper's secrets_dir argument, then the wrapped source's directory, then model config. If you pass both Settings(_secrets_dir=...) and NestedSecretsSettingsSource(..., secrets_dir=...), the wrapper's argument now wins.
Bug fixes

Env and dotenv sources

  • Dictionary values typed as a union, such as dict[str, list[str] | str] or dict[str, list[str] | None], now JSON-decode values set through env_nested_delimiter (#​1089, #​1097). Only JSON arrays and objects are decoded, so plain values like 123, true or "quoted" are kept as strings. Decoding follows enable_decoding and the NoDecode/ForceDecode of the field that holds the dict, and type aliases and Annotated value types are resolved.
  • Nested dictionary values such as dict[str, list[dict[str, str]]] are decoded at the right level again (#​1109), so APP_VALUES__X='[{"k":"v"}]' no longer reaches validation as a string.

CLI

  • CliApp.run now rebuilds AliasPath inputs for BaseModel and pydantic dataclass commands (#​1096). A supplied path used to be reduced to the field name, which failed validation. AliasChoices priority is respected and unsupplied path defaults are left to the model.

Discriminated union defaults

  • With nested_model_default_partial_update=True, inner discriminated unions written as Annotated[..., Field(discriminator='...')] are now detected (#​1076). When the incoming tag selects another member, the default's fields are no longer merged into it.
  • A stdlib dataclass default on a discriminated union field no longer raises NameError when another field of the dataclass has a string annotation naming a local class (#​1077). Only the discriminator's own annotation is resolved now.
All changes (including dependency bumps and internal maintenance)

What's Changed

New Contributors

Full Changelog: pydantic/pydantic-settings@v2.16.1...v2.16.2

v2.16.1

Compare Source

Highlights

This patch release fixes two CLI regressions introduced in 2.16.0.

Bug fixes

CLI

  • Fixed-length tuple positionals such as CliPositionalArg[tuple[int, int]] and NamedTuples are single-valued again (#​1069). Since 2.16.0 they were treated as variadic, so a CLI either refused to start with a SettingsError or put the wrong argument into the tuple. Variable-length tuples (tuple[int, ...] and bare Tuple) are still variadic.
  • A field typed as an alias of a list of dicts, e.g. type ListOfDict = list[dict[str, int]], accepts a JSON list again (#​1049). Since 2.16.0, --xx '[{"a":1},{"b":2}]' was merged into the single dict {"a": 1, "b": 2} and failed validation.
All changes (including dependency bumps and internal maintenance)

What's Changed

Full Changelog: pydantic/pydantic-settings@v2.16.0...v2.16.1

v2.16.0

Compare Source

Highlights

Breaking changes and behavior changes
  • Python 3.10 is no longer supported (#​1003). pydantic-settings now requires Python 3.11+, since 3.10 reaches end of life this month. The tomli fallback is gone in favor of stdlib tomllib; the toml extra is kept as an empty extra so pip install pydantic-settings[toml] keeps working.
  • python-dotenv>=1.2.2 is now required (#​971) to pick up the fix for CVE-2026-28684.
  • Aliases are ignored in every source when validate_by_alias=False (#​1033). Env vars, secrets, CLI flags and defaults now use only field names, matching pydantic. An env var named after the alias is now ignored instead of raising extra_forbidden, and the CLI exposes --apple rather than --pomo.
  • validation_alias takes precedence over alias (#​1038). When the two differ, values from JSON/YAML/TOML files and the CLI were silently ignored; they now load. CLI help lists the validation_alias flag first, and CliApp.serialize emits it.
  • CLI case-insensitivity only lowercases registered options (#​1036). With case_sensitive=False, args after -- and those captured by CliUnknownArgs keep their case (-Xmx4G no longer becomes -xmx4g). Unrecognized options are now reported as typed (--NOPE instead of --nope).
  • JSON and YAML config files are read as UTF-8 by default (#​955) instead of the locale encoding, completing the secrets-file fix from 2.15.0. json_file_encoding/yaml_file_encoding still override it.
  • Discriminated union defaults are partially updated again (#​997). This reverts the 2.15.0 regression with nested_model_default_partial_update=True: the default is only dropped when the incoming value selects a different union member.
New features
  • Python 3.15 and pydantic 2.14 support (#​1026, #​1029, #​1022). pydantic 2.14 broke CliApp.run and validate_by_alias=False handling; both are fixed.
  • Cached settings instances via Settings.settings_cached() and Settings.settings_clear_cache() (#​952). These give you a process-local singleton per settings class without hand-rolling lru_cache wrappers. Calling the class directly still builds a fresh instance.
  • AWS Systems Manager Parameter Store source — AWSSystemsManagerSettingsSource (#​941). It recursively reads every parameter under an ssm_path, with / mapping onto nested models. Install it with the new aws-systems-manager extra.
  • env_file_depth (#​940) lets a relative env_file be found in parent directories, mirroring pyproject_toml_depth. This is useful when scripts run from a subdirectory of a monorepo. It defaults to 0, which keeps the current behavior.
  • CliVariadicArg for named variadic options (#​949, #​958). It accepts --param a b c in addition to repeated --param a --param b. Required fields need at least one value.
Bug fixes

CLI

  • CliApp.serialize output now round-trips through CliApp.run for enums, tuples, dates and Decimals (#​988), explicit None values (#​981), empty containers (#​1008), CliVariadicArg values (#​976) and populated CliUnknownArgs fields, which previously raised IndexError (#​992).
  • Empty JSON arrays (--items []) now give an empty list instead of [''] (#​994).
  • Tuples, frozenset, MutableSequence and other collection subtypes are now treated as repeatable/variadic options (#​972), and so are named collection type aliases such as TypeAliasType('Addrs', list[IPvAnyAddress]) (#​1032).
  • cli_exit_on_error=False is now honored in CliSubCommand parsers, which raise SettingsError instead of exiting (#​977).
  • CliSubCommand aliases keep their case with case_sensitive=False (#​989).
  • Each CliUnknownArgs field now receives only its own subcommand's leftover args (#​1004).
  • CliApp.format_help no longer crashes when cli_prefix is set in model_config (#​945).

Type aliases and parsing

  • Named union type aliases (TypeAliasType('V', list[int] | str)) now decode like their inline equivalents in env and dotenv sources, including under Optional, Annotated and custom validation aliases (#​1006, #​1030, #​1041).
  • Resolving a named Annotated type alias no longer mutates shared FieldInfo metadata, which made validators run twice on subclasses or after model_rebuild() (#​979).
  • A bare single-segment AliasPath('SOME_KEY') no longer tries to JSON-decode plain string values (#​980).
  • collections.abc.Set/MutableSet/typing.AbstractSet fields now JSON-decode env values (#​973).
  • A bare typing.Dict field with env_nested_delimiter no longer raises IndexError, which was a regression in 2.13.0 (#​1009).
  • Case-insensitive matching now works for nested pydantic dataclasses (#​1010).

Dotenv, secrets and config files

  • With extra='allow', a non-lowercase env_prefix is now stripped from dotenv extras (#​959, #​968).
  • secrets_case_sensitive=True is now honored on Windows (#​1001).
  • An empty JSON config file is treated as an empty mapping instead of crashing (#​947), matching YAML and TOML.
  • TOML table headers: ~ paths are now expanded when checking that the file exists (#​1034), and an explicit toml_table_header=() now overrides the model config to read the file root (#​1027).

Cloud sources

  • Azure Key Vault and GCP Secret Manager now honor env_parse_none_str (#​1019, #​1040).
  • Azure Key Vault: dash_to_underscore=True now works for nested model fields (#​1025).
  • NestedSecretsSettingsSource now validates its specific constructor arguments (#​975).
  • DotenvFiltering is exported from pydantic_settings.sources.types (#​944).
Documentation
  • Document that runtime validation arguments (strict, extra, context) passed to model_validate() are not applied to BaseSettings, and give a workaround (#​1017).
  • Explain why extra='forbid' doesn't reject misspelled top-level env vars (#​986).
  • Clarify alias plus nested model env lookup with populate_by_name (#​933), and add a nested model example for env_prefix_target (#​953).
  • Fix assorted typos (#​942, #​964).
All changes (including dependency bumps and internal maintenance)

What's Changed

New Contributors

Full Changelog: pydantic/pydantic-settings@v2.15.0...v2.16.0

v2.15.0

Compare Source

Highlights

Behavior changes
  • case_sensitive now applies to init kwargs and config-file sources (#​900). InitSettingsSource and the JSON/TOML/YAML config sources previously ignored case_sensitive. Since it defaults to False, case-insensitive matching is now the default for these sources — e.g. Settings(TeSt=...) now populates a test field where it previously did not. Nested keys are still matched case-sensitively.
  • Fields with unresolved forward references now emit a warning (#​901). Settings sources can silently fail to resolve such fields; they now raise IncompleteFieldDefinitionWarning telling you to call model_rebuild(). If you have filterwarnings = error configured, this may surface as a new failure.
  • Non-JSON env values for strict fields now raise ValidationError (#​926) instead of a less specific error.
New features
  • Show environment variable names in CLI help via cli_show_env_vars=True (#​860), so generated --help output doubles as configuration documentation.
  • PYDANTIC_SETTINGS_DEBUG for debugging settings resolution (#​906, #​913). Set it to a truthy value with DEBUG logging enabled to see each source's contribution in priority order, which source won for each value, and which env_file/secret files were probed, loaded, or skipped — the long-standing "why isn't my .env being picked up?" question.
  • toml_table_header for regular TOML files (#​882, #​886, #​887), letting you root settings at a nested table in any TOML file, not just pyproject.toml.
  • Traversable support for JSON/TOML/YAML file sources (#​902), so you can load config packaged inside a distribution — including files inside a zip or wheel — via importlib.resources.files(...) without casting to Path.
  • GCP: project_id can come from an earlier settings source (#​878), rather than only from the constructor or GOOGLE_CLOUD_PROJECT.
Bug fixes
  • Fix env vars not loading on Windows with case_sensitive=True (#​894). Windows upper-cases os.environ keys, so fields raised Field required instead of picking up their values.
  • Read secret files as UTF-8 instead of the platform locale encoding (#​917). On Windows code pages such as cp1252 this silently corrupted non-ASCII secrets.
  • Fix AliasPath on nested model fields not JSON-decoding env values (#​898).
  • Fix case-insensitive matching for optional nested models (#​905).
  • Fix dotenv extras being wrongly claimed by a complex field sharing a name prefix (#​912) — e.g. dbx_token being swallowed by a db: dict field.
  • Fix nested_model_default_partial_update=True corrupting discriminated unions (#​876).
  • Fix Secret subclasses crashing when loaded from the environment (#​920).
  • Fix enum names not parsing through nested annotations such as Optional[Annotated[MyEnum, ...]] with env_parse_enums=True (#​910).
  • An empty yaml_config_section now falls back to defaults instead of raising AttributeError: 'NoneType' object has no attribute 'keys' (#​914).
  • NestedSecretsSettingsSource no longer follows symlinks pointing outside secrets_dir (#​889).
  • GCP: skip the list_secrets call when case_sensitive=True (#​862), lowering the required IAM permissions to just roles/secretmanager.secretAccessor.
  • AWS: types-boto3[secretsmanager] is no longer required at runtime (#​880).
Documentation
  • Document JSON parsing of complex env values, plus a comma-separated-values recipe (#​919).
  • Recommend an async settings loading pattern (#​908).
  • Clarify behavior when an unprefixed value is present in a dotenv file (#​895).
  • Clarify environment variable helper descriptions (#​867) and fix assorted typos (#​904).
All changes (including dependency bumps and internal maintenance)

What's Changed

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.3.0 Update dependency pydantic-settings to v2.3.1 Jun 5, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from ce54c0d to 41c1fe0 Compare June 5, 2024 16:45
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.3.1 Update dependency pydantic-settings to v2.3.2 Jun 11, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 41c1fe0 to e456efb Compare June 11, 2024 16:38
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.3.2 Update dependency pydantic-settings to v2.3.3 Jun 13, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from e456efb to 8641d20 Compare June 13, 2024 11:22
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 8641d20 to 5099dc2 Compare June 24, 2024 18:45
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.3.3 Update dependency pydantic-settings to v2.3.4 Jun 24, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 5099dc2 to c759be5 Compare July 30, 2024 12:14
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.3.4 Update dependency pydantic-settings to v2.4.0 Jul 30, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from c759be5 to d9641d1 Compare September 10, 2024 15:46
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.4.0 Update dependency pydantic-settings to v2.5.0 Sep 10, 2024
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.5.0 Update dependency pydantic-settings to v2.5.1 Sep 11, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from d9641d1 to 4eee4ff Compare September 11, 2024 08:20
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.5.1 Update dependency pydantic-settings to v2.5.2 Sep 11, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 4eee4ff to 2e823e2 Compare September 11, 2024 11:17
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 2e823e2 to 56bdc54 Compare October 17, 2024 11:07
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.5.2 Update dependency pydantic-settings to v2.6.0 Oct 17, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 56bdc54 to 994eadd Compare November 1, 2024 14:18
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.6.0 Update dependency pydantic-settings to v2.6.1 Nov 1, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 994eadd to 06af8af Compare December 13, 2024 10:53
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.6.1 Update dependency pydantic-settings to v2.7.0 Dec 13, 2024
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 06af8af to d33d2f1 Compare December 31, 2024 12:37
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.7.0 Update dependency pydantic-settings to v2.7.1 Dec 31, 2024
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.7.1 Update dependency pydantic-settings to v2.8.0 Feb 21, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch 2 times, most recently from a543a38 to 0efad72 Compare February 27, 2025 10:38
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.8.0 Update dependency pydantic-settings to v2.8.1 Feb 27, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 0efad72 to 3a9a8fb Compare April 18, 2025 11:40
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.8.1 Update dependency pydantic-settings to v2.9.0 Apr 18, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 3a9a8fb to bbeff38 Compare April 18, 2025 19:04
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.9.0 Update dependency pydantic-settings to v2.9.1 Apr 18, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from bbeff38 to 3d2ccf4 Compare June 21, 2025 16:26
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.9.1 Update dependency pydantic-settings to v2.10.0 Jun 21, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 3d2ccf4 to ffef779 Compare June 24, 2025 17:08
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.10.0 Update dependency pydantic-settings to v2.10.1 Jun 24, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from ffef779 to a258b0b Compare September 24, 2025 14:48
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.10.1 Update dependency pydantic-settings to v2.11.0 Sep 24, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from a258b0b to e219a1d Compare November 10, 2025 23:41
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.11.0 Update dependency pydantic-settings to v2.12.0 Nov 10, 2025
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from e219a1d to 41a6cb2 Compare February 15, 2026 13:02
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.12.0 Update dependency pydantic-settings to v2.13.0 Feb 15, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 41a6cb2 to b4a0d26 Compare February 19, 2026 13:58
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.13.0 Update dependency pydantic-settings to v2.13.1 Feb 19, 2026
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.13.1 Update dependency pydantic-settings to v2.14.0 Apr 20, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from b4a0d26 to 158eda2 Compare April 20, 2026 15:18
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 158eda2 to 431f02b Compare May 8, 2026 18:03
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.14.0 Update dependency pydantic-settings to v2.14.1 May 8, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 431f02b to 6d9bd27 Compare June 19, 2026 14:51
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.14.1 Update dependency pydantic-settings to v2.14.2 Jun 19, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 6d9bd27 to 191c1a6 Compare August 7, 2026 10:29
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.14.2 Update dependency pydantic-settings to v2.15.0 Aug 7, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 191c1a6 to a3f4432 Compare October 14, 2026 14:51
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.15.0 Update dependency pydantic-settings to v2.16.0 Oct 14, 2026
@renovate

renovate Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Creating virtualenv hackspace-api-qCVHzmQm-py3.15 in /home/ubuntu/.cache/pypoetry/virtualenvs

The current project's supported Python range (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:
  - pydantic-settings requires Python >=3.11, so it will not be satisfied for Python >=3.10,<3.11

Because hackspace-api depends on pydantic-settings (2.16.2) which requires Python >=3.11, version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties
    
    For pydantic-settings, a possible solution would be to set the `python` property to ">=3.11,<4.0"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from a3f4432 to 60d8fc6 Compare October 20, 2026 12:44
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.16.0 Update dependency pydantic-settings to v2.16.1 Oct 20, 2026
@renovate
renovate Bot force-pushed the renovate/pydantic-settings-2.x branch from 60d8fc6 to a78c5c4 Compare October 28, 2026 13:26
@renovate renovate Bot changed the title Update dependency pydantic-settings to v2.16.1 Update dependency pydantic-settings to v2.16.2 Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants