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

Make explicit cross-version support for Pydantic #64

Merged
merged 5 commits into from
Aug 5, 2023

Conversation

cmungall
Copy link
Contributor

@cmungall cmungall commented Aug 4, 2023

curies is a distal transitive dependency of many packages, it needs to be neutral w.r.t pydantic version. It looks like it already is, and the pinning to <2 is unneccessary

For more context see biopragmatics/bioregistry#920

curies is a distal transitive dependency of many packages, it needs to be neutral w.r.t pydantic version. It looks like it already is, and the pinning to <2 is unneccessary

For more context see biopragmatics/bioregistry#920
@cthoyt
Copy link
Member

cthoyt commented Aug 4, 2023

I’d like to see explicit testing for both versions running. I tried this before and didn’t find it so easy unfortunately

@cmungall
Copy link
Contributor Author

cmungall commented Aug 4, 2023

shall we get the sphinx fixed first then experiment with changes to gh actions to run with both versions of pydantic?

@matentzn
Copy link
Collaborator

matentzn commented Aug 5, 2023

High priority for me as well now! Thanks for getting the ball rolling!

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Merging #64 (cde877f) into main (77271fa) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #64   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          554       554           
  Branches       113       113           
=========================================
  Hits           554       554           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cthoyt
Copy link
Member

cthoyt commented Aug 5, 2023

I think it's the case that Pydantic rolled back some of its v1-v2 problems - one of the big issues was the config class that lives inside the actual base model subclass. This appears to be a "deprecation" now instead of being fully unavailable. This changes things wrt the previous try, making this easier. I have now solved all of the documentation and testing concerns, and can merge this + make a new release.

@cthoyt cthoyt changed the title Unpin pydantic, allow v1 or v2 Make explicit cross-version support for Pydantic Aug 5, 2023
@cthoyt cthoyt merged commit fe626dd into biopragmatics:main Aug 5, 2023
8 checks passed
@cthoyt
Copy link
Member

cthoyt commented Aug 5, 2023

Release 0.6.0 reflects this update

cthoyt added a commit to biopragmatics/bioregistry that referenced this pull request Aug 7, 2023
As a follow-up to biopragmatics/curies#64 (and related
to #920 and #899),
this PR makes Bioregistry support both Pydantic v1 and v2
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

Successfully merging this pull request may close these issues.

4 participants