Skip to content

Support for Pydantic v2 #11

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

Merged
merged 1 commit into from
Mar 29, 2024
Merged
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
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