From b45192c68a49876e5657c9fb7704e02d91c1633b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Oct 2024 22:11:20 +0200 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=91=B7=20Tweak=20labeler=20to=20not?= =?UTF-8?q?=20override=20custom=20labels=20(#12398)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index c3bb83f9a..e8e58015a 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -17,6 +17,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/labeler@v5 + if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }} + - run: echo "Done adding labels" # Run this after labeler applied labels check-labels: needs: From e45b5d3589bbfdbe7953a8da3eae0829c74d6697 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 7 Oct 2024 20:11:42 +0000 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 490f99c70..26cba035b 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* 👷 Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * 👷 Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). * 👷 Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). * ⬆ Bump pypa/gh-action-pypi-publish from 1.10.1 to 1.10.3. PR [#12386](https://github.com/fastapi/fastapi/pull/12386) by [@dependabot[bot]](https://github.com/apps/dependabot). From 797cad7162592b6e581228bec09682da8feb6752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Oct 2024 22:18:07 +0200 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=93=9D=20Fix=20extra=20mdx-base-path?= =?UTF-8?q?=20paths=20(#12397)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/tutorial/sql-databases.md | 48 ++++++++++---------- docs/it/docs/index.md | 3 -- docs/pt/docs/tutorial/cookie-param-models.md | 16 +++---- scripts/docs.py | 2 +- 4 files changed, 33 insertions(+), 36 deletions(-) diff --git a/docs/en/docs/tutorial/sql-databases.md b/docs/en/docs/tutorial/sql-databases.md index f65fa773c..7836efae1 100644 --- a/docs/en/docs/tutorial/sql-databases.md +++ b/docs/en/docs/tutorial/sql-databases.md @@ -296,7 +296,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.10+ ```Python hl_lines="1 4-6 9-10 21-22 25-26" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -304,7 +304,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.9+ ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -312,7 +312,7 @@ But for security, the `password` won't be in other Pydantic *models*, for exampl //// tab | Python 3.8+ ```Python hl_lines="3 6-8 11-12 23-24 27-28" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -346,7 +346,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.10+ ```Python hl_lines="13-15 29-32" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -354,7 +354,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.9+ ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -362,7 +362,7 @@ Not only the IDs of those items, but all the data that we defined in the Pydanti //// tab | Python 3.8+ ```Python hl_lines="15-17 31-34" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -384,7 +384,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.10+ ```Python hl_lines="13 17-18 29 34-35" -{!> ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -392,7 +392,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.9+ ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -400,7 +400,7 @@ In the `Config` class, set the attribute `orm_mode = True`. //// tab | Python 3.8+ ```Python hl_lines="15 19-20 31 36-37" -{!> ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -559,7 +559,7 @@ In a very simplistic way create the database tables: //// tab | Python 3.9+ ```Python hl_lines="7" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -567,7 +567,7 @@ In a very simplistic way create the database tables: //// tab | Python 3.8+ ```Python hl_lines="9" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -597,7 +597,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in //// tab | Python 3.9+ ```Python hl_lines="13-18" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -605,7 +605,7 @@ Our dependency will create a new SQLAlchemy `SessionLocal` that will be used in //// tab | Python 3.8+ ```Python hl_lines="15-20" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -629,7 +629,7 @@ This will then give us better editor support inside the *path operation function //// tab | Python 3.9+ ```Python hl_lines="22 30 36 45 51" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -637,7 +637,7 @@ This will then give us better editor support inside the *path operation function //// tab | Python 3.8+ ```Python hl_lines="24 32 38 47 53" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -657,7 +657,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code. //// tab | Python 3.9+ ```Python hl_lines="21-26 29-32 35-40 43-47 50-53" -{!> ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -665,7 +665,7 @@ Now, finally, here's the standard **FastAPI** *path operations* code. //// tab | Python 3.8+ ```Python hl_lines="23-28 31-34 37-42 45-49 52-55" -{!> ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -766,7 +766,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py310/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py310/schemas.py!} ``` //// @@ -774,7 +774,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/schemas.py!} ``` //// @@ -782,7 +782,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app/schemas.py!} +{!> ../../docs_src/sql_databases/sql_app/schemas.py!} ``` //// @@ -798,7 +798,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app_py39/main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/main.py!} ``` //// @@ -806,7 +806,7 @@ For example, in a background task worker with ../../../docs_src/sql_databases/sql_app/main.py!} +{!> ../../docs_src/sql_databases/sql_app/main.py!} ``` //// @@ -863,7 +863,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session //// tab | Python 3.9+ ```Python hl_lines="12-20" -{!> ../../../docs_src/sql_databases/sql_app_py39/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app_py39/alt_main.py!} ``` //// @@ -871,7 +871,7 @@ The middleware we'll add (just a function) will create a new SQLAlchemy `Session //// tab | Python 3.8+ ```Python hl_lines="14-22" -{!> ../../../docs_src/sql_databases/sql_app/alt_main.py!} +{!> ../../docs_src/sql_databases/sql_app/alt_main.py!} ``` //// diff --git a/docs/it/docs/index.md b/docs/it/docs/index.md index 57940f0ed..3bfff82f1 100644 --- a/docs/it/docs/index.md +++ b/docs/it/docs/index.md @@ -1,6 +1,3 @@ -{!../../../docs/missing-translation.md!} - -

FastAPI

diff --git a/docs/pt/docs/tutorial/cookie-param-models.md b/docs/pt/docs/tutorial/cookie-param-models.md index 12d7ee08c..671e0d74f 100644 --- a/docs/pt/docs/tutorial/cookie-param-models.md +++ b/docs/pt/docs/tutorial/cookie-param-models.md @@ -23,7 +23,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**, //// tab | Python 3.10+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py310.py!} ``` //// @@ -31,7 +31,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**, //// tab | Python 3.9+ ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an_py39.py!} ``` //// @@ -39,7 +39,7 @@ Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**, //// tab | Python 3.8+ ```Python hl_lines="10-13 17" -{!> ../../../docs_src/cookie_param_models/tutorial001_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_an.py!} ``` //// @@ -53,7 +53,7 @@ Prefira utilizar a versão `Annotated` se possível. /// ```Python hl_lines="7-10 14" -{!> ../../../docs_src/cookie_param_models/tutorial001_py310.py!} +{!> ../../docs_src/cookie_param_models/tutorial001_py310.py!} ``` //// @@ -67,7 +67,7 @@ Prefira utilizar a versão `Annotated` se possível. /// ```Python hl_lines="9-12 16" -{!> ../../../docs_src/cookie_param_models/tutorial001.py!} +{!> ../../docs_src/cookie_param_models/tutorial001.py!} ``` //// @@ -105,7 +105,7 @@ Agora a sua API possui o poder de contrar o seu próprio ../../../docs_src/cookie_param_models/tutorial002_an_py39.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an_py39.py!} ``` //// @@ -113,7 +113,7 @@ Agora a sua API possui o poder de contrar o seu próprio ../../../docs_src/cookie_param_models/tutorial002_an.py!} +{!> ../../docs_src/cookie_param_models/tutorial002_an.py!} ``` //// @@ -127,7 +127,7 @@ Prefira utilizar a versão `Annotated` se possível. /// ```Python hl_lines="10" -{!> ../../../docs_src/cookie_param_models/tutorial002.py!} +{!> ../../docs_src/cookie_param_models/tutorial002.py!} ``` //// diff --git a/scripts/docs.py b/scripts/docs.py index f0c51f7a6..e5c423d58 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -23,7 +23,7 @@ app = typer.Typer() mkdocs_name = "mkdocs.yml" missing_translation_snippet = """ -{!../../../docs/missing-translation.md!} +{!../../docs/missing-translation.md!} """ non_translated_sections = [ From ecc4133907df47830bab6f11607c981ec82091b2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 7 Oct 2024 20:18:29 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 26cba035b..ab23184a1 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * 👷 Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * 👷 Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). * 👷 Update Cloudflare GitHub Action. PR [#12387](https://github.com/fastapi/fastapi/pull/12387) by [@tiangolo](https://github.com/tiangolo). From 95f167f0480f8df94c06c95cd19323534d123a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 7 Oct 2024 22:24:40 +0200 Subject: [PATCH 5/8] =?UTF-8?q?=E2=9E=95=20Add=20docs=20dependency:=20mark?= =?UTF-8?q?down-include-variants=20(#12399)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/mkdocs.yml | 1 + requirements-docs.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index a18af2022..e55c6f176 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -305,6 +305,7 @@ markdown_extensions: # Other extensions mdx_include: + markdown_include_variants: extra: analytics: diff --git a/requirements-docs.txt b/requirements-docs.txt index 16b2998b9..c05bd51e3 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -16,3 +16,4 @@ griffe-typingdoc==0.2.7 # For griffe, it formats with black black==24.3.0 mkdocs-macros-plugin==1.0.5 +markdown-include-variants==0.0.1 From 6345147c245248302e90f0eb6371f7ab7557fd1b Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 7 Oct 2024 20:25:03 +0000 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index ab23184a1..b9dfe3da5 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). * 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * 👷 Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo). * 👷 Update worfkow deploy-docs-notify URL. PR [#12392](https://github.com/fastapi/fastapi/pull/12392) by [@tiangolo](https://github.com/tiangolo). From 018e303fd9d04fe91a12cd39561d5bc5ca7b0aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 8 Oct 2024 10:37:32 +0200 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=94=A7=20Add=20speakeasy-api=20to=20`?= =?UTF-8?q?sponsors=5Fbadge.yml`=20(#12404)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/data/sponsors_badge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/data/sponsors_badge.yml b/docs/en/data/sponsors_badge.yml index d8a41fbcb..d45028aaa 100644 --- a/docs/en/data/sponsors_badge.yml +++ b/docs/en/data/sponsors_badge.yml @@ -30,3 +30,4 @@ logins: - svix - zuplo-oss - Kong + - speakeasy-api From fcb15b4db162f2504d3f9f984d938e9a8ff03b35 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 8 Oct 2024 08:38:00 +0000 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=9D=20Update=20release=20notes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/release-notes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index b9dfe3da5..d785805e9 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -35,6 +35,7 @@ hide: ### Internal +* 🔧 Add speakeasy-api to `sponsors_badge.yml`. PR [#12404](https://github.com/fastapi/fastapi/pull/12404) by [@tiangolo](https://github.com/tiangolo). * ➕ Add docs dependency: markdown-include-variants. PR [#12399](https://github.com/fastapi/fastapi/pull/12399) by [@tiangolo](https://github.com/tiangolo). * 📝 Fix extra mdx-base-path paths. PR [#12397](https://github.com/fastapi/fastapi/pull/12397) by [@tiangolo](https://github.com/tiangolo). * 👷 Tweak labeler to not override custom labels. PR [#12398](https://github.com/fastapi/fastapi/pull/12398) by [@tiangolo](https://github.com/tiangolo).