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 pydantic requirement from <2.0.0,>=1.8.0 to >=1.8.0,<3.0.0 #823

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 3, 2023

Updates the requirements on pydantic to permit the latest version.

Release notes

Sourced from pydantic's releases.

v2.0 2023-06-30

What's Changed

... (truncated)

Changelog

Sourced from pydantic's changelog.

v2.0 (2023-06-30)

Pydantic V2 is here! 🎉

See this post for more details.

See the full changelog here

v2.0b3 (2023-06-16)

Third beta pre-release of Pydantic V2

See the full changelog here

v2.0b2 (2023-06-03)

Add from_attributes runtime flag to TypeAdapter.validate_python and BaseModel.model_validate.

See the full changelog here

v2.0b1 (2023-06-01)

First beta pre-release of Pydantic V2

See the full changelog here

v2.0a4 (2023-05-05)

Fourth pre-release of Pydantic V2

See the full changelog here

v2.0a3 (2023-04-20)

Third pre-release of Pydantic V2

See the full changelog here

v2.0a2 (2023-04-12)

Second pre-release of Pydantic V2

See the full changelog here

v2.0a1 (2023-04-03)

First pre-release of Pydantic V2!

See this post for more details.

... (truncated)

Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Updates the requirements on [pydantic](https://github.com/pydantic/pydantic) to permit the latest version.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v1.8...v2.0)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jul 3, 2023
@dependabot dependabot bot requested review from ascillitoe, jklaise and mauicv July 3, 2023 07:57
@ascillitoe ascillitoe self-assigned this Jul 3, 2023
@ascillitoe
Copy link
Contributor

Assigning to self, as I'll need to update how pydantic is used in the saving tests for this PR.

@jklaise
Copy link
Contributor

jklaise commented Jul 10, 2023

@ascillitoe sounds like this is a major (breaking) version (although I haven't found a good place describing all the new stuff). I suppose for us we would want to upgrade to >=2.0 instead of also allowing an older version (unless we can make the required changes in a way that works with both 1.x and 2.x?). However, if we do that, then need to check how this might interact on e.g. mlserver runtimes with a different pydantic version.

@ascillitoe
Copy link
Contributor

Yeh it involves some moderate changes, I actually tried to do this today and stopped since realised it was a bigger job than first expected.

Their is a migration tool bump-pydantic, but it didn't work properly when I tried it. To support v2 I'd need to rewrite the validators in saving/validators.py, and a few bits in saving/schemas.py. I'm not 100% sure but don't think we'll be able to rewrite the pydantic stuff to work in v1 and v2, I think we'd have to have separate v1 and v2 pydantic models.

According to this, we have a year to make the jump, so it might be worth leaving this for a while? Some of our deps such as thinc are also still on v1.x so we can't make the move just yet anyway.

@ascillitoe
Copy link
Contributor

p.s. good point about mlserver...

@jesse-c
Copy link
Contributor

jesse-c commented Mar 7, 2024

Superseded by #882. Everything else about needing to do an actual migration still stands, of course!

@MarcBresson
Copy link

Hello, thinc now supports pydantic>=1.7.4,!=1.8,!=1.8.1,<3.0.0. What is your roadmap regarding the pydantic version bump? I'm using pydantic~=2.0 and I cannot use your library because of that :( .

@jesse-c
Copy link
Contributor

jesse-c commented Mar 18, 2024

Hi @MarcBresson, with #882, you should be able to use Alibi Detect with Pydantic v1 or v2! We haven't done a release yet though. Are you able to use a commit hash or branch to specify the version of Alibi Detect that you use?

@MarcBresson
Copy link

Thank you for your quick answer! It worked like a charm with https://github.com/SeldonIO/alibi-detect/archive/master.zip in my requirements file.

Will change it back later when the new version has been released.

@jesse-c
Copy link
Contributor

jesse-c commented Mar 18, 2024

@MarcBresson: No worries mate! Thank you too for confirming that that worked.

@CLAassistant
Copy link

CLAassistant commented May 7, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants