alibi-detect
alibi-detect copied to clipboard
Update pydantic requirement from <2.0.0,>=1.8.0 to >=1.8.0,<3.0.0
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
- 📝 Don't recomend to use
TypeError
on validators by@Kludex
in pydantic/pydantic#6179- 📝 Add docs about custom error messages by
@Kludex
in pydantic/pydantic#6182- Change allow mutation wording by
@mark-todd
in pydantic/pydantic#6184- 📝 Improve fields documentation by
@Kludex
in pydantic/pydantic#6183- Ignore deprecated methods of
pydantic.main
in pydocstyle check by@hramezani
in pydantic/pydantic#6185- Another solution to custom getattr/delattr by
@dmontagu
in pydantic/pydantic#6165- 🐛 Fix
RootModel
default values by@lig
in pydantic/pydantic#5949- Improve conversion_table by
@hramezani
in pydantic/pydantic#6186- Uncomment
from_orm
deprecated
decorator by@hramezani
in pydantic/pydantic#6189- Complete
pydantic/root_model.py
docstring by@hramezani
in pydantic/pydantic#6193- Complete
pydantic/functional_validators.py
docstrings by@hramezani
in pydantic/pydantic#6191- Fix access of 'required' key for TypedDictField in GenerateJsonSchema by
@adriangb
in pydantic/pydantic#6200- 💚 Use the same conditions on
send_tweet
asrelease
by@Kludex
in pydantic/pydantic#6170- 📝 Add migration reference to the "Import Error" section by
@Kludex
in pydantic/pydantic#6208- Improve
pydantic/mypy.py
docstring by@hramezani
in pydantic/pydantic#6207- 📝 Update documentation about "Number Types" by
@Kludex
in pydantic/pydantic#6211- Don't sort model keys by
@adriangb
in pydantic/pydantic#6212- Add documentation for strict mode by
@tpdorsey
in pydantic/pydantic#6196- Add documentation for strict types by
@tpdorsey
in pydantic/pydantic#6218- Update serialization decorator documentation by
@tpdorsey
in pydantic/pydantic#6216- Update list and set docs by
@dmontagu
in pydantic/pydantic#6142- Update docs for sequence_iterable by
@dmontagu
in pydantic/pydantic#6220- 👷 Add Integration CI workflow for
pydantic-settings
by@lig
in pydantic/pydantic#6221- ⬆ Upgrade to pydantic-core 0.41.0 by
@lig
in pydantic/pydantic#6219- Document Strict on Annotated fields by
@tpdorsey
in pydantic/pydantic#6223- 🐛 Fix crash on serializing a union of RootModel and BaseModel by
@lig
in pydantic/pydantic#6201- Run docstring tests by
@dmontagu
in pydantic/pydantic#6175- Add documentation for PlainSerializer and WrapSerializer by
@tpdorsey
in pydantic/pydantic#6230- Improve mypy documentation by
@hramezani
in pydantic/pydantic#6226- 🚸 Improve error message when BaseSettings is imported by
@Kludex
in pydantic/pydantic#6229- correct deprecation warning for parse_file by
@davidhewitt
in pydantic/pydantic#6228- Update migration docs to include a note about
parse_env_var
removal by@hramezani
in pydantic/pydantic#6235- Add warning about datamodel-code-generator to docs by
@hramezani
in pydantic/pydantic#6236- PYD-124: improve docs for
__get_pydantic_core_schema__
by@adriangb
in pydantic/pydantic#6224- Minor edits from review of Enum docs by
@tpdorsey
in pydantic/pydantic#6238- Update and consolidate links in number types by
@tpdorsey
in pydantic/pydantic#6239- Update V2 vs V1 section in README.md by
@adriangb
in pydantic/pydantic#6242- Add type key to enums by
@adriangb
in pydantic/pydantic#6243- 🐛 Restrict range on Python version for
_make_forward_ref
by@Kludex
in pydantic/pydantic#6246- 💚 Add timeout on
publish_docs
job by@Kludex
in pydantic/pydantic#6247- 👷 Enable FastAPI tests by
@Kludex
in pydantic/pydantic#6249- docs: use _pydantic_core.pyi as only docs source for now by
@davidhewitt
in pydantic/pydantic#6257- Reorder basemodel methods by
@dmontagu
in pydantic/pydantic#6260- Improve file type docs by
@hramezani
in pydantic/pydantic#6252- 🔧 Add
assignees
list to the hooky config by@lig
in pydantic/pydantic#6264- Document "wrap" validators by
@tpdorsey
in pydantic/pydantic#6258- Update validate_call documentation by
@tpdorsey
in pydantic/pydantic#6255- 📝 Update docs about hypothesis by
@Kludex
in pydantic/pydantic#6266
... (truncated)
Changelog
Sourced from pydantic's changelog.
v2.0 (2023-06-30)
Pydantic V2 is here! :tada:
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 toTypeAdapter.validate_python
andBaseModel.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
aeb8fd0
fix publish_docs492db2a
Use exclude in pyproject.toml with black (#6316)aee6986
Prepare for release (#6319)08c473a
Index improvements (#6314)89032e1
Remove warning on top ofdocs/usage/types/callables.md
(#6318)c143ecd
PYD-131 Links between API and usage docs (#6307)119b9f5
Update mypy plugin (#6306)b1f689e
pydantic-core 2.0.1 (#6310)f2b866f
📝 Add note about page not up-to-date (#6312)0bc0e87
adding page about version compatibility (#6309)- Additional commits viewable in compare view
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)
Assigning to self, as I'll need to update how pydantic
is used in the saving tests for this PR.
@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.
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.
p.s. good point about mlserver
...
Superseded by https://github.com/SeldonIO/alibi-detect/pull/882. Everything else about needing to do an actual migration still stands, of course!
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 :( .
Hi @MarcBresson, with https://github.com/SeldonIO/alibi-detect/pull/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?
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.
@MarcBresson: No worries mate! Thank you too for confirming that that worked.