Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching for Pydantic v2 #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fastapi_cloud_tasks/exception.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Third Party Imports
from pydantic.errors import MissingError
from pydantic.errors import PydanticValueError
from pydantic.v1.errors import MissingError
from pydantic.v1.errors import PydanticValueError


class MissingParamError(MissingError):
Expand Down
4 changes: 2 additions & 2 deletions fastapi_cloud_tasks/requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from fastapi.dependencies.utils import request_params_to_args
from fastapi.encoders import jsonable_encoder
from fastapi.routing import APIRoute
from pydantic.error_wrappers import ErrorWrapper
from pydantic.v1.error_wrappers import ErrorWrapper

# Imports from this repository
from fastapi_cloud_tasks.exception import MissingParamError
Expand Down Expand Up @@ -58,7 +58,7 @@ def _url(self, *, values):
path_values = _err_val(
request_params_to_args(route.dependant.path_params, values)
)
for (name, converter) in route.param_convertors.items():
for name, converter in route.param_convertors.items():
if name in path_values:
continue
if name not in values:
Expand Down