Browse Source

Remove code examples for Python 3.8 in `using_request_directly`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
a05ad4a0f8
  1. 2
      docs/en/docs/advanced/using-request-directly.md
  2. 0
      docs_src/using_request_directly/tutorial001_py39.py
  3. 2
      tests/test_tutorial/test_using_request_directly/test_tutorial001.py

2
docs/en/docs/advanced/using-request-directly.md

@ -29,7 +29,7 @@ Let's imagine you want to get the client's IP address/host inside of your *path
For that you need to access the request directly.
{* ../../docs_src/using_request_directly/tutorial001.py hl[1,7:8] *}
{* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *}
By declaring a *path operation function* parameter with the type being the `Request` **FastAPI** will know to pass the `Request` in that parameter.

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

2
tests/test_tutorial/test_using_request_directly/test_tutorial001.py

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

Loading…
Cancel
Save