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
- Replace any `from pydantic_settings import sources` imports with `from pydantic_settings import sources` submodule usage, e.g., `from pydantic_settings.sources import <module>`.
- Review code that relied on the previous `sources.py` layout and adjust import paths accordingly.
- If you used the CLI, verify new flags (`--json-default`, `--suppress-submodel`, `--allow-unknown-args`) and update scripts.
- 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