Skip to content

chore(deps): bump pydantic-settings from 2.15.0 to 2.16.2 - #75

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pydantic-settings-2.16.2
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/pydantic-settings-2.16.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Bumps pydantic-settings from 2.15.0 to 2.16.2.

Release notes

Sourced from pydantic-settings's releases.

v2.16.2

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.

What's Changed

New Contributors

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

v2.16.1

Highlights

... (truncated)

Commits
  • 94150a0 Prepare release 2.16.2 (#1111)
  • 9e02de0 Fix JSON decoding of nested dictionary environment values (#1109)
  • 7e2dacb Fix CliApp reconstruction of AliasPath inputs (#1096)
  • 2d1f924 Fix explicit nested secrets directory precedence (#1093)
  • e9588ae Fix regressions from nested dict union value decoding (#1089) (#1097)
  • e71a53e Decode nested dictionary values with complex union types (#1089)
  • 8dc9e05 Resolve only the discriminator annotation of stdlib dataclass defaults (#1077)
  • c50c853 Detect nested Field discriminators in default partial updates (#1076)
  • 9aabb8a build(deps): bump the python-packages group with 3 updates (#1056)
  • 4e286e2 Prepare release 2.16.1 (#1087)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Nov 4, 2026
@dependabot
dependabot Bot force-pushed the dependabot/pip/pydantic-settings-2.16.2 branch from a734b6d to f933df1 Compare November 15, 2026 07:30
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.15.0 to 2.16.2.
- [Release notes](https://github.com/pydantic/pydantic-settings/releases)
- [Commits](pydantic/pydantic-settings@v2.15.0...v2.16.2)

---
updated-dependencies:
- dependency-name: pydantic-settings
  dependency-version: 2.16.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/pip/pydantic-settings-2.16.2 branch from f933df1 to b723276 Compare November 15, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants