Skip to content

Commit

Permalink
all: require pydantic v2
Browse files Browse the repository at this point in the history
fixes a warning when using pydantic v2
  • Loading branch information
classabbyamp committed Aug 31, 2023
1 parent 5064f43 commit 604bbf1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions callsignlookuptools/callook/callook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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


Expand All @@ -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


Expand All @@ -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


Expand All @@ -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


Expand All @@ -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


Expand Down
2 changes: 1 addition & 1 deletion callsignlookuptools/hamqth/hamqth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion callsignlookuptools/qrz/qrz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion callsignlookuptools/qrzcq/qrzcq.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
install_requires=[
"lxml",
"gridtools",
"pydantic",
"pydantic>=2.0",
"requests; extra != 'async'"
],
extras_require={
Expand Down

0 comments on commit 604bbf1

Please sign in to comment.