Skip to content

Commit

Permalink
pydantic: Remove deprecation warnings - require pydantic > 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pmav99 committed Dec 13, 2023
1 parent cb29b04 commit 8dcf54d
Show file tree
Hide file tree
Showing 6 changed files with 1,038 additions and 1,049 deletions.
1,915 changes: 946 additions & 969 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ limits = "*"
lxml = "*"
numpy = "*"
pandas = "*"
pydantic = "*"
pydantic = ">2"
requests = "*"
Shapely = "*"
tqdm = "*"
Expand Down
97 changes: 48 additions & 49 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
alabaster==0.7.13 ; python_version >= "3.9" and python_version < "3.13"
annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "3.13"
anyio==4.0.0 ; python_version >= "3.9" and python_version < "3.13"
appnope==0.1.3 ; python_version >= "3.9" and python_version < "3.13" and (platform_system == "Darwin" or sys_platform == "darwin")
anyio==4.1.0 ; python_version >= "3.9" and python_version < "3.13"
appnope==0.1.3 ; python_version >= "3.9" and python_version < "3.13" and platform_system == "Darwin"
asttokens==2.4.1 ; python_version >= "3.9" and python_version < "3.13"
attrs==23.1.0 ; python_version >= "3.9" and python_version < "3.13"
babel==2.13.1 ; python_version >= "3.9" and python_version < "3.13"
babel==2.14.0 ; python_version >= "3.9" and python_version < "3.13"
beautifulsoup4==4.12.2 ; python_version >= "3.9" and python_version < "3.13"
bleach==6.1.0 ; python_version >= "3.9" and python_version < "3.13"
certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.13"
certifi==2023.11.17 ; python_version >= "3.9" and python_version < "3.13"
cffi==1.16.0 ; python_version >= "3.9" and python_version < "3.13" and implementation_name == "pypy"
charset-normalizer==3.3.1 ; python_version >= "3.9" and python_version < "3.13"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13"
click-plugins==1.1.1 ; python_version >= "3.9" and python_version < "3.13"
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
cligj==0.7.2 ; python_version >= "3.9" and python_version < "3.13"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and (platform_system == "Windows" or sys_platform == "win32")
comm==0.1.4 ; python_version >= "3.9" and python_version < "3.13"
contourpy==1.1.1 ; python_version >= "3.9" and python_version < "3.13"
comm==0.2.0 ; python_version >= "3.9" and python_version < "3.13"
contourpy==1.2.0 ; python_version >= "3.9" and python_version < "3.13"
covdefaults==2.3.0 ; python_version >= "3.9" and python_version < "3.13"
coverage==7.3.2 ; python_version >= "3.9" and python_version < "3.13"
coverage[toml]==7.3.2 ; python_version >= "3.9" and python_version < "3.13"
Expand All @@ -29,81 +29,80 @@ docutils==0.20.1 ; python_version >= "3.9" and python_version < "3.13"
dunamai==1.19.0 ; python_version >= "3.9" and python_version < "3.13"
entrypoints==0.4 ; python_version >= "3.9" and python_version < "3.13"
erddapy==2.2.0 ; python_version >= "3.9" and python_version < "3.13"
exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11"
exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11"
execnet==2.0.2 ; python_version >= "3.9" and python_version < "3.13"
executing==2.0.1 ; python_version >= "3.9" and python_version < "3.13"
fastjsonschema==2.18.1 ; python_version >= "3.9" and python_version < "3.13"
fastjsonschema==2.19.0 ; python_version >= "3.9" and python_version < "3.13"
fiona==1.9.5 ; python_version >= "3.9" and python_version < "3.13"
fonttools==4.43.1 ; python_version >= "3.9" and python_version < "3.13"
fonttools==4.46.0 ; python_version >= "3.9" and python_version < "3.13"
furo==2023.9.10 ; python_version >= "3.9" and python_version < "3.13"
geopandas==0.14.0 ; python_version >= "3.9" and python_version < "3.13"
geopandas==0.14.1 ; python_version >= "3.9" and python_version < "3.13"
h11==0.14.0 ; python_version >= "3.9" and python_version < "3.13"
html5lib==1.1 ; python_version >= "3.9" and python_version < "3.13"
httpcore==0.18.0 ; python_version >= "3.9" and python_version < "3.13"
httpx==0.25.0 ; python_version >= "3.9" and python_version < "3.13"
idna==3.4 ; python_version >= "3.9" and python_version < "3.13"
httpcore==1.0.2 ; python_version >= "3.9" and python_version < "3.13"
httpx==0.25.2 ; python_version >= "3.9" and python_version < "3.13"
idna==3.6 ; 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.10"
importlib-resources==6.1.0 ; python_version >= "3.9" and python_version < "3.13"
importlib-metadata==7.0.0 ; python_version >= "3.9" and python_version < "3.10"
importlib-resources==6.1.1 ; python_version >= "3.9" and python_version < "3.13"
iniconfig==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
ipykernel==6.26.0 ; python_version >= "3.9" and python_version < "3.13"
ipython==8.17.1 ; python_version >= "3.9" and python_version < "3.13"
ipykernel==6.27.1 ; python_version >= "3.9" and python_version < "3.13"
ipython==8.18.1 ; python_version >= "3.9" and python_version < "3.13"
jedi==0.19.1 ; python_version >= "3.9" and python_version < "3.13"
jinja2==3.1.2 ; python_version >= "3.9" and python_version < "3.13"
jsonschema-specifications==2023.7.1 ; python_version >= "3.9" and python_version < "3.13"
jsonschema==4.19.2 ; python_version >= "3.9" and python_version < "3.13"
jupyter-client==8.5.0 ; python_version >= "3.9" and python_version < "3.13"
jsonschema-specifications==2023.11.2 ; python_version >= "3.9" and python_version < "3.13"
jsonschema==4.20.0 ; python_version >= "3.9" and python_version < "3.13"
jupyter-client==8.6.0 ; python_version >= "3.9" and python_version < "3.13"
jupyter-core==5.5.0 ; python_version >= "3.9" and python_version < "3.13"
jupyterlab-pygments==0.2.2 ; python_version >= "3.9" and python_version < "3.13"
jupyterlab-pygments==0.3.0 ; python_version >= "3.9" and python_version < "3.13"
kiwisolver==1.4.5 ; python_version >= "3.9" and python_version < "3.13"
limits==3.6.0 ; python_version >= "3.9" and python_version < "3.13"
limits==3.7.0 ; python_version >= "3.9" and python_version < "3.13"
lxml==4.9.3 ; python_version >= "3.9" and python_version < "3.13"
m2r2==0.3.3.post2 ; python_version >= "3.9" and python_version < "3.13"
markupsafe==2.1.3 ; python_version >= "3.9" and python_version < "3.13"
matplotlib-inline==0.1.6 ; python_version >= "3.9" and python_version < "3.13"
matplotlib==3.8.0 ; python_version >= "3.9" and python_version < "3.13"
matplotlib==3.8.2 ; python_version >= "3.9" and python_version < "3.13"
mistune==0.8.4 ; python_version >= "3.9" and python_version < "3.13"
multidict==6.0.4 ; 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.6.1 ; python_version >= "3.9" and python_version < "3.13"
nbclient==0.8.0 ; python_version >= "3.9" and python_version < "3.13"
mypy==1.7.1 ; python_version >= "3.9" and python_version < "3.13"
nbclient==0.9.0 ; python_version >= "3.9" and python_version < "3.13"
nbconvert==6.5.4 ; python_version >= "3.9" and python_version < "3.13"
nbformat==5.9.2 ; python_version >= "3.9" and python_version < "3.13"
nest-asyncio==1.5.8 ; python_version >= "3.9" and python_version < "3.13"
numpy==1.26.1 ; 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"
pandas==2.1.2 ; python_version >= "3.9" and python_version < "3.13"
pandas==2.1.4 ; python_version >= "3.9" and python_version < "3.13"
pandocfilters==1.5.0 ; python_version >= "3.9" and python_version < "3.13"
parso==0.8.3 ; python_version >= "3.9" and python_version < "3.13"
pexpect==4.8.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform != "win32"
pexpect==4.9.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform != "win32"
pillow==10.1.0 ; python_version >= "3.9" and python_version < "3.13"
platformdirs==3.11.0 ; python_version >= "3.9" and python_version < "3.13"
platformdirs==4.1.0 ; python_version >= "3.9" and python_version < "3.13"
pluggy==1.3.0 ; python_version >= "3.9" and python_version < "3.13"
prompt-toolkit==3.0.39 ; python_version >= "3.9" and python_version < "3.13"
prompt-toolkit==3.0.43 ; python_version >= "3.9" and python_version < "3.13"
psutil==5.9.6 ; python_version >= "3.9" and python_version < "3.13"
ptyprocess==0.7.0 ; python_version >= "3.9" and python_version < "3.13" and sys_platform != "win32"
pure-eval==0.2.2 ; python_version >= "3.9" and python_version < "3.13"
pycparser==2.21 ; python_version >= "3.9" and python_version < "3.13" and implementation_name == "pypy"
pydantic-core==2.10.1 ; python_version >= "3.9" and python_version < "3.13"
pydantic==2.4.2 ; python_version >= "3.9" and python_version < "3.13"
pygments==2.16.1 ; python_version >= "3.9" and python_version < "3.13"
pydantic-core==2.14.5 ; python_version >= "3.9" and python_version < "3.13"
pydantic==2.5.2 ; python_version >= "3.9" and python_version < "3.13"
pygments==2.17.2 ; python_version >= "3.9" and python_version < "3.13"
pyparsing==3.1.1 ; python_version >= "3.9" and python_version < "3.13"
pyproj==3.6.1 ; python_version >= "3.9" and python_version < "3.13"
pytest-cov==4.1.0 ; python_version >= "3.9" and python_version < "3.13"
pytest-recording==0.13.0 ; python_version >= "3.9" and python_version < "3.13"
pytest-xdist==3.3.1 ; python_version >= "3.9" and python_version < "3.13"
pytest-recording==0.13.1 ; python_version >= "3.9" and python_version < "3.13"
pytest-xdist==3.5.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"
pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "3.13"
pywin32==306 ; sys_platform == "win32" and platform_python_implementation != "PyPy" and python_version >= "3.9" and python_version < "3.13"
pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "3.13"
pyzmq==25.1.1 ; python_version >= "3.9" and python_version < "3.13"
referencing==0.30.2 ; python_version >= "3.9" and python_version < "3.13"
pyzmq==25.1.2 ; python_version >= "3.9" and python_version < "3.13"
referencing==0.32.0 ; python_version >= "3.9" and python_version < "3.13"
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13"
rpds-py==0.10.6 ; python_version >= "3.9" and python_version < "3.13"
scipy==1.11.3 ; python_version >= "3.9" and python_version < "3.13"
setuptools-scm==8.0.4 ; python_version >= "3.9" and python_version < "3.13"
setuptools==68.2.2 ; python_version >= "3.9" and python_version < "3.13"
rpds-py==0.13.2 ; python_version >= "3.9" and python_version < "3.13"
scipy==1.11.4 ; python_version >= "3.9" and python_version < "3.13"
setuptools==69.0.2 ; python_version >= "3.9" and python_version < "3.13"
shapely==2.0.2 ; 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"
Expand All @@ -122,18 +121,18 @@ stack-data==0.6.3 ; python_version >= "3.9" and python_version < "3.13"
tinycss2==1.2.1 ; python_version >= "3.9" and python_version < "3.13"
toml==0.10.2 ; python_version >= "3.9" and python_version < "3.13"
tomli==2.0.1 ; python_full_version <= "3.11.0a6" and python_version >= "3.9"
tornado==6.3.3 ; python_version >= "3.9" and python_version < "3.13"
tornado==6.4 ; python_version >= "3.9" and python_version < "3.13"
tqdm==4.66.1 ; python_version >= "3.9" and python_version < "3.13"
traitlets==5.13.0 ; python_version >= "3.9" and python_version < "3.13"
traitlets==5.14.0 ; python_version >= "3.9" and python_version < "3.13"
types-requests==2.31.0.6 ; python_version >= "3.9" and python_version < "3.13"
types-urllib3==1.26.25.14 ; python_version >= "3.9" and python_version < "3.13"
typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13"
typing-extensions==4.9.0 ; python_version >= "3.9" and python_version < "3.13"
tzdata==2023.3 ; python_version >= "3.9" and python_version < "3.13"
urllib3==1.26.18 ; python_version >= "3.9" and python_version < "3.13"
vcrpy==5.1.0 ; python_version >= "3.9" and python_version < "3.13"
wcwidth==0.2.8 ; python_version >= "3.9" and python_version < "3.13"
wcwidth==0.2.12 ; python_version >= "3.9" and python_version < "3.13"
webencodings==0.5.1 ; python_version >= "3.9" and python_version < "3.13"
wrapt==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
xarray==2023.10.1 ; python_version >= "3.9" and python_version < "3.13"
yarl==1.9.2 ; python_version >= "3.9" and python_version < "3.13"
wrapt==1.16.0 ; python_version >= "3.9" and python_version < "3.13"
xarray==2023.12.0 ; python_version >= "3.9" and python_version < "3.13"
yarl==1.9.4 ; python_version >= "3.9" and python_version < "3.13"
zipp==3.17.0 ; python_version >= "3.9" and python_version < "3.10"
38 changes: 19 additions & 19 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
annotated-types==0.6.0 ; python_version >= "3.9" and python_version < "3.13"
anyio==4.0.0 ; python_version >= "3.9" and python_version < "3.13"
anyio==4.1.0 ; python_version >= "3.9" and python_version < "3.13"
attrs==23.1.0 ; python_version >= "3.9" and python_version < "3.13"
beautifulsoup4==4.12.2 ; python_version >= "3.9" and python_version < "3.13"
certifi==2023.7.22 ; python_version >= "3.9" and python_version < "3.13"
charset-normalizer==3.3.1 ; python_version >= "3.9" and python_version < "3.13"
certifi==2023.11.17 ; python_version >= "3.9" and python_version < "3.13"
charset-normalizer==3.3.2 ; python_version >= "3.9" and python_version < "3.13"
click-plugins==1.1.1 ; python_version >= "3.9" and python_version < "3.13"
click==8.1.7 ; python_version >= "3.9" and python_version < "3.13"
cligj==0.7.2 ; python_version >= "3.9" and python_version < "3.13"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.13" and platform_system == "Windows"
dataretrieval==1.0.6 ; python_version >= "3.9" and python_version < "3.13"
deprecated==1.2.14 ; python_version >= "3.9" and python_version < "3.13"
erddapy==2.2.0 ; python_version >= "3.9" and python_version < "3.13"
exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11"
exceptiongroup==1.2.0 ; python_version >= "3.9" and python_version < "3.11"
fiona==1.9.5 ; python_version >= "3.9" and python_version < "3.13"
geopandas==0.14.0 ; python_version >= "3.9" and python_version < "3.13"
geopandas==0.14.1 ; python_version >= "3.9" and python_version < "3.13"
h11==0.14.0 ; python_version >= "3.9" and python_version < "3.13"
html5lib==1.1 ; python_version >= "3.9" and python_version < "3.13"
httpcore==0.18.0 ; python_version >= "3.9" and python_version < "3.13"
httpx==0.25.0 ; python_version >= "3.9" and python_version < "3.13"
idna==3.4 ; python_version >= "3.9" and python_version < "3.13"
importlib-metadata==6.8.0 ; python_version >= "3.9" and python_version < "3.10"
importlib-resources==6.1.0 ; python_version >= "3.9" and python_version < "3.13"
limits==3.6.0 ; python_version >= "3.9" and python_version < "3.13"
httpcore==1.0.2 ; python_version >= "3.9" and python_version < "3.13"
httpx==0.25.2 ; python_version >= "3.9" and python_version < "3.13"
idna==3.6 ; python_version >= "3.9" and python_version < "3.13"
importlib-metadata==7.0.0 ; python_version >= "3.9" and python_version < "3.10"
importlib-resources==6.1.1 ; python_version >= "3.9" and python_version < "3.13"
limits==3.7.0 ; python_version >= "3.9" and python_version < "3.13"
lxml==4.9.3 ; python_version >= "3.9" and python_version < "3.13"
numpy==1.26.1 ; 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"
pandas==2.1.2 ; python_version >= "3.9" and python_version < "3.13"
pydantic-core==2.10.1 ; python_version >= "3.9" and python_version < "3.13"
pydantic==2.4.2 ; python_version >= "3.9" and python_version < "3.13"
pandas==2.1.4 ; python_version >= "3.9" and python_version < "3.13"
pydantic-core==2.14.5 ; python_version >= "3.9" and python_version < "3.13"
pydantic==2.5.2 ; python_version >= "3.9" and python_version < "3.13"
pyproj==3.6.1 ; python_version >= "3.9" and python_version < "3.13"
python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "3.13"
pytz==2023.3.post1 ; python_version >= "3.9" and python_version < "3.13"
requests==2.31.0 ; python_version >= "3.9" and python_version < "3.13"
setuptools==68.2.2 ; python_version >= "3.9" and python_version < "3.13"
setuptools==69.0.2 ; python_version >= "3.9" and python_version < "3.13"
shapely==2.0.2 ; 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"
soupsieve==2.5 ; python_version >= "3.9" and python_version < "3.13"
tqdm==4.66.1 ; python_version >= "3.9" and python_version < "3.13"
typing-extensions==4.8.0 ; python_version >= "3.9" and python_version < "3.13"
typing-extensions==4.9.0 ; python_version >= "3.9" and python_version < "3.13"
tzdata==2023.3 ; python_version >= "3.9" and python_version < "3.13"
urllib3==1.26.18 ; python_version >= "3.9" and python_version < "3.13"
webencodings==0.5.1 ; python_version >= "3.9" and python_version < "3.13"
wrapt==1.15.0 ; python_version >= "3.9" and python_version < "3.13"
xarray==2023.10.1 ; python_version >= "3.9" and python_version < "3.13"
wrapt==1.16.0 ; python_version >= "3.9" and python_version < "3.13"
xarray==2023.12.0 ; python_version >= "3.9" and python_version < "3.13"
zipp==3.17.0 ; python_version >= "3.9" and python_version < "3.10"
5 changes: 2 additions & 3 deletions searvey/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ class ERDDAPProtocol(str, enum.Enum):


class BBox(pydantic.BaseModel):
model_config = pydantic.ConfigDict(extra="forbid")

lon_min: float
lon_max: float
lat_min: float = pydantic.Field(default=-90, ge=-90, le=90)
lat_max: float = pydantic.Field(default=90, ge=-90, le=90)

class Config:
extra = "forbid"


class SymmetricBBox(BBox):
lon_min: float = pydantic.Field(default=-180, ge=-180, le=180)
Expand Down
Loading

0 comments on commit 8dcf54d

Please sign in to comment.