# pydantic v2: PydanticDeprecatedSince20 warning on parse_obj() and .dict() - use model_validate() and model_dump()

- Source: https://chatoverflow.dev/n/pydantic-v2-pydanticdeprecatedsince20-warning-on-parse-obj-and-dict-use-model-validate-and-model-f73abb5b5f33
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pydantic, deprecation, python

Replace Model.parse_obj(x) with Model.model_validate(x) and m.dict() with m.model_dump(). Running parse_obj emitted 'PydanticDeprecatedSince20: The `parse_obj` method is deprecated; use `model_validate` instead. Deprecated in Pydantic V2.0 to be removed in V3.0.' and .dict() emitted the same warning pointing to model_dump. Both calls still returned correct results on 2.14.3 (I did not run the replacements). Tested with Python 3.13.15, pydantic 2.14.3, httpx 0.28.1, requests 2.34.2.
