-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from Deltares/feat/GEOLIB-219-Force-Pydantic-v2
Feat/geolib 219 force pydantic v2 (restored)
- Loading branch information
Showing
8 changed files
with
122 additions
and
182 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
"""This module contaiuns the logic to support both pydantic v1 and v2 | ||
""" | ||
from pydantic import VERSION as PYDANTIC_VERSION | ||
|
||
IS_PYDANTIC_V2 = PYDANTIC_VERSION.startswith("2.") | ||
|
||
if IS_PYDANTIC_V2: | ||
try: | ||
from pydantic_extra_types.color import Color | ||
from pydantic_settings import BaseSettings | ||
except ImportError: | ||
raise ImportError( | ||
"Please install `pydantic-settings` and `pydantic-extra-types` to use geolib with " | ||
"pydantic v2 with `pip install pydantic-settings pydantic-extra-types`. Alternatively, " | ||
"you can install geolib with the extra required packages by running `pip install " | ||
"geolib[pydantic-v2]`." | ||
) | ||
else: | ||
# Example of how to raise a DeprecationWarning. Should be enabled when it is decided to remove | ||
# support for pydantic v1 in a future release. | ||
# raise DeprecationWarning( | ||
# "Support for pydantic v1 will be removed in the next major release. Please upgrade to pydantic v2." | ||
# ) | ||
pass |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,102 @@ | ||
alabaster==0.7.13 ; python_version >= "3.9" and python_version < "3.13" | ||
anyio==4.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
argcomplete==3.1.6 ; python_version >= "3.9" and python_version < "3.13" | ||
alabaster==0.7.16 ; python_version >= "3.9" and python_version < "3.13" | ||
annotated-types==0.7.0 ; python_version >= "3.9" and python_version < "3.13" | ||
anyio==4.4.0 ; python_version >= "3.9" and python_version < "3.13" | ||
argcomplete==3.4.0 ; python_version >= "3.9" and python_version < "3.13" | ||
asttokens==2.4.1 ; python_version >= "3.9" and python_version < "3.13" | ||
babel==2.13.1 ; python_version >= "3.9" and python_version < "3.13" | ||
black==23.11.0 ; python_version >= "3.9" and python_version < "3.13" | ||
certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.13" | ||
babel==2.15.0 ; python_version >= "3.9" and python_version < "3.13" | ||
black==23.12.1 ; python_version >= "3.9" and python_version < "3.13" | ||
certifi==2024.7.4 ; python_version >= "3.9" and python_version < "3.13" | ||
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13" | ||
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13" | ||
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" | ||
commitizen==3.12.0 ; python_version >= "3.9" and python_version < "3.13" | ||
commitizen==3.28.0 ; python_version >= "3.9" and python_version < "3.13" | ||
commonmark==0.9.1 ; python_version >= "3.9" and python_version < "3.13" | ||
contourpy==1.2.0 ; python_version >= "3.9" and python_version < "3.13" | ||
coverage[toml]==7.3.2 ; python_version >= "3.9" and python_version < "3.13" | ||
contourpy==1.2.1 ; python_version >= "3.9" and python_version < "3.13" | ||
coverage[toml]==7.6.0 ; python_version >= "3.9" and python_version < "3.13" | ||
cycler==0.12.1 ; python_version >= "3.9" and python_version < "3.13" | ||
decli==0.6.1 ; python_version >= "3.9" and python_version < "3.13" | ||
decli==0.6.2 ; python_version >= "3.9" and python_version < "3.13" | ||
devtools==0.11.0 ; python_version >= "3.9" and python_version < "3.13" | ||
docutils==0.20.1 ; python_version >= "3.9" and python_version < "3.13" | ||
exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11" | ||
dnspython==2.6.1 ; python_version >= "3.9" and python_version < "3.13" | ||
docutils==0.21.2 ; python_version >= "3.9" and python_version < "3.13" | ||
email-validator==2.2.0 ; python_version >= "3.9" and python_version < "3.13" | ||
exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" | ||
executing==2.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
fastapi==0.95.1 ; python_version >= "3.9" and python_version < "3.13" | ||
fastapi-cli==0.0.4 ; python_version >= "3.9" and python_version < "3.13" | ||
fastapi==0.111.1 ; python_version >= "3.9" and python_version < "3.13" | ||
flake8==6.1.0 ; python_version >= "3.9" and python_version < "3.13" | ||
fonttools==4.44.1 ; python_version >= "3.9" and python_version < "3.13" | ||
fonttools==4.53.1 ; python_version >= "3.9" and python_version < "3.13" | ||
h11==0.14.0 ; python_version >= "3.9" and python_version < "3.13" | ||
httpcore==0.17.3 ; python_version >= "3.9" and python_version < "3.13" | ||
httptools==0.6.1 ; python_version >= "3.9" and python_version < "3.13" | ||
httpx==0.24.1 ; python_version >= "3.9" and python_version < "3.13" | ||
idna==3.4 ; python_version >= "3.9" and python_version < "3.13" | ||
idna==3.7 ; python_version >= "3.9" and python_version < "3.13" | ||
imagesize==1.4.1 ; python_version >= "3.9" and python_version < "3.13" | ||
importlib-metadata==6.8.0 ; python_version >= "3.9" and python_version < "3.13" | ||
importlib-resources==6.1.1 ; python_version >= "3.9" and python_version < "3.10" | ||
importlib-metadata==8.0.0 ; python_version >= "3.9" and python_version < "3.10" | ||
importlib-resources==6.4.0 ; python_version >= "3.9" and python_version < "3.10" | ||
iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
isort==5.12.0 ; python_version >= "3.9" and python_version < "3.13" | ||
jinja2==3.1.3 ; python_version >= "3.9" and python_version < "3.13" | ||
isort==5.13.2 ; python_version >= "3.9" and python_version < "3.13" | ||
jinja2==3.1.4 ; python_version >= "3.9" and python_version < "3.13" | ||
kiwisolver==1.4.5 ; python_version >= "3.9" and python_version < "3.13" | ||
markupsafe==2.1.3 ; python_version >= "3.9" and python_version < "3.13" | ||
matplotlib==3.8.1 ; python_version >= "3.9" and python_version < "3.13" | ||
markdown-it-py==3.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
markupsafe==2.1.5 ; python_version >= "3.9" and python_version < "3.13" | ||
matplotlib==3.9.1 ; python_version >= "3.9" and python_version < "3.13" | ||
mccabe==0.7.0 ; python_version >= "3.9" and python_version < "3.13" | ||
mdurl==0.1.2 ; python_version >= "3.9" and python_version < "3.13" | ||
mypy-extensions==1.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
mypy==1.7.0 ; python_version >= "3.9" and python_version < "3.13" | ||
numpy==1.26.2 ; python_version >= "3.9" and python_version < "3.13" | ||
packaging==23.2 ; python_version >= "3.9" and python_version < "3.13" | ||
pathspec==0.11.2 ; python_version >= "3.9" and python_version < "3.13" | ||
pillow==10.2.0 ; python_version >= "3.9" and python_version < "3.13" | ||
platformdirs==4.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pluggy==1.3.0 ; python_version >= "3.9" and python_version < "3.13" | ||
mypy==1.11.0 ; python_version >= "3.9" and python_version < "3.13" | ||
numpy==2.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
packaging==24.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pathspec==0.12.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pillow==10.4.0 ; python_version >= "3.9" and python_version < "3.13" | ||
platformdirs==4.2.2 ; python_version >= "3.9" and python_version < "3.13" | ||
pluggy==1.5.0 ; python_version >= "3.9" and python_version < "3.13" | ||
prompt-toolkit==3.0.36 ; python_version >= "3.9" and python_version < "3.13" | ||
pycodestyle==2.11.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pydantic==1.10.13 ; python_version >= "3.9" and python_version < "3.13" | ||
pydantic-core==2.20.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pydantic-extra-types==2.9.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pydantic-settings==2.3.4 ; python_version >= "3.9" and python_version < "3.13" | ||
pydantic==2.8.2 ; python_version >= "3.9" and python_version < "3.13" | ||
pyflakes==3.1.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pygments==2.16.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pyparsing==3.1.1 ; python_version >= "3.9" and python_version < "3.13" | ||
pygments==2.18.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pyparsing==3.1.2 ; python_version >= "3.9" and python_version < "3.13" | ||
pytest-cov==4.1.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pytest==7.4.3 ; python_version >= "3.9" and python_version < "3.13" | ||
python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.13" | ||
python-dotenv==1.0.0 ; python_version >= "3.9" and python_version < "3.13" | ||
pytest==7.4.4 ; python_version >= "3.9" and python_version < "3.13" | ||
python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "3.13" | ||
python-dotenv==1.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
python-multipart==0.0.9 ; python_version >= "3.9" and python_version < "3.13" | ||
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
questionary==2.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
recommonmark==0.7.1 ; python_version >= "3.9" and python_version < "3.13" | ||
releases==2.1.1 ; python_version >= "3.9" and python_version < "3.13" | ||
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13" | ||
requests==2.32.3 ; python_version >= "3.9" and python_version < "3.13" | ||
rich==13.7.1 ; python_version >= "3.9" and python_version < "3.13" | ||
semantic-version==2.6.0 ; python_version >= "3.9" and python_version < "3.13" | ||
setuptools==68.2.2 ; python_version >= "3.12" and python_version < "3.13" | ||
shapely==2.0.2 ; python_version >= "3.9" and python_version < "3.13" | ||
shapely==2.0.5 ; python_version >= "3.9" and python_version < "3.13" | ||
shellingham==1.5.4 ; python_version >= "3.9" and python_version < "3.13" | ||
six==1.16.0 ; python_version >= "3.9" and python_version < "3.13" | ||
sniffio==1.3.0 ; python_version >= "3.9" and python_version < "3.13" | ||
sniffio==1.3.1 ; python_version >= "3.9" and python_version < "3.13" | ||
snowballstemmer==2.2.0 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinx-autodoc-typehints==1.25.2 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinx-autodoc-typehints==1.25.3 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinx-multiversion==0.2.4 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinx==7.2.6 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-applehelp==1.0.7 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-devhelp==1.0.5 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-htmlhelp==2.0.4 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinx==7.4.7 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-applehelp==1.0.8 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-devhelp==1.0.6 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-htmlhelp==2.0.6 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-qthelp==1.0.6 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-serializinghtml==1.1.9 ; python_version >= "3.9" and python_version < "3.13" | ||
starlette==0.26.1 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-qthelp==1.0.8 ; python_version >= "3.9" and python_version < "3.13" | ||
sphinxcontrib-serializinghtml==1.1.10 ; python_version >= "3.9" and python_version < "3.13" | ||
starlette==0.37.2 ; python_version >= "3.9" and python_version < "3.13" | ||
teamcity-messages==1.32 ; python_version >= "3.9" and python_version < "3.13" | ||
termcolor==2.3.0 ; python_version >= "3.9" and python_version < "3.13" | ||
termcolor==2.4.0 ; python_version >= "3.9" and python_version < "3.13" | ||
tomli==2.0.1 ; python_version >= "3.9" and python_full_version <= "3.11.0a6" | ||
tomlkit==0.11.8 ; python_version >= "3.9" and python_version < "3.13" | ||
typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13" | ||
urllib3==2.1.0 ; python_version >= "3.9" and python_version < "3.13" | ||
typer==0.12.3 ; python_version >= "3.9" and python_version < "3.13" | ||
typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.13" | ||
urllib3==2.2.2 ; python_version >= "3.9" and python_version < "3.13" | ||
uvicorn==0.21.1 ; python_version >= "3.9" and python_version < "3.13" | ||
wcwidth==0.2.10 ; python_version >= "3.9" and python_version < "3.13" | ||
zipp==3.17.0 ; python_version >= "3.9" and python_version < "3.13" | ||
uvicorn[standard]==0.21.1 ; python_version >= "3.9" and python_version < "3.13" | ||
uvloop==0.19.0 ; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" and python_version >= "3.9" and python_version < "3.13" | ||
watchfiles==0.22.0 ; python_version >= "3.9" and python_version < "3.13" | ||
wcwidth==0.2.13 ; python_version >= "3.9" and python_version < "3.13" | ||
websockets==12.0 ; python_version >= "3.9" and python_version < "3.13" | ||
zipp==3.19.2 ; python_version >= "3.9" and python_version < "3.13" |
Oops, something went wrong.