pydantic / pydantic-settings

Settings management using pydantic

Home Page:https://docs.pydantic.dev/latest/usage/pydantic_settings/

Repository from Github https://github.compydantic/pydantic-settingsRepository from Github https://github.compydantic/pydantic-settings

Bug: DEFAULT_PATH import error after 2.9.0

atti92 opened this issue · comments

ImportError: cannot import name 'DEFAULT_PATH' from 'pydantic_settings.sources' (/usr/local/lib/python3.10/site-packages/pydantic_settings/sources/__init__.py)

This used to be importable from pydantic_settings.sources and now this is failing in our public packages where we depended on compatible versions for v2 major.

This public field was not deprecated or private, so nothing warrants the change.

I see this has been moved to pydantic_settings.sources.types and the "export" is missing in the __init__.py.

Since we can't fix imports in released packages, this is very important for us.

Thank you!

Thanks @atti92 for reporting this.
I created #606 to fix the problem.
Can you confirm the fix?

Yes, this is exactly what we need :)

Thanks @atti92 for your feedback. I just merged the PR. It will be available in the next release!