-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Problem
The codebase uses several Pydantic APIs that are deprecated in V2 and will be removed in V3:
parse_raw()method (line ~1979) - should usemodel_validate_json()__fields__attribute (lines ~1532, 1551, 2150) - should usemodel_fieldsclass property- Instance-level
model_fieldsaccess (line ~1465) - should access from class, not instance
Impact
These deprecation warnings are confusing for users and the code will break when Pydantic V3 is released.
Related
- deprecation warnings #725 (user report of deprecation warnings)
Solution
Replace deprecated APIs with their V2/V3-compatible equivalents:
cls.parse_raw()→cls.model_validate_json()cls.__fields__→cls.model_fieldsself.model_fields→self.__class__.model_fields
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working