Change8

v2.13.0

📦 pydantic-settingsView on GitHub →
10 features🐛 14 fixes🔧 7 symbols

Summary

This release introduces significant enhancements to CLI argument handling, deep merging for config sources, and improved support for cloud secret managers like AWS and GCP. Several bug fixes address issues related to environment variable loading and alias resolution.

Migration Steps

  1. If you rely on environment variable casing for Azure Key Vault secrets, note that `snake_case_conversion` is now supported when using `env_prefix`.

✨ New Features

  • Added deep merge functionality to config file sources.
  • Added support for AWS Secrets Manager VersionId parameter.
  • Introduced CliToggleFlag and CliDualFlag.
  • Added support for CLI serialize styles.
  • Added support for overriding default help on CLI internal parser.
  • Added CLI format_help method support.
  • Added support for GCP SecretVersion annotation for per-field secret versioning.
  • Allowed snake_case_conversion with env_prefix for Azure Key Vault source.
  • Added support for CLI coercing numeric types.
  • Added support for displaying Union Discriminator Choices in CLI help text.

🐛 Bug Fixes

  • Fixed deterministic alias selection when using validate_by_name.
  • Fixed returning `None` for inaccessible GCP Secret Manager secrets.
  • Fixed bug related to cli_kebab_case="all" and CliImplicitFlag[bool].
  • Fixed unpacking type aliases when looking for `NoDecode`.
  • Fixed CLI duplicate enum field values.
  • Fixed loading nested config from environment variables.
  • Added support for non-Path files (like Traversable) and opening files using Path.open method.
  • Fixed CLI external list arguments handling.
  • Fixed case-insensitive retrieval in GoogleSecretManagerSettingsSource.
  • Fixed CLI help text formatting.
  • Avoided conflicts with the `NAME` environment variable in WSL.
  • Fixed deterministic order when restoring init kwargs.
  • Fixed overriding preferred_key only when no value was found.
  • Added support for nested path in yaml_config_section.

Affected Symbols