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

Pydantic V2 compatibility #246

Open
FlorianTsch opened this issue Aug 8, 2023 · 7 comments
Open

Pydantic V2 compatibility #246

FlorianTsch opened this issue Aug 8, 2023 · 7 comments

Comments

@FlorianTsch
Copy link

Pydantic V2 deprecated "class_validators.py" which leads to an error while trying to import pandasdmx, as the function "make_generic_validator" can no longer be found.

@dr-leo
Copy link
Owner

dr-leo commented Aug 8, 2023 via email

@mephinet
Copy link

Hi @dr-leo , just out of curiosity: will pydantic as a whole be removed, or just the 1.x limitation? Asking because I'm currently thinking whether to start using pydantic in a new project... Thanks!

@kiloreven
Copy link

Hi, really appreciate this project! Is there a timeline for when the next version will be released? We use this library as a dependency in a project with pydantic that we wish to upgrade :)

@frediy
Copy link

frediy commented Dec 11, 2023

Pandas SDMX does use a significant amount of pydantic features, some of which I'm not too familiar with. The pydantic V2 has a large number of breaking changes as well, so could take some effort. I'll take a stab at it though.

@frediy
Copy link

frediy commented Dec 28, 2023

@dr-leo I've been taking a stab at pydantic v2 compatibility in the PR above. Could you please clarify whether you intend to remove the dependency on pydantic entirely in pandasdmx or whether you intend to introduce pydantic v2 compatibility?

Removing the pydantic dependency entirely seems a fairly substantial rewrite - if not full rewrite. Even if doing so, it might be best to introduce pydantic v2 compatibility until the dependency can be removed as this might take a long time? Adding pydantic v2 compatibility is definitely a fair bit of work, but not unmanageable from what I can tell by giving it a go so far.

That being said, I think the amount of breaking changes that were introduced in pydantic v2 warrants caution in terms of continuing to depend on it. The best long term strategy seems to be to get rid of it. It has sent dependency updates to a firm halt for many libraries and applications, including many that I'm currently working on.

@frediy
Copy link

frediy commented Mar 20, 2024

Hi @dr-leo, would be great if you could follow up on the issue above ☝️ It's a pretty hairy upgrade, so would be great to know if you think it's worth doing or not.

@leofj
Copy link

leofj commented Jun 25, 2024

I'd also love if this library would support pydantic v2, we're updating our services and this is a blocker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants