Browse Source

Remove code examples for Python 3.8 in `response_cookies`

pull/14510/head
Yurii Motov 7 months ago
parent
commit
594705dcda
  1. 4
      docs/en/docs/advanced/response-cookies.md
  2. 0
      docs_src/response_cookies/tutorial001_py39.py
  3. 0
      docs_src/response_cookies/tutorial002_py39.py
  4. 2
      tests/test_tutorial/test_response_cookies/test_tutorial001.py
  5. 2
      tests/test_tutorial/test_response_cookies/test_tutorial002.py

4
docs/en/docs/advanced/response-cookies.md

@ -6,7 +6,7 @@ You can declare a parameter of type `Response` in your *path operation function*
And then you can set cookies in that *temporal* response object.
{* ../../docs_src/response_cookies/tutorial002.py hl[1, 8:9] *}
{* ../../docs_src/response_cookies/tutorial002_py39.py hl[1, 8:9] *}
And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
@ -24,7 +24,7 @@ To do that, you can create a response as described in [Return a Response Directl
Then set Cookies in it, and then return it:
{* ../../docs_src/response_cookies/tutorial001.py hl[10:12] *}
{* ../../docs_src/response_cookies/tutorial001_py39.py hl[10:12] *}
/// tip

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

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

2
tests/test_tutorial/test_response_cookies/test_tutorial001.py

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

2
tests/test_tutorial/test_response_cookies/test_tutorial002.py

@ -1,6 +1,6 @@
from fastapi.testclient import TestClient
from docs_src.response_cookies.tutorial002 import app
from docs_src.response_cookies.tutorial002_py39 import app
client = TestClient(app)

Loading…
Cancel
Save