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

Add support for pydantic v2 #1577

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

guarin
Copy link
Contributor

@guarin guarin commented Jul 9, 2024

Changes

  • Add support for pydantic v2
  • Use pydantic v1 internally

Closes #1526

This allows installing lightly in an environment with Pydantic v2. Internally we still use Pydantic v1 for the API client (using from pydantic.v1 import).

How was it tested?

  • CI
  • Ran our Lightly Worker e2e tests with the new client and Pydantic v2 installed.

* Use pydantic v1 internally
Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.81%. Comparing base (454ad06) to head (ccc1fff).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1577   +/-   ##
=======================================
  Coverage   81.81%   81.81%           
=======================================
  Files         144      144           
  Lines        6120     6120           
=======================================
  Hits         5007     5007           
  Misses       1113     1113           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@guarin guarin marked this pull request as ready for review July 10, 2024 08:00
@guarin guarin merged commit 6ebde88 into master Jul 10, 2024
12 checks passed
@guarin guarin deleted the guarin-lig-4882-support-pydantic-v2 branch July 10, 2024 08:14
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.

Support latest pydantic version
2 participants