-
Notifications
You must be signed in to change notification settings - Fork 56
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
Support for pydantic v2 #215
Comments
Hey @gaborbernat, thx for pointing this out. Is there any info on how one may support both v1 and v2 of Pydantic? While switching to v2 completely will break things for the library users. |
I don't think there's support for supporting both... You could do some gimnastics to switch implementation based on detected version 🤷♂️ but will get messy. |
The main problem could be testing but the pydantic V2 implementation includes the old V1, namespaced in the It looks horrible but importing the
It looks horrible, I know. |
https://github.com/cloudevents/sdk-python/blob/main/cloudevents/pydantic/event.py#L87
https://docs.pydantic.dev/latest/migration/
The text was updated successfully, but these errors were encountered: