Skip to content

Commit

Permalink
Merge pull request #11 from Adori/yy-pydantic-v2
Browse files Browse the repository at this point in the history
Support for Pydantic v2
  • Loading branch information
yogeshdecodes authored Mar 29, 2024
2 parents c321a13 + e9638f8 commit 42c04e8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: isort
args: [--force-single-line-imports]
- repo: https://github.com/psf/black
rev: 21.12b0
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
Expand Down
2 changes: 1 addition & 1 deletion examples/full/serializer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Third Party Imports
from pydantic import BaseModel
from pydantic.v1 import BaseModel


class Payload(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion examples/simple/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Third Party Imports
from fastapi import FastAPI
from fastapi.routing import APIRouter
from pydantic import BaseModel
from pydantic.v1 import BaseModel

# Imports from this repository
from fastapi_cloud_tasks import DelayedRouteBuilder
Expand Down
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
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
google-cloud-tasks==2.7.0
google-cloud-scheduler==2.5.0
fastapi==0.70.0
fastapi==0.100.0

0 comments on commit 42c04e8

Please sign in to comment.