You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched (google, github) for similar issues and couldn't find anything
I have read and followed the docs and still think this is a bug
Bug
To reproduce, on Linux OS:
build a config manager that subclasses BaseSettings
add secrets_dir config pointing to dir with text file(s), as per docs
add class attributes to use the files in secrets_dir, as per docs
run the code and inspect/print the attributes
observe that vars coming from .env file work fine, but those from secrets_dir are None, or error if not Optional, and there is no user warning for the secrets_dir itself
Repeat the same on MacOS - it should work OK, the content is read correctly.
dimitri-b
changed the title
Pydantic fails to read content of files in secret_dir on Linux
Pydantic fails to read content of files in secrets_dir on Linux
Sep 28, 2021
Checks
Bug
To reproduce, on Linux OS:
BaseSettings
secrets_dir
config pointing to dir with text file(s), as per docssecrets_dir
, as per docssecrets_dir
are None, or error if not Optional, and there is no user warning for thesecrets_dir
itselfRepeat the same on MacOS - it should work OK, the content is read correctly.
I have added a repo with Dockerfile replicating the setup: https://github.com/dimitri-b/pydantic-secrets-dir-issue
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:The text was updated successfully, but these errors were encountered: