Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FastAPIDeprecationWarning (0.08 sec)

  1. tests/test_regex_deprecated_params.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, Query
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.testclient import TestClient
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.get("/items/")
            async def read_items(
                q: Annotated[str | None, Query(regex="^fixedquery$")] = None,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  2. fastapi/utils.py

        Undefined,
        UndefinedType,
        Validator,
        annotation_is_pydantic_v1,
    )
    from fastapi.datastructures import DefaultPlaceholder, DefaultType
    from fastapi.exceptions import FastAPIDeprecationWarning, PydanticV1NotSupportedError
    from pydantic import BaseModel
    from pydantic.fields import FieldInfo
    from typing_extensions import Literal
    
    from ._compat import v2
    
    if TYPE_CHECKING:  # pragma: nocover
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  3. tests/test_regex_deprecated_body.py

    from typing import Annotated
    
    import pytest
    from fastapi import FastAPI, Form
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from .utils import needs_py310
    
    
    def get_client():
        app = FastAPI()
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.post("/items/")
            async def read_items(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_query_params_str_validations/test_tutorial004.py

                marks=(
                    needs_py310,
                    pytest.mark.filterwarnings(
                        "ignore:`regex` has been deprecated, please use `pattern` instead:fastapi.exceptions.FastAPIDeprecationWarning"
                    ),
                ),
            ),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(
            f"docs_src.query_params_str_validations.{request.param}"
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 12:45:20 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  5. fastapi/exceptions.py

            self.body = body
    
    
    class PydanticV1NotSupportedError(FastAPIError):
        """
        A pydantic.v1 model is used, which is no longer supported.
        """
    
    
    class FastAPIDeprecationWarning(UserWarning):
        """
        A custom deprecation warning as DeprecationWarning is ignored
        Ref: https://sethmlarson.dev/deprecations-via-warnings-dont-work-for-python-libraries
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.8K bytes
    - Viewed (0)
Back to top