Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 5 of 5 for PydanticV1NotSupportedError (0.18 seconds)

  1. tests/test_pydantic_v1_error.py

    from fastapi.exceptions import PydanticV1NotSupportedError
    
    with warnings.catch_warnings():
        warnings.simplefilter("ignore", UserWarning)
        from pydantic.v1 import BaseModel
    
    
    def test_raises_pydantic_v1_model_in_endpoint_param() -> None:
        class ParamModelV1(BaseModel):
            name: str
    
        app = FastAPI()
    
        with pytest.raises(PydanticV1NotSupportedError):
    
            @app.post("/param")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.3K bytes
    - Click Count (0)
  2. fastapi/utils.py

        PydanticSchemaGenerationError,
        Undefined,
        annotation_is_pydantic_v1,
    )
    from fastapi.datastructures import DefaultPlaceholder, DefaultType
    from fastapi.exceptions import FastAPIDeprecationWarning, PydanticV1NotSupportedError
    from pydantic.fields import FieldInfo
    
    from ._compat import v2
    
    if TYPE_CHECKING:  # pragma: nocover
        from .routing import APIRoute
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:41:21 GMT 2026
    - 4.2K bytes
    - Click Count (0)
  3. tests/test_jsonable_encoder.py

    from typing import TypedDict
    
    import pytest
    from fastapi._compat import Undefined
    from fastapi.encoders import jsonable_encoder
    from fastapi.exceptions import PydanticV1NotSupportedError
    from pydantic import BaseModel, Field, ValidationError
    
    
    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    class Pet:
        def __init__(self, owner: Person, name: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  4. fastapi/encoders.py

    from pathlib import Path, PurePath
    from re import Pattern
    from types import GeneratorType
    from typing import Annotated, Any
    from uuid import UUID
    
    from annotated_doc import Doc
    from fastapi.exceptions import PydanticV1NotSupportedError
    from fastapi.types import IncEx
    from pydantic import BaseModel
    from pydantic.color import Color  # ty: ignore[deprecated]
    from pydantic.networks import AnyUrl, NameEmail
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 10.9K bytes
    - Click Count (0)
  5. fastapi/exceptions.py

            body: Any = None,
            endpoint_ctx: EndpointContext | None = None,
        ) -> None:
            super().__init__(errors, endpoint_ctx=endpoint_ctx)
            self.body = body
    
    
    class PydanticV1NotSupportedError(FastAPIError):
        """
        A pydantic.v1 model is used, which is no longer supported.
        """
    
    
    class FastAPIDeprecationWarning(UserWarning):
        """
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:41:21 GMT 2026
    - 7.3K bytes
    - Click Count (0)
Back to Top