Skip to content

Commit

Permalink
⬆️ Fix custom settings class with pydantic-settings~=2.6 (#6644)
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov authored Nov 5, 2024
1 parent 24218c1 commit b01c4a7
Show file tree
Hide file tree
Showing 36 changed files with 1,680 additions and 73 deletions.
62 changes: 61 additions & 1 deletion packages/aws-library/requirements/_base.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/common-library/requirements/_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pydantic-core==2.23.4
# via
# -c requirements/_base.txt
# pydantic
pydantic-settings==2.5.2
pydantic-settings==2.6.1
# via -r requirements/_test.in
pytest==8.3.3
# via
Expand Down
29 changes: 27 additions & 2 deletions packages/dask-task-models-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ importlib-metadata==8.5.0
# via dask
jinja2==3.1.4
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# distributed
Expand All @@ -55,10 +58,16 @@ msgpack==1.1.0
# via distributed
orjson==3.10.7
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
packaging==24.1
# via
# dask
Expand All @@ -69,19 +78,29 @@ psutil==6.0.0
# via distributed
pydantic==2.9.1
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/_base.in
# -r requirements/_base.in
# pydantic-extra-types
# pydantic-settings
pydantic-core==2.23.3
# via pydantic
pydantic-extra-types==2.9.0
# via -r requirements/../../../packages/models-library/requirements/_base.in
pydantic-settings==2.5.2
# via
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
pydantic-settings==2.6.1
# via
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/_base.in
Expand All @@ -93,7 +112,10 @@ python-dotenv==1.0.1
# via pydantic-settings
pyyaml==6.0.2
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# dask
Expand Down Expand Up @@ -136,7 +158,10 @@ typing-extensions==4.12.2
# typer
urllib3==2.2.3
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# distributed
Expand Down
10 changes: 8 additions & 2 deletions packages/models-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,25 @@ jsonschema-specifications==2023.12.1
# via jsonschema
orjson==3.10.7
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/_base.in
pydantic==2.9.2
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/_base.in
# pydantic-extra-types
# pydantic-settings
pydantic-core==2.23.4
# via pydantic
pydantic-extra-types==2.9.0
# via -r requirements/_base.in
pydantic-settings==2.4.0
# via
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/_base.in
pydantic-settings==2.6.1
# via -r requirements/_base.in
python-dateutil==2.9.0.post0
# via arrow
Expand Down
37 changes: 35 additions & 2 deletions packages/notifications-library/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ idna==3.10
# yarl
jinja2==3.1.4
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/_base.in
Expand All @@ -41,8 +45,12 @@ jsonschema-specifications==2023.12.1
# via jsonschema
mako==1.3.5
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# alembic
Expand All @@ -58,29 +66,50 @@ multidict==6.1.0
# via yarl
orjson==3.10.7
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
psycopg2-binary==2.9.9
# via sqlalchemy
pydantic==2.9.1
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/postgres-database/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/_base.in
# pydantic-extra-types
# pydantic-settings
pydantic-core==2.23.3
# via pydantic
pydantic-extra-types==2.9.0
# via -r requirements/../../../packages/models-library/requirements/_base.in
pydantic-settings==2.5.2
# via
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/_base.in
pydantic-settings==2.6.1
# via
# -r requirements/../../../packages/models-library/requirements/_base.in
# -r requirements/../../../packages/settings-library/requirements/_base.in
Expand Down Expand Up @@ -108,8 +137,12 @@ six==1.16.0
# via python-dateutil
sqlalchemy==1.4.54
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/postgres-database/requirements/_base.in
Expand Down
14 changes: 14 additions & 0 deletions packages/postgres-database/requirements/_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,42 @@ idna==3.10
# via yarl
mako==1.3.5
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# alembic
markupsafe==2.1.5
# via mako
multidict==6.1.0
# via yarl
orjson==3.10.11
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
psycopg2-binary==2.9.9
# via sqlalchemy
pydantic==2.9.1
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/../../../packages/common-library/requirements/_base.in
# -r requirements/_base.in
# pydantic-extra-types
pydantic-core==2.23.3
# via pydantic
pydantic-extra-types==2.10.0
# via -r requirements/../../../packages/common-library/requirements/_base.in
sqlalchemy==1.4.54
# via
# -c requirements/../../../packages/common-library/requirements/../../../requirements/constraints.txt
# -c requirements/../../../requirements/constraints.txt
# -r requirements/_base.in
# alembic
typing-extensions==4.12.2
# via
# alembic
# pydantic
# pydantic-core
# pydantic-extra-types
yarl==1.12.1
# via -r requirements/_base.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def external_envfile_dict(request: pytest.FixtureRequest) -> EnvVarsDict:
print("🚨 EXTERNAL `envfile` option detected. Loading", envfile, "...")

assert isinstance(envfile, Path)
assert envfile.exists()
assert envfile.is_file()

envs = load_dotenv(envfile)
Expand Down
Loading

0 comments on commit b01c4a7

Please sign in to comment.