Skip to content

Commit 685b511

Browse files
committed
Pydantic deprecation warning bits
1 parent 9f31673 commit 685b511

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/murfey/client/instance_environment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from urllib.parse import ParseResult
1010

1111
from pydantic import BaseModel, ConfigDict, field_validator
12-
from pydantic_core.core_schema import FieldValidationInfo
12+
from pydantic_core.core_schema import ValidationInfo
1313

1414
from murfey.client.watchdir import DirWatcher
1515

@@ -69,7 +69,7 @@ class MurfeyInstanceEnvironment(BaseModel):
6969
model_config = ConfigDict(arbitrary_types_allowed=True)
7070

7171
@field_validator("data_collection_group_ids")
72-
def dcg_callback(cls, v, info: FieldValidationInfo):
72+
def dcg_callback(cls, v, info: ValidationInfo):
7373
with global_env_lock:
7474
for l in info.data.get("listeners", {}).get(
7575
"data_collection_group_ids", []
@@ -80,7 +80,7 @@ def dcg_callback(cls, v, info: FieldValidationInfo):
8080
return v
8181

8282
@field_validator("data_collection_ids")
83-
def dc_callback(cls, v, info: FieldValidationInfo):
83+
def dc_callback(cls, v, info: ValidationInfo):
8484
with global_env_lock:
8585
for l in info.data.get("listeners", {}).get("data_collection_ids", []):
8686
for k in v.keys():
@@ -89,7 +89,7 @@ def dc_callback(cls, v, info: FieldValidationInfo):
8989
return v
9090

9191
@field_validator("processing_job_ids")
92-
def job_callback(cls, v, info: FieldValidationInfo):
92+
def job_callback(cls, v, info: ValidationInfo):
9393
with global_env_lock:
9494
for l in info.data.get("listeners", {}).get("processing_job_ids", []):
9595
for k in v.keys():
@@ -98,7 +98,7 @@ def job_callback(cls, v, info: FieldValidationInfo):
9898
return v
9999

100100
@field_validator("autoproc_program_ids")
101-
def app_callback(cls, v, info: FieldValidationInfo):
101+
def app_callback(cls, v, info: ValidationInfo):
102102
with global_env_lock:
103103
for l in info.data.get("listeners", {}).get("autoproc_program_ids", []):
104104
for k in v.keys():

tests/cli/test_decrypt_password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_decrypt_password(capsys, tmp_path):
1313
crypto_key = Fernet.generate_key()
1414
security_config.crypto_key = crypto_key.decode("ascii")
1515
with open(tmp_path / "config.yaml", "w") as cfg:
16-
yaml.dump(security_config.dict(), cfg)
16+
yaml.dump(security_config.model_dump(), cfg)
1717
os.environ["MURFEY_SECURITY_CONFIGURATION"] = str(tmp_path / "config.yaml")
1818
password = "abcd"
1919
f = Fernet(crypto_key)

tests/cli/test_generate_password.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_generate_password(capsys, tmp_path):
1212
crypto_key = Fernet.generate_key()
1313
security_config.crypto_key = crypto_key.decode("ascii")
1414
with open(tmp_path / "config.yaml", "w") as cfg:
15-
yaml.dump(security_config.dict(), cfg)
15+
yaml.dump(security_config.model_dump(), cfg)
1616
os.environ["MURFEY_SECURITY_CONFIGURATION"] = str(tmp_path / "config.yaml")
1717
run()
1818
captured = capsys.readouterr()

0 commit comments

Comments
 (0)