Skip to content

Commit 604bbf1

Browse files
committed
all: require pydantic v2
fixes a warning when using pydantic v2
1 parent 5064f43 commit 604bbf1

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99
### Fixed
1010
- Compatibility with newer typer versions (#33).
11+
- Compatibility with newer pydantic versions.
1112

1213

1314
## [1.1.0] - 2023-01-29

callsignlookuptools/callook/callook.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CallookCallsignModel(BaseModel):
2222
class_: enums.LicenseClass = Field(default=enums.LicenseClass.NONE, alias="class")
2323

2424
class Config:
25-
anystr_strip_whitespace = True
25+
str_strip_whitespace = True
2626
arbitrary_types_allowed = True
2727

2828

@@ -31,7 +31,7 @@ class CallookTrusteeModel(BaseModel):
3131
name: Optional[str] = None
3232

3333
class Config:
34-
anystr_strip_whitespace = True
34+
str_strip_whitespace = True
3535
arbitrary_types_allowed = True
3636

3737

@@ -41,7 +41,7 @@ class CallookAddressModel(BaseModel):
4141
attn: Optional[str] = None
4242

4343
class Config:
44-
anystr_strip_whitespace = True
44+
str_strip_whitespace = True
4545
arbitrary_types_allowed = True
4646

4747

@@ -57,7 +57,7 @@ def _to_grid(cls, v):
5757
return v
5858

5959
class Config:
60-
anystr_strip_whitespace = True
60+
str_strip_whitespace = True
6161
arbitrary_types_allowed = True
6262

6363

@@ -78,7 +78,7 @@ def _parse_date(cls, v):
7878
return v
7979

8080
class Config:
81-
anystr_strip_whitespace = True
81+
str_strip_whitespace = True
8282
arbitrary_types_allowed = True
8383

8484

@@ -94,7 +94,7 @@ class CallookDataModel(BaseModel):
9494
otherInfo: CallookOtherInfoModel = Field(default_factory=CallookOtherInfoModel)
9595

9696
class Config:
97-
anystr_strip_whitespace = True
97+
str_strip_whitespace = True
9898
arbitrary_types_allowed = True
9999

100100

callsignlookuptools/hamqth/hamqth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _continent(cls, v):
8989
return enums.Continent.NONE
9090

9191
class Config:
92-
anystr_strip_whitespace = True
92+
str_strip_whitespace = True
9393
arbitrary_types_allowed = True
9494

9595

callsignlookuptools/qrz/qrz.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def _parse_image_info(cls, v):
114114
return tuple(v.split(":"))
115115

116116
class Config:
117-
anystr_strip_whitespace = True
117+
str_strip_whitespace = True
118118
arbitrary_types_allowed = True
119119

120120

callsignlookuptools/qrzcq/qrzcq.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def _continent(cls, v):
7373
return enums.Continent.NONE
7474

7575
class Config:
76-
anystr_strip_whitespace = True
76+
str_strip_whitespace = True
7777
arbitrary_types_allowed = True
7878

7979

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
install_requires=[
3939
"lxml",
4040
"gridtools",
41-
"pydantic",
41+
"pydantic>=2.0",
4242
"requests; extra != 'async'"
4343
],
4444
extras_require={

0 commit comments

Comments
 (0)