Open
Description
Environment
- DiffSync version: 2.0.0
- Python version Python 3.10.12
Observed Behavior
Getting warning logs from Pydantic about protected namespace violations within the DiffSync library
Expected Behavior
No logging output at the warning level
Steps to Reproduce
python3 -i
from diffsync import DiffSyncModel
Extra Information
Pydantic introduces protected namespaces in their new documentation that places warning logs for things like model_
fields documentation here
potential workaround is to use the ConfigDict to set protected_namespaces to an empty value.
class Device(DiffSyncModel):
"""common model used for Diffsync"""
# Disables new Pydantic v2 protections since diffsync uses model_ fields
model_config = ConfigDict(
protected_namespaces=()
)
However, this does not prevent the log entries from the diffsync BaseModel here:
Line 110 in 13f5150
Metadata
Metadata
Assignees
Labels
No labels