-
Notifications
You must be signed in to change notification settings - Fork 20
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
quartodoc is not compatible w/ pydantic v2 #209
Comments
Ah, thanks! It seems pretty tricky to implement root so it's compatible with pydantic v1 and v2 😅. I tried an implementation on this PR, but am now running into another error...
Seems to occure when |
I wonder if pydantic v2 expects that if there is a discriminator in a Union, then the other elements in the union must also be discriminators? We have this piece of code... ContentElement = Annotated[
Union[Page, Section, Interlaced, Text, Auto], Field(discriminator="kind")
]
"""Entry in the contents list."""
ContentList = list[Union[ContentElement, Doc, _AutoDefault]] Since edit: I tinkered a bit more and am pretty stumped |
Looks like it's this pydantic issue, and resolved in main a couple days ago: |
Any update on this? |
From the pydantic
Might it be a worthwhile first step to just keep the needed bits from V1 until a fully V2 solution is found? |
Oh wow -- I don't know how I missed that, but it seems like a very quick fix, thanks! Given this is way less effort than I was planning, I'll work on making the change this week..! |
This should be resolved in https://github.com/machow/quartodoc/releases/tag/v0.6.4 (thanks to the tip above!) |
https://docs.pydantic.dev/2.0/migration/#migration-guide
Related:
quartodoc/quartodoc/layout.py
Lines 227 to 236 in 1375929
The text was updated successfully, but these errors were encountered: