conda / conda-lock

Lightweight lockfile for conda environments
https://conda.github.io/conda-lock/
Other
458 stars 102 forks source link

Update to pydantic 2.0 #459

Closed mariusvniekerk closed 11 months ago

mariusvniekerk commented 12 months ago

Closes #472

netlify[bot] commented 12 months ago

Deploy Preview for conda-lock ready!

Name Link
Latest commit 22de1727a63c8e0ca78812651d950eb682dd90e7
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 commented 12 months ago

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 commented 12 months ago

Maybe we should instead suppress the warnings for a bit?

maresb commented 11 months ago

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}
maresb commented 11 months ago

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

mariusvniekerk commented 11 months ago

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

maresb commented 11 months ago

@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?