-
Notifications
You must be signed in to change notification settings - Fork 665
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
[BUG] Pydantic Flytekit plugin is not compatible with Pydantic v2 #4603
Comments
Thank you for opening your first issue here! 🛠 |
🤖 It's great to see your interest in improving the compatibility of flytekit with Pydantic v2. Your understanding of the issue and the proposed solution are valuable contributions. Encouraging users like you to take the initiative to create a PR is what helps open-source projects like flyte grow and improve. Keep up the good work, and I hope to see your contribution to flyte soon! This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
@adartaud , thanks for the report! We raised a concern about pydantic v2 in flyteorg/flytekit#1660, but it looks like at the time pydantic v2 could be supported. We should validate and increase test coverage if possible. @adartaud , do you have a repro? Also, feel free to open a PR to pin the version. |
Thanks for your reply. Here is a repro:
# requirements.txt
flytekit==1.10.2
flytekitplugins-pydantic==1.10.2
pydantic==2.5.2
|
Describe the bug
Since Pydantic v2, the method
__get_validators__
has been removed frompydantic.BaseModel
. However as you can see hereflytekitplugins-pydantic
still uses it.This raises
AttributeError: __get_validators__
Expected behavior
At the moment, there are no constraints on the version of Pydantic in the setup.py of the plugin, although it only seems to be compatible with versions prior to v2.
flytekitplugins-pydantic
should be compatible with new versions of Pydantic, or at least specify a constraint while this isn't fixed.Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: