Skip to content

Commit

Permalink
馃摑 Update docs' references to Python 3.6 and 3.7, use Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Oct 15, 2023
1 parent ab00238 commit 79be99f
Show file tree
Hide file tree
Showing 109 changed files with 628 additions and 628 deletions.
2 changes: 1 addition & 1 deletion docs/de/docs/features.md
Expand Up @@ -25,7 +25,7 @@ Mit einer interaktiven API-Dokumentation und explorativen webbasierten Benutzers

### Nur modernes Python

Alles basiert auf **Python 3.6 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.
Alles basiert auf **Python 3.8 Typ**-Deklarationen (dank Pydantic). Es muss keine neue Syntax gelernt werden, nur standardisiertes modernes Python.



Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/advanced/additional-status-codes.md
Expand Up @@ -26,7 +26,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
{!> ../../../docs_src/additional_status_codes/tutorial001_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="4 26"
{!> ../../../docs_src/additional_status_codes/tutorial001_an.py!}
Expand All @@ -41,7 +41,7 @@ To achieve that, import `JSONResponse`, and return your content there directly,
{!> ../../../docs_src/additional_status_codes/tutorial001_py310.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down
16 changes: 8 additions & 8 deletions docs/en/docs/advanced/advanced-dependencies.md
Expand Up @@ -24,13 +24,13 @@ To do that, we declare a method `__call__`:
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="11"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand All @@ -51,13 +51,13 @@ And now, we can use `__init__` to declare the parameters of the instance that we
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="8"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand All @@ -78,13 +78,13 @@ We could create an instance of this class with:
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="17"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -113,13 +113,13 @@ checker(q="somequery")
{!> ../../../docs_src/dependencies/tutorial011_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="21"
{!> ../../../docs_src/dependencies/tutorial011_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down
6 changes: 3 additions & 3 deletions docs/en/docs/advanced/generate-clients.md
Expand Up @@ -35,7 +35,7 @@ Let's start with a simple FastAPI application:
{!> ../../../docs_src/generate_clients/tutorial001_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="9-11 14-15 18 19 23"
{!> ../../../docs_src/generate_clients/tutorial001.py!}
Expand Down Expand Up @@ -147,7 +147,7 @@ For example, you could have a section for **items** and another section for **us
{!> ../../../docs_src/generate_clients/tutorial002_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="23 28 36"
{!> ../../../docs_src/generate_clients/tutorial002.py!}
Expand Down Expand Up @@ -204,7 +204,7 @@ You can then pass that custom function to **FastAPI** as the `generate_unique_id
{!> ../../../docs_src/generate_clients/tutorial003_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="8-9 12"
{!> ../../../docs_src/generate_clients/tutorial003.py!}
Expand Down
12 changes: 6 additions & 6 deletions docs/en/docs/advanced/security/http-basic-auth.md
Expand Up @@ -26,13 +26,13 @@ Then, when you type that username and password, the browser sends them in the he
{!> ../../../docs_src/security/tutorial006_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="2 7 11"
{!> ../../../docs_src/security/tutorial006_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -65,13 +65,13 @@ Then we can use `secrets.compare_digest()` to ensure that `credentials.username`
{!> ../../../docs_src/security/tutorial007_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="1 12-24"
{!> ../../../docs_src/security/tutorial007_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -148,13 +148,13 @@ After detecting that the credentials are incorrect, return an `HTTPException` wi
{!> ../../../docs_src/security/tutorial007_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="26-30"
{!> ../../../docs_src/security/tutorial007_an.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down
32 changes: 16 additions & 16 deletions docs/en/docs/advanced/security/oauth2-scopes.md
Expand Up @@ -68,7 +68,7 @@ First, let's quickly see the parts that change from the examples in the main **T
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="2 4 8 12 47 65 106 108-116 122-125 129-135 140 156"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -92,7 +92,7 @@ First, let's quickly see the parts that change from the examples in the main **T
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -121,7 +121,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="63-66"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -146,7 +146,7 @@ The `scopes` parameter receives a `dict` with each scope as a key and the descri
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -188,7 +188,7 @@ And we return the scopes as part of the JWT token.
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="156"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -212,7 +212,7 @@ And we return the scopes as part of the JWT token.
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -254,7 +254,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="4 140 171"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -278,7 +278,7 @@ In this case, it requires the scope `me` (it could require more than one scope).
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -320,7 +320,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="8 106"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -344,7 +344,7 @@ This `SecurityScopes` class is similar to `Request` (`Request` was used to get t
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -377,7 +377,7 @@ In this exception, we include the scopes required (if any) as a string separated
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="106 108-116"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -401,7 +401,7 @@ In this exception, we include the scopes required (if any) as a string separated
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -436,7 +436,7 @@ We also verify that we have a user with that username, and if not, we raise that
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="47 117-128"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -460,7 +460,7 @@ We also verify that we have a user with that username, and if not, we raise that
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand All @@ -487,7 +487,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
{!> ../../../docs_src/security/tutorial005_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="129-135"
{!> ../../../docs_src/security/tutorial005_an.py!}
Expand All @@ -511,7 +511,7 @@ For this, we use `security_scopes.scopes`, that contains a `list` with all these
{!> ../../../docs_src/security/tutorial005_py39.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down
12 changes: 6 additions & 6 deletions docs/en/docs/advanced/settings.md
Expand Up @@ -260,13 +260,13 @@ Now we create a dependency that returns a new `config.Settings()`.
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="6 12-13"
{!> ../../../docs_src/settings/app02_an/main.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand All @@ -288,13 +288,13 @@ And then we can require it from the *path operation function* as a dependency an
{!> ../../../docs_src/settings/app02_an_py39/main.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="17 19-21"
{!> ../../../docs_src/settings/app02_an/main.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down Expand Up @@ -396,13 +396,13 @@ But as we are using the `@lru_cache()` decorator on top, the `Settings` object w
{!> ../../../docs_src/settings/app03_an_py39/main.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="1 11"
{!> ../../../docs_src/settings/app03_an/main.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/docs/advanced/testing-dependencies.md
Expand Up @@ -40,7 +40,7 @@ And then **FastAPI** will call that override instead of the original dependency.
{!> ../../../docs_src/dependency_testing/tutorial001_an_py39.py!}
```

=== "Python 3.6+"
=== "Python 3.8+"

```Python hl_lines="29-30 33"
{!> ../../../docs_src/dependency_testing/tutorial001_an.py!}
Expand All @@ -55,7 +55,7 @@ And then **FastAPI** will call that override instead of the original dependency.
{!> ../../../docs_src/dependency_testing/tutorial001_py310.py!}
```

=== "Python 3.6+ non-Annotated"
=== "Python 3.8+ non-Annotated"

!!! tip
Prefer to use the `Annotated` version if possible.
Expand Down

0 comments on commit 79be99f

Please sign in to comment.