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

Update to pydantic 2.0 #459

Merged
merged 4 commits into from
Jul 21, 2023
Merged

Update to pydantic 2.0 #459

merged 4 commits into from
Jul 21, 2023

Conversation

mariusvniekerk
Copy link
Collaborator

@mariusvniekerk mariusvniekerk commented Jul 13, 2023

Closes #472

@mariusvniekerk mariusvniekerk requested a review from a team as a code owner July 13, 2023 21:48
@netlify
Copy link

netlify bot commented Jul 13, 2023

Deploy Preview for conda-lock ready!

Name Link
🔨 Latest commit 22de172
🔍 Latest deploy log https://app.netlify.com/sites/conda-lock/deploys/64ba7f63748cbe0008a8fa6e
😎 Deploy Preview https://deploy-preview-459--conda-lock.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@maresb
Copy link
Contributor

maresb commented Jul 13, 2023

Are you sure we want to do this already?

The Pydantic v2 migration seems like a rough edge. I think this might make it a lot harder for people to install conda-lock in their base environments.

@maresb
Copy link
Contributor

maresb commented Jul 13, 2023

Maybe we should instead suppress the warnings for a bit?

@mariusvniekerk mariusvniekerk marked this pull request as draft July 13, 2023 22:39
@maresb maresb mentioned this pull request Jul 15, 2023
The stuff we actually need was introduced in Pydantic 1.10
@maresb
Copy link
Contributor

maresb commented Jul 15, 2023

In light of #462 I think this should be fine.

I'm just mildly concerned because I don't understand the effect of removing

json_encoders = {frozenset: list}

Copy link
Contributor

@maresb maresb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this deserves its own release

@maresb
Copy link
Contributor

maresb commented Jul 19, 2023

@mariusvniekerk, this is marked as draft, but I think it may be ready to merge?

@mariusvniekerk
Copy link
Collaborator Author

Yeah just left it as draft so that we can land whatever we want before landing this breaking dependency

@maresb
Copy link
Contributor

maresb commented Jul 20, 2023

@mariusvniekerk it looks like I forgot to provide this explanation:

The required new functionality exists in Pydantic 1.10, so pinning >=2 isn't even necessary. I already added a commit in this branch to relax the pin to >=1.10. I tested the changes in #462 by pinning pydantic <2.

That should be fine, right?

@mariusvniekerk mariusvniekerk marked this pull request as ready for review July 21, 2023 12:52
@mariusvniekerk mariusvniekerk merged commit 5d9a1a2 into conda:main Jul 21, 2023
9 checks passed
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.

conda-lock is incompatible with pydantic 2
2 participants