Remove code examples for Python 3.8 in `additional-responses`

This commit is contained in:
Yurii Motov 2025-12-10 11:42:56 +01:00
parent 4f3e749d02
commit 2e6de5cd04
9 changed files with 6 additions and 6 deletions

View File

@ -26,7 +26,7 @@ Each of those response `dict`s can have a key `model`, containing a Pydantic mod
For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write:
{* ../../docs_src/additional_responses/tutorial001.py hl[18,22] *}
{* ../../docs_src/additional_responses/tutorial001_py39.py hl[18,22] *}
/// note
@ -203,7 +203,7 @@ For example, you can declare a response with a status code `404` that uses a Pyd
And a response with a status code `200` that uses your `response_model`, but includes a custom `example`:
{* ../../docs_src/additional_responses/tutorial003.py hl[20:31] *}
{* ../../docs_src/additional_responses/tutorial003_py39.py hl[20:31] *}
It will all be combined and included in your OpenAPI, and shown in the API docs:

View File

@ -1,6 +1,6 @@
from fastapi.testclient import TestClient
from docs_src.additional_responses.tutorial001 import app
from docs_src.additional_responses.tutorial001_py39 import app
client = TestClient(app)

View File

@ -12,7 +12,7 @@ from tests.utils import needs_py310
@pytest.fixture(
name="client",
params=[
pytest.param("tutorial002"),
pytest.param("tutorial002_py39"),
pytest.param("tutorial002_py310", marks=needs_py310),
],
)

View File

@ -1,6 +1,6 @@
from fastapi.testclient import TestClient
from docs_src.additional_responses.tutorial003 import app
from docs_src.additional_responses.tutorial003_py39 import app
client = TestClient(app)

View File

@ -12,7 +12,7 @@ from tests.utils import needs_py310
@pytest.fixture(
name="client",
params=[
pytest.param("tutorial004"),
pytest.param("tutorial004_py39"),
pytest.param("tutorial004_py310", marks=needs_py310),
],
)