-
Notifications
You must be signed in to change notification settings - Fork 3
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
Upgrade to pydantic v2 #20
Conversation
…put_path has a default value of None now.
…yUrl have been replaced with appropriate syntax for v2.
…yping_extensions.
… pydantic AnyUrl type is not converted to lowercase while being processed by the unit test.
…spectively to avoid deprecation warnings.
…est_integration.py into multiple lines.
Some refactoring had to be made to comply with our linters in particular |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 94.40% 94.54% +0.13%
==========================================
Files 23 23
Lines 894 898 +4
==========================================
+ Hits 844 849 +5
+ Misses 50 49 -1 ☔ View full report in Codecov by Sentry. |
The changes from the main branch have been pulled into this feature branch. A new |
Removed the |
Post request is working on the local instance of |
Related to: #18
The migration to
pydantic
v2 is based on https://docs.pydantic.dev/latest/migration/The following changes have been introduced in
qualle
:root_validator
is replaced withmodel_validator
. More info here: https://docs.pydantic.dev/latest/migration/#validator-and-root_validator-are-deprecated. The recommended syntax is provided here: https://docs.pydantic.dev/latest/concepts/validators/#model-validators.AnyUrl
now does not inherit from classString
(see here: https://docs.pydantic.dev/latest/migration/#url-and-dsn-types-in-pydanticnetworks-no-longer-inherit-from-str). It is now replaced with a workaround solution (see here: AnyUrl adds trailing slash pydantic/pydantic#7186 (comment)).BaseSettings
is imported from a different location. The packagepydantic-settings
has been added inside thepyproject.toml
file.BaseSettings
is imported frompydantic_settings
forpydantic
v2. More info here: https://docs.pydantic.dev/latest/migration/#basesettings-has-moved-to-pydantic-settings.Optional[Type]
is provided a default value ofNone
. More info here: https://docs.pydantic.dev/latest/migration/#required-optional-and-nullable-fields.interface/test_config.py
andtest_models.py
.dict()
and.json()
are replaced withmodel_dump()
andmodel_dump_json()
, respectively. More info here: https://docs.pydantic.dev/latest/migration/#changes-to-pydanticbasemodelinterface/test_internal.py
. The dummy subthesauri have now been modified to have a lowercaseURI
.