●Change8

v2.9.0

Breaking Changes
πŸ“¦ pydantic-settingsView on GitHub β†’
⚠ 2 breaking✨ 10 featuresπŸ› 5 fixesπŸ”§ 5 symbols

Summary

pydantic-settings v2.9.0 drops Python 3.8, refactors the sources module, adds secret manager integrations and several CLI enhancements, while fixing documentation typos and updating the pydantic core dependency.

⚠️ Breaking Changes

  • Dropped support for Python 3.8; upgrade your runtime to Python 3.9 or newer.
  • Refactored `sources.py` into a `sources` subpackage, breaking imports that referenced `pydantic_settings.sources` directly. Update imports to `pydantic_settings.sources.<module>`.

Migration Steps

  1. Replace any `from pydantic_settings import sources` imports with `from pydantic_settings import sources` submodule usage, e.g., `from pydantic_settings.sources import <module>`.
  2. Review code that relied on the previous `sources.py` layout and adjust import paths accordingly.
  3. If you used the CLI, verify new flags (`--json-default`, `--suppress-submodel`, `--allow-unknown-args`) and update scripts.
  4. Ensure your project’s `pyproject.toml` or `requirements.txt` reflects the updated `pydantic` version constraint.

✨ New Features

  • Switched internal type handling to the `typing-inspection` library.
  • Added `uv` as a project management tool integration.
  • Added support for AWS Secrets Manager as a settings source.
  • Added support for GCP Secret Manager as a settings source.
  • Improved Azure Key Vault handling to skip disabled secrets.
  • CLI now supports optional default values for JSON output.
  • CLI submodel suppression flag added.
  • CLI can now retrieve unknown arguments without error.
  • Refactored `sources.py` into a dedicated subpackage for better organization.
  • Updated the underlying `pydantic` dependency to the latest 2.x release.

πŸ› Bug Fixes

  • Fixed typo in documentation.
  • Corrected spelling mistake "conotations" β†’ "connotations".
  • Fixed environment variable nested enum parsing.
  • Fixed CI check script.
  • General cleanup and minor typo fixes.

πŸ”§ Affected Symbols

pydantic_settings.sourcespydantic_settings.aws_secrets_managerpydantic_settings.gcp_secret_managerpydantic_settings.azure_key_vaultpydantic_settings.cli