-
Notifications
You must be signed in to change notification settings - Fork 5
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
update to pydantic>2 #181
Comments
Are you open to a pull request that would fix this by using a try.. except.. block to handle the import? Something like:
This should in principle use the v1 API for BaseClass when using pydantic version 2 according to the documentation here. |
hi there - good point. I actually pinned to old pydantic here: the purpose of your suggestion would be to allow users of pydantic v2 still use old ipyautoui without dependency issues ? I'm currently working on a new release that will require pydantic v2 (and will not be compatible with v1) and benefit from some of its new features |
I noticed it was pinned to |
I just tried implementing the try: except: block as @JuanCab suggests (as the update is indeed going slightly slower than I hoped... ) - I'm running into the following issue: import pydantic.v1 as pydantic
class Test(BaseModel):
__root__: list[str] = ["a", "b"]
# >>>TypeError: To define root models, use `pydantic.RootModel` rather than a field called '__root__' root models are used for the iterable and editgrid objects, reimplementing them as suggested above would then be incompatible with so I think we'll probably have to wait until the next major update which will use pydantic v2 rather than backporting to the v1 that is available in v2 |
https://docs.pydantic.dev/latest/migration/
The text was updated successfully, but these errors were encountered: