Skip to content

Commit

Permalink
fix: no more pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jul 10, 2023
1 parent ff84b2e commit 4d94ac0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
2 changes: 0 additions & 2 deletions ci/conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ dependencies:
- python-graphviz
- py-xgboost
- pyyaml
- pydantic
- pydantic-settings
- rich
- s3fs>=2021.8.0
- scikit-learn
Expand Down
19 changes: 0 additions & 19 deletions packages/vaex-core/vaex/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,6 @@
has_dotenv = False


# with pydantic 2.0, we require pydantic_settings
# has_pydantic_settings = False
try:
import pydantic_settings
except ModuleNotFoundError:
# we should be on pydantic 1.x
BaseSettings = pydantic.BaseSettings
has_pydantic_settings = False
else:
major = pydantic_settings.__version__.split(".")[0]
if major != "0":
# but the old pydantic_settings is unrelated
BaseSettings = pydantic_settings.BaseSettings
has_pydantic_settings = True
else:
# we should be on pydantic 2.x
BaseSettings = pydantic.BaseSettings
has_pydantic_settings = False

logger = logging.getLogger("vaex.settings")
_default_home = vaex.utils.get_vaex_home()

Expand Down
2 changes: 1 addition & 1 deletion packages/vaex-server/vaex/server/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import requests


from pydantic import BaseModel, BaseSettings
from pydantic import BaseModel
from starlette.responses import HTMLResponse, PlainTextResponse


Expand Down

0 comments on commit 4d94ac0

Please sign in to comment.