diff --git a/CHANGELOG.md b/CHANGELOG.md index dc225a7..64c6b7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - Compatibility with newer typer versions (#33). +- Compatibility with newer pydantic versions. ## [1.1.0] - 2023-01-29 diff --git a/callsignlookuptools/callook/callook.py b/callsignlookuptools/callook/callook.py index 9a838f2..9be16f2 100644 --- a/callsignlookuptools/callook/callook.py +++ b/callsignlookuptools/callook/callook.py @@ -22,7 +22,7 @@ class CallookCallsignModel(BaseModel): class_: enums.LicenseClass = Field(default=enums.LicenseClass.NONE, alias="class") class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True @@ -31,7 +31,7 @@ class CallookTrusteeModel(BaseModel): name: Optional[str] = None class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True @@ -41,7 +41,7 @@ class CallookAddressModel(BaseModel): attn: Optional[str] = None class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True @@ -57,7 +57,7 @@ def _to_grid(cls, v): return v class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True @@ -78,7 +78,7 @@ def _parse_date(cls, v): return v class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True @@ -94,7 +94,7 @@ class CallookDataModel(BaseModel): otherInfo: CallookOtherInfoModel = Field(default_factory=CallookOtherInfoModel) class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True diff --git a/callsignlookuptools/hamqth/hamqth.py b/callsignlookuptools/hamqth/hamqth.py index f6780d1..20948d7 100644 --- a/callsignlookuptools/hamqth/hamqth.py +++ b/callsignlookuptools/hamqth/hamqth.py @@ -89,7 +89,7 @@ def _continent(cls, v): return enums.Continent.NONE class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True diff --git a/callsignlookuptools/qrz/qrz.py b/callsignlookuptools/qrz/qrz.py index f848e76..7d8d262 100644 --- a/callsignlookuptools/qrz/qrz.py +++ b/callsignlookuptools/qrz/qrz.py @@ -114,7 +114,7 @@ def _parse_image_info(cls, v): return tuple(v.split(":")) class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True diff --git a/callsignlookuptools/qrzcq/qrzcq.py b/callsignlookuptools/qrzcq/qrzcq.py index 0b7edf2..818fdab 100644 --- a/callsignlookuptools/qrzcq/qrzcq.py +++ b/callsignlookuptools/qrzcq/qrzcq.py @@ -73,7 +73,7 @@ def _continent(cls, v): return enums.Continent.NONE class Config: - anystr_strip_whitespace = True + str_strip_whitespace = True arbitrary_types_allowed = True diff --git a/setup.py b/setup.py index c6c12c7..9560c4c 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ install_requires=[ "lxml", "gridtools", - "pydantic", + "pydantic>=2.0", "requests; extra != 'async'" ], extras_require={