-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Compatibility with Pydantic >= 2 through pydantic.v1 #1664
Comments
Seems that the dev team has decided to "decouple" more from pydantic in favor of using native
This does not answer your question, why pygeoapi isn't switching to v2 and using pydantic.v1 module. I only can guess, that there are other parts using pydantic which deserve some refactoring first. @francbartoli @tomkralidis do you have strong arguments not using pydantic anymore? As far I have read things on v2, it got a lot faster. Is this |
Given RFC2, and that our current base OS is Ubuntu jammy, we are bound to OS specific versions. AFAICT, Pydantic is at version 1.8.2 on jammy. |
@SarahG-579462 @ridoo Pydantic was downgraded to adhere with RFC2 as @tomkralidis mentioned. Also, the direction of the project is to prefer the simplicity of plain standard dictionaries over the translation from Pydantic models when needed.
Hopefully, this might happen soon but most probably after the completion of v2 ubuntu packaging I Hope this clarifies further. |
@francbartoli thanks for giving more background! BTW, I got notified that #1547 got selected to be closed by github-actions. |
@ridoo @SarahG-579462 python3-pydantic-core is now available as a package in Debian. Accordingly to RFC2, now I'm going to revert #1584 #1596 and will add the package to the CI docker image (cc @tomkralidis) |
Thanks @francbartoli. @kalxas let us know if this works/any issues. |
The package seems to be in Unstable: https://packages.debian.org/sid/python3-pydantic-core |
Lets wait until this ends up in a Debian/Ubuntu stable release |
This Issue has been inactive for 90 days. As per RFC4, in order to manage maintenance burden, it will be automatically closed in 7 days. |
Not yet available in Noble |
@kalxas is not quite enough to have it available in Jammy https://github.com/geopython/pygeoapi/blob/master/Dockerfile#L37 for us? |
@francbartoli it is not available for jammy, so I looked at noble to see if it exists there |
@kalxas yes, it is available only in Oracular https://launchpad.net/ubuntu/+source/pydantic (Testing) atm |
one general question: Why pygeoapi depends on python packages managed by the OS? What about creating a |
Thanks and sorry for the noise |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Recently, pygeoapi's pydantic was downgraded from 2.0-compatible to pydantic < 1. This removed compatibility with two of our libraries, xscen and xclim, for climate data processing, due to intake-esm's current requirement on pydantic > 2
Because we require these in the use of our pygeoapi process plugins, this change forced us to use either very outdated versions of xscen (and thus xarray, pandas, xclim, etc.), or a very outdated version of pygeoapi.
Thankfully, a simple fix is available by the use of pydantic 2's backwards-compatible pydantic.v1 module.
It is not entirely clear to me why pydantic was downgraded, the best explanation I can see in the discussion was due to "versionitis".
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Pydantic issues:
#1573
#1341
#1584
The text was updated successfully, but these errors were encountered: