Skip to content
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

feat: add an abstract layer to support pydantic/msgspec #329

Open
kemingy opened this issue Jul 27, 2023 · 3 comments
Open

feat: add an abstract layer to support pydantic/msgspec #329

kemingy opened this issue Jul 27, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@kemingy
Copy link
Member

kemingy commented Jul 27, 2023

Pydantic v2 has too many breaking changes that lots of 3rd libraries are not able to upgrade in a short time.

This PR is not backward compatible (due to pydantic breaking changes). I'm not sure if we should make this library compatible with both pydantic v1 & v2. Or maybe we should add another abstract layer so that we can make it possible to support pydantic v1 & v2 and msgspec (ref #307)

Originally posted by @kemingy in #319 (review)

@BradLucky
Copy link

BradLucky commented Oct 31, 2024

Is this issue/repo still getting attention? This is over a year old at this point. I managed to copy GenericModel from Pydantic, making it so that SpecTree can still be used with dependency on Pydantic V1 even though we are running V2. SpecTree has been great for us, but if it will not be getting true support for V2, I'm afraid I'll have to remove the dependency and find another solution.

That said, if I find some extra free time, I might give it a go to fulfill this issue.

@kemingy
Copy link
Member Author

kemingy commented Oct 31, 2024

Is this issue/repo still getting attention? This is over a year old at this point. I managed to copy GenericModel from Pydantic, making it so that SpecTree can still be used with dependency on Pydantic V1 even though we are running V2. SpecTree has been great for us, but if it will not be getting true support for V2, I'm afraid I'll have to remove the dependency and find another solution.

I didn't find a good solution at that time. Also, I have tried another general OpenAPI doc only solution in defspec. I wonder if I can reuse the code.

That said, if I find some extra free time, I might give it a go to fulfill this issue.

I can also find some free time. It would be very helpful if you could leave some comments about the rough ideas here. I haven't been using pydantic for a while.

@kemingy
Copy link
Member Author

kemingy commented Nov 24, 2024

#387 makes it possible to support both pydantic v1 & v2.

@kemingy kemingy changed the title feat: add an abstract layer to support pydantic[v1]/pydantic[v2]/msgspec feat: add an abstract layer to support pydantic/msgspec Nov 24, 2024
@kemingy kemingy added the enhancement New feature or request label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants