-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVI Client get method failing due to Pydantic>2 issue #240
Labels
bug
Something isn't working
Comments
The issue stems from how pydantic<2 and pydantic>2 treat from pydantic import BaseModel
from typing import Optional
class Foo(BaseModel):
field: Optional[str]
# valid in pydantic<2
inst = Foo()
assert inst.field == None
# pydantic ValidationError in pydantic>2
# b.c. Optional fields are indicate either Some(value) or None, but either must be present
inst = Foo()
# Must either explicitly set field=None, or change Foo so that field has a default value of None You can read more about the differences between pydantic versions here. Below are the two places that are affected:
|
aaraney
added a commit
to aaraney/hydrotools
that referenced
this issue
Oct 27, 2023
aaraney
added a commit
to aaraney/hydrotools
that referenced
this issue
Oct 27, 2023
10 tasks
aaraney
added a commit
that referenced
this issue
Oct 27, 2023
aaraney
added a commit
that referenced
this issue
Oct 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Failure in gh action.
Related to #228
Reproduce Issue
Note, ive tested that this failed on all versions of
pydantic>2
.The text was updated successfully, but these errors were encountered: