-
Notifications
You must be signed in to change notification settings - Fork 7
Relaxing pydantic requirements #760
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
Comments
For context, we use Pydantic for three parts of fractal-tasks-core
Yes, I think this should work. We would bump the required version e.g. to Whether this intermediate step makes sense mostly depends on when we plan to tackle #592. For the record, preparing #737 was not a crazy amount of work (there are a bunch of validators that need to be ported to the new style, and https://github.com/pydantic/bump-pydantic also helped). There is a single critical point which concerns point 3 above, but the rest is mostly repetitive work.. |
Thanks for the clarification. In both problematic dependencies I have, pydantic is only used internally. So it won't be exposed to @jluethi, what's your opinion on this issue? If we decide to take the intermediate step, I can prepare a PR. It should be fairly straightforward, and I will see more of the fractal code base. |
@lorenzocerrone Is this urgent or can we review on Wednesday on how best to proceed? My takeaway would be: I'm generally in favor of moving us to actually use Pydantic V2 in tasks core. We will need to ensure that the manifest building works for Pydantic V1 & v2 at least for a certain transition phase though, as the current task packages by other people may also use Pydantic V1. If we see this transition to be tricky, then I'm fine with first building |
The most recent versions of Pydantic V1 now also offer the possibility of doing I think this is helpful for us, and we could proceed as follows:
This allows us to unlock the dependency constraint, while keeping fractal-tasks-core fully in Pydantic V1 and with not version-specific code. The next step is then #592, which means that:
What would not be supported is the following scenario
Another non-supported use case (possibly more critical) would be
|
This was closed with #765 |
Hi @tcompa
I have seen that switching to
pydantic v2
#592 still has some issues. But I have encountered a couple of critical installation issues with packages depending onpydantic>2
while trying to create new tasks (for example, https://github.com/bioimage-io/spec-bioimage-io that requirespydantic>=2.6.3, 3
).Would it be an option to use the legacy
pydantic.v1
like in napari/napari#6358 until there is a good solution for V2 and, in the meantime, update the requirements forfractal-tasks-core
?The text was updated successfully, but these errors were encountered: