mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Modifef other references to pydantic
This commit is contained in:
parent
d5c323b2d8
commit
aa58d7528d
|
@ -223,7 +223,7 @@ the container will call ``config.from_pydantic()`` automatically:
|
|||
|
||||
or install ``pydantic`` directly::
|
||||
|
||||
pip install pydantic
|
||||
pip install pydantic-settings
|
||||
|
||||
*Don't forget to mirror the changes in the requirements file.*
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
|
||||
from dependency_injector import containers, providers
|
||||
from pydantic import BaseSettings, Field
|
||||
from pydantic_settings import BaseSettings, Field
|
||||
|
||||
# Emulate environment variables
|
||||
os.environ["AWS_ACCESS_KEY_ID"] = "KEY"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import os
|
||||
|
||||
from dependency_injector import containers, providers
|
||||
from pydantic import BaseSettings, Field
|
||||
from pydantic_settings import BaseSettings, Field
|
||||
|
||||
# Emulate environment variables
|
||||
os.environ["AWS_ACCESS_KEY_ID"] = "KEY"
|
||||
|
|
|
@ -49,7 +49,7 @@ except ImportError:
|
|||
yaml = None
|
||||
|
||||
try:
|
||||
import pydantic
|
||||
import pydantic_settings as pydantic
|
||||
except ImportError:
|
||||
pydantic = None
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from pathlib import Path
|
||||
|
||||
from dependency_injector import providers
|
||||
from pydantic import BaseSettings as PydanticSettings
|
||||
from pydantic_settings import BaseSettings as PydanticSettings
|
||||
|
||||
|
||||
# Test 1: to check the getattr
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Configuration.from_pydantic() tests."""
|
||||
|
||||
import pydantic
|
||||
import pydantic_settings as pydantic
|
||||
from dependency_injector import providers, errors
|
||||
from pytest import fixture, mark, raises
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Configuration.from_pydantic() tests."""
|
||||
|
||||
import pydantic
|
||||
import pydantic_settings as pydantic
|
||||
from dependency_injector import providers
|
||||
from pytest import fixture, mark, raises
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user