Change8

v2.14.0

📦 pydantic-settingsView on GitHub →
2 features🐛 12 fixes🔧 6 symbols

Summary

This release focuses heavily on bug fixes across CLI parsing, environment variable handling, and model coercion, alongside adding support for reading .env files from FIFOs.

Migration Steps

  1. Migrate `boto3-stubs` dependency to `types-boto3`.

✨ New Features

  • Support reading .env files from FIFOs (e.g. 1Password Environments)
  • Allow customisation of the dotevn setting source to filter variables

🐛 Bug Fixes

  • Fix parsing env vars into Optional Strict types
  • Fix RecursionError with mutually recursive models in CLI
  • Fix env_file from model_config ignored in CliApp.run()
  • Fix AliasChoices ignored when changing provider priority
  • Fix KeyError in run_subcommand for underscore field names
  • Fix `Literal[numeric Enum]` coercion for CLI and env vars
  • Fix nested discriminated unions not discovered by env/CLI providers
  • CLI ensure env nested max split internally.
  • Fix CLI not recognizing field name with validate_by_name and AliasChoices
  • Fix CliPositionalArg[list[CustomType]] crash for custom types
  • Fix `cli_ignore_unknown_args=True` not working on subcommands
  • Fix CLI descriptions lost under `python -OO` by falling back to `json_schema_extra`

Affected Symbols