Skip to content

Commit

Permalink
Update tools.py
Browse files Browse the repository at this point in the history
`_get_parsing_type` in `pydantic.v1` was depending on `create_model` from `pydantic.main` instead of `pydantic.v1.main`. This causes the issue outlined here - pydantic#6361
  • Loading branch information
SharathHuddar committed Jul 2, 2023
1 parent 35e9fd0 commit ea72c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic/v1/tools.py
Expand Up @@ -21,7 +21,7 @@ def _generate_parsing_type_name(type_: Any) -> str:

@lru_cache(maxsize=2048)
def _get_parsing_type(type_: Any, *, type_name: Optional[NameFactory] = None) -> Any:
from pydantic.main import create_model
from pydantic.v1.main import create_model

if type_name is None:
type_name = _generate_parsing_type_name
Expand Down

0 comments on commit ea72c48

Please sign in to comment.