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

[MAINT] Update pydantic to >=2.0 #985

Merged
merged 12 commits into from
Nov 22, 2024

Conversation

peytondmurray
Copy link
Contributor

@peytondmurray peytondmurray commented Nov 16, 2024

Fixes #984.

Description

This pull request:

  • Updates to pydantic >=2.0.
  • I ran bump-pydantic to automatically update a lot. The only stuff that needed to be done by hand was the validators in schema.py, and some special handling for LockfileSpecification.model_dump to ensure conda-lock Lockfile compatibility.

Pull request checklist

  • Did you test this change locally?
  • Did you update the documentation (if required)?
  • Did you add/update relevant tests for this change (if required)?

Copy link

netlify bot commented Nov 16, 2024

Deploy Preview for conda-store canceled.

Name Link
🔨 Latest commit cc2f0a8
🔍 Latest deploy log https://app.netlify.com/sites/conda-store/deploys/6740d84b82fadb0008ff8ffb

@peytondmurray
Copy link
Contributor Author

I'm not sure if the upgrade to pydantic>=2 is to blame for this, but it looks like the failing integration test is due to us not parsing the lockfile output of conda-lock using our schema.LockfileSpecification pydantic model. See #986 for more information; this issue seems blocked until that one gets resolved.

soapy1 and others added 5 commits November 22, 2024 09:55
conda-lock needs to output using the "output_for_dict" function.
So, the LockfileSpecification should provide this as the default
way to dump the model.
Ensure lockfile is preserved when dumping model
Copy link
Contributor

@soapy1 soapy1 left a comment

Choose a reason for hiding this comment

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

🎆

@peytondmurray peytondmurray merged commit 20d849b into conda-incubator:main Nov 22, 2024
28 checks passed
@peytondmurray peytondmurray deleted the 984-update-pydantic branch November 22, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 💪🏾
Development

Successfully merging this pull request may close these issues.

[MAINT] - Upgrade pydantic to >2
2 participants