diff --git a/README.md b/README.md index a804feaf..f0a1f760 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Supported [Integrations](https://openapi-core.readthedocs.io/en/latest/integrati | [AIOHTTP](https://openapi-core.readthedocs.io/en/latest/integrations/aiohttp/) | versions 3.8+ and 3.11+ tracks | Low-level request and response classes | | [Django](https://openapi-core.readthedocs.io/en/latest/integrations/django/) | versions 4, 5, and 6 | Middleware, decorator and low level | | [Falcon](https://openapi-core.readthedocs.io/en/latest/integrations/falcon/) | version 4 | Middleware and low-level classes | -| [FastAPI](https://openapi-core.readthedocs.io/en/latest/integrations/fastapi/) | versions 0.11x and 0.12x | Middleware (low-level via Starlette integration) | +| [FastAPI](https://openapi-core.readthedocs.io/en/latest/integrations/fastapi/) | versions 0.11x, 0.12x, and 0.13x | Middleware (low-level via Starlette integration) | | [Flask](https://openapi-core.readthedocs.io/en/latest/integrations/flask/) | versions 2 and 3 | View decorator, class-based view, and low-level classes | | [Requests](https://openapi-core.readthedocs.io/en/latest/integrations/requests/) | default dependency set | Low-level request, webhook request, and response classes | | [Starlette](https://openapi-core.readthedocs.io/en/latest/integrations/starlette/) | versions 0.4x and 0.5x | Middleware and low-level classes | diff --git a/docs/integrations/fastapi.md b/docs/integrations/fastapi.md index a8e40275..d0a6b0a0 100644 --- a/docs/integrations/fastapi.md +++ b/docs/integrations/fastapi.md @@ -1,6 +1,6 @@ # FastAPI -This section describes integration with [FastAPI](https://fastapi.tiangolo.com) ASGI framework. The integration supports FastAPI versions 0.11x and 0.12x. +This section describes integration with [FastAPI](https://fastapi.tiangolo.com) ASGI framework. The integration supports FastAPI versions 0.11x, 0.12x and 0.13x. !!! note diff --git a/poetry.lock b/poetry.lock index 0b20463b..28382a57 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -223,7 +223,7 @@ files = [ {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, ] -markers = {main = "extra == \"fastapi\" or extra == \"starlette\""} +markers = {main = "extra == \"starlette\" or extra == \"fastapi\""} [package.dependencies] exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} @@ -992,7 +992,7 @@ files = [ {file = "exceptiongroup-1.1.3-py3-none-any.whl", hash = "sha256:343280667a4585d195ca1cf9cef84a4e178c4b6cf2274caef9859782b567d5e3"}, {file = "exceptiongroup-1.1.3.tar.gz", hash = "sha256:097acd85d473d75af5bb98e41b61ff7fe35efe6675e4f9370ec6ec5126d160e9"}, ] -markers = {main = "(extra == \"fastapi\" or extra == \"starlette\") and python_version < \"3.11\"", dev = "python_version < \"3.11\""} +markers = {main = "(extra == \"starlette\" or extra == \"fastapi\") and python_version < \"3.11\"", dev = "python_version < \"3.11\""} [package.extras] test = ["pytest (>=6)"] @@ -1069,25 +1069,26 @@ test = ["pytest"] [[package]] name = "fastapi" -version = "0.128.0" +version = "0.135.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = true -python-versions = ">=3.9" +python-versions = ">=3.10" groups = ["main"] markers = "extra == \"fastapi\"" files = [ - {file = "fastapi-0.128.0-py3-none-any.whl", hash = "sha256:aebd93f9716ee3b4f4fcfe13ffb7cf308d99c9f3ab5622d8877441072561582d"}, - {file = "fastapi-0.128.0.tar.gz", hash = "sha256:1cc179e1cef10a6be60ffe429f79b829dce99d8de32d7acb7e6c8dfdf7f2645a"}, + {file = "fastapi-0.135.1-py3-none-any.whl", hash = "sha256:46e2fc5745924b7c840f71ddd277382af29ce1cdb7d5eab5bf697e3fb9999c9e"}, + {file = "fastapi-0.135.1.tar.gz", hash = "sha256:d04115b508d936d254cea545b7312ecaa58a7b3a0f84952535b4c9afae7668cd"}, ] [package.dependencies] annotated-doc = ">=0.0.2" pydantic = ">=2.7.0" -starlette = ">=0.40.0,<0.51.0" +starlette = ">=0.46.0" typing-extensions = ">=4.8.0" +typing-inspection = ">=0.4.2" [package.extras] -all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "uvicorn[standard] (>=0.12.0)"] standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] @@ -1394,7 +1395,7 @@ files = [ {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] -markers = {main = "extra == \"aiohttp\" or extra == \"fastapi\" or extra == \"starlette\" or extra == \"requests\""} +markers = {main = "extra == \"aiohttp\" or extra == \"starlette\" or extra == \"fastapi\" or extra == \"requests\""} [[package]] name = "iniconfig" @@ -1574,7 +1575,7 @@ files = [ [package.dependencies] attrs = ">=22.2.0" -jsonschema-specifications = ">=2023.03.6" +jsonschema-specifications = ">=2023.3.6" referencing = ">=0.28.4" rpds-py = ">=0.7.1" @@ -3688,7 +3689,7 @@ files = [ {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, ] -markers = {main = "extra == \"fastapi\" or extra == \"starlette\""} +markers = {main = "extra == \"starlette\" or extra == \"fastapi\""} [[package]] name = "sqlparse" @@ -3734,7 +3735,7 @@ description = "The little ASGI library that shines." optional = true python-versions = ">=3.10" groups = ["main"] -markers = "extra == \"fastapi\" or extra == \"starlette\"" +markers = "extra == \"starlette\" or extra == \"fastapi\"" files = [ {file = "starlette-0.50.0-py3-none-any.whl", hash = "sha256:9e5391843ec9b6e472eed1365a78c8098cfceb7a74bfd4d6b1c0c0095efb3bca"}, {file = "starlette-0.50.0.tar.gz", hash = "sha256:a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca"}, @@ -4153,4 +4154,4 @@ werkzeug = [] [metadata] lock-version = "2.1" python-versions = "^3.10.0" -content-hash = "8b857d922112c4bf002b2e358f2fb6def284f66382ce650bcc039de06c75d921" +content-hash = "f5eaf014a5df4938aa3dceebad513c86554551b7116c5d94fe3adb12e97d9452" diff --git a/pyproject.toml b/pyproject.toml index c8d8e1e1..3d4f7c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,7 +75,7 @@ jsonschema-path = "^0.4.5" jsonschema = "^4.23.0" multidict = {version = "^6.0.4", optional = true} aioitertools = {version = ">=0.11,<0.14", optional = true} -fastapi = {version = ">=0.111,<0.130", optional = true} +fastapi = {version = ">=0.111,<0.140", optional = true} typing-extensions = "^4.8.0" [tool.poetry.extras] @@ -175,6 +175,7 @@ env_list = [ "contrib-falcon-4x", "contrib-fastapi-011x", "contrib-fastapi-012x", + "contrib-fastapi-013x", "contrib-flask-2x", "contrib-flask-3x", "contrib-requests-default", @@ -222,7 +223,10 @@ set_env = { POETRY_EXTRA = "falcon", CONTRIB_PACKAGE = "falcon", CONTRIB_SPEC = set_env = { POETRY_EXTRA = "fastapi", CONTRIB_PACKAGE = "fastapi", CONTRIB_SPEC = ">=0.111,<0.120", CONTRIB_PATHS = "tests/integration/contrib/fastapi" } [tool.tox.env."contrib-fastapi-012x"] -set_env = { POETRY_EXTRA = "fastapi", CONTRIB_PACKAGE = "fastapi", CONTRIB_SPEC = ">=0.120,<0.129", CONTRIB_PATHS = "tests/integration/contrib/fastapi" } +set_env = { POETRY_EXTRA = "fastapi", CONTRIB_PACKAGE = "fastapi", CONTRIB_SPEC = ">=0.120,<0.130", CONTRIB_PATHS = "tests/integration/contrib/fastapi" } + +[tool.tox.env."contrib-fastapi-013x"] +set_env = { POETRY_EXTRA = "fastapi", CONTRIB_PACKAGE = "fastapi", CONTRIB_SPEC = ">=0.130,<0.140", CONTRIB_PATHS = "tests/integration/contrib/fastapi" } [tool.tox.env."contrib-flask-2x"] set_env = { POETRY_EXTRA = "flask", CONTRIB_PACKAGE = "flask", CONTRIB_SPEC = ">=2.0,<3.0", CONTRIB_PATHS = "tests/integration/contrib/flask tests/unit/contrib/flask" }