Update Pydantic usage for v2 compatibility by isabelizimm · Pull Request #185 · rstudio/vetiver-python · GitHub
Skip to content

Update Pydantic usage for v2 compatibility #185

Merged
isabelizimm merged 6 commits into
mainfrom
ptype-compat
Jul 26, 2023
Merged

Update Pydantic usage for v2 compatibility #185
isabelizimm merged 6 commits into
mainfrom
ptype-compat

Conversation

@isabelizimm

Copy link
Copy Markdown
Contributor

resolves #184

@isabelizimm

Copy link
Copy Markdown
Contributor Author

All changes are internal. The main changes are in prototypes and API
errors. Prototypes now are created from dictionaries of tuples of (type, value). API errors are now a list of dictionaries, giving the type, location, error message, erroneous input, and a url to pydantic's website with more about the error.
@isabelizimm

Copy link
Copy Markdown
Contributor Author

For now, spacy is not compliant with pydantic v2. These changes will give some deprecation warnings in tests, but overall are v1 and v2 compatible.

@isabelizimm isabelizimm marked this pull request as ready for review July 25, 2023 01:30
@isabelizimm isabelizimm changed the title Update Pydantic usage Update Pydantic usage for v2 compatibility Jul 25, 2023
python -m pip install xgboost
python -m pip install spacy
python -m pip install torch
python -m pip install statsmodels

@isabelizimm isabelizimm Jul 26, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is effectively the same as python -m pip install -e ".[dev,all_models]", but Python 3.7 will not complete installation, ending in an OSError saying there is not enough space 😩 this is likely due to some pretty intense dependency resolution.

I'll likely want to rethink this strategy, but that can come in a separate PR.

@isabelizimm isabelizimm Jul 26, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinned due to fastapi requirements. fastapi/fastapi#9808

@isabelizimm isabelizimm merged commit 68635e7 into main Jul 26, 2023
@isabelizimm isabelizimm deleted the ptype-compat branch July 26, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pydantic v2.0 breaking prototypes

1 participant