Browse Source

Remove code examples for Python 3.8 in `response_directly`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
6f690b5ead
  1. 2
      docs/en/docs/advanced/custom-response.md
  2. 2
      docs/en/docs/advanced/response-directly.md
  3. 0
      docs_src/response_directly/tutorial001_py39.py
  4. 0
      docs_src/response_directly/tutorial002_py39.py
  5. 2
      tests/test_tutorial/test_response_directly/test_tutorial001.py

2
docs/en/docs/advanced/custom-response.md

@ -136,7 +136,7 @@ It accepts the following parameters:
FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types. FastAPI (actually Starlette) will automatically include a Content-Length header. It will also include a Content-Type header, based on the `media_type` and appending a charset for text types.
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *} {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *}
### `HTMLResponse` { #htmlresponse } ### `HTMLResponse` { #htmlresponse }

2
docs/en/docs/advanced/response-directly.md

@ -54,7 +54,7 @@ Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML"
You could put your XML content in a string, put that in a `Response`, and return it: You could put your XML content in a string, put that in a `Response`, and return it:
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *} {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *}
## Notes { #notes } ## Notes { #notes }

0
docs_src/response_directly/tutorial001.py → docs_src/response_directly/tutorial001_py39.py

0
docs_src/response_directly/tutorial002.py → docs_src/response_directly/tutorial002_py39.py

2
tests/test_tutorial/test_response_directly/test_tutorial001.py

@ -9,7 +9,7 @@ from ...utils import needs_py310, needs_pydanticv1, needs_pydanticv2
@pytest.fixture( @pytest.fixture(
name="client", name="client",
params=[ params=[
pytest.param("tutorial001"), pytest.param("tutorial001_py39"),
pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_py310", marks=needs_py310),
], ],
) )

Loading…
Cancel
Save