From 2eca83fbda143678648934a787cf78f2410edd8b Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Sun, 21 Sep 2025 13:29:04 +0200 Subject: [PATCH 01/14] =?UTF-8?q?=F0=9F=93=9D=20Update=20contributing=20gu?= =?UTF-8?q?idelines=20for=20installing=20requirements=20(#14095)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/contributing.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/en/docs/contributing.md b/docs/en/docs/contributing.md index 2583fd1fb..ae99059f4 100644 --- a/docs/en/docs/contributing.md +++ b/docs/en/docs/contributing.md @@ -10,10 +10,12 @@ If you already cloned the ```console @@ -24,6 +26,24 @@ $ pip install -r requirements.txt +//// + +//// tab | `uv` + +If you have `uv`: + +
+ +```console +$ uv pip install -r requirements.txt + +---> 100% +``` + +
+ +//// + It will install all the dependencies and your local FastAPI in your local environment. ### Using your local FastAPI From 8dfc651e1a2fa669bde1b9173805d8e4f2e5e7bb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 11:29:24 +0000 Subject: [PATCH 02/14] =?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 [skip ci] --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 25744044e..33abe86d2 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,6 +7,10 @@ hide: ## Latest Changes +### Docs + +* 📝 Update contributing guidelines for installing requirements. PR [#14095](https://github.com/fastapi/fastapi/pull/14095) by [@alejsdev](https://github.com/alejsdev). + ## 0.117.1 ### Fixes From 40f3ab18e078ff4c809f3ca63851673bba435a5b Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Sun, 21 Sep 2025 14:54:15 +0200 Subject: [PATCH 03/14] =?UTF-8?q?=F0=9F=90=9B=20Hide=20sponsor=20badge=20w?= =?UTF-8?q?hen=20sponsor=20image=20is=20not=20displayed=20(#14096)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/css/custom.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index b192f6123..05bfd0fe8 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -124,6 +124,11 @@ a.announce-link:hover { border-radius: 20px; } +/* Hide .sponsor-badge when .sponsor-image is display none */ +.announce-wrapper a:has(.sponsor-image[style*="display: none"]) .sponsor-badge { + display: none; +} + .announce-wrapper>div { min-height: 40px; display: flex; From 6b1e6c5efd6a708ba978c092e368d3dd18cfc542 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 12:54:37 +0000 Subject: [PATCH 04/14] =?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 [skip ci] --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 33abe86d2..b68214d40 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -11,6 +11,10 @@ hide: * 📝 Update contributing guidelines for installing requirements. PR [#14095](https://github.com/fastapi/fastapi/pull/14095) by [@alejsdev](https://github.com/alejsdev). +### Internal + +* 🐛 Hide sponsor badge when sponsor image is not displayed. PR [#14096](https://github.com/fastapi/fastapi/pull/14096) by [@alejsdev](https://github.com/alejsdev). + ## 0.117.1 ### Fixes From f97524429d0062bede9158ecdf4cefeee3b47a61 Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Sun, 21 Sep 2025 16:11:11 +0200 Subject: [PATCH 05/14] =?UTF-8?q?=F0=9F=90=9B=20Fix=20sponsor=20display=20?= =?UTF-8?q?issue=20by=20hiding=20element=20on=20image=20error=20(#14097)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/css/custom.css | 5 ----- docs/en/docs/js/custom.js | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index 05bfd0fe8..b192f6123 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -124,11 +124,6 @@ a.announce-link:hover { border-radius: 20px; } -/* Hide .sponsor-badge when .sponsor-image is display none */ -.announce-wrapper a:has(.sponsor-image[style*="display: none"]) .sponsor-badge { - display: none; -} - .announce-wrapper>div { min-height: 40px; display: flex; diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index 4c0ada312..425b7fce7 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -135,10 +135,28 @@ async function showRandomAnnouncement(groupId, timeInterval) { } } +function hideSponsorOnImageError() { + const sponsorImages = document.querySelectorAll('.sponsor-image'); + const announceRight = document.getElementById('announce-right'); + + function hideAnnounceRight() { + if (announceRight) { + announceRight.style.display = 'none'; + } + } + + sponsorImages.forEach(function(img) { + img.addEventListener('error', function() { + hideAnnounceRight(); + }); + }); +} + async function main() { setupTermynal(); showRandomAnnouncement('announce-left', 5000) showRandomAnnouncement('announce-right', 10000) + hideSponsorOnImageError(); } document$.subscribe(() => { main() From f0da082dd3532384b2037bda7322eb9c33effa5f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 14:11:44 +0000 Subject: [PATCH 06/14] =?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 [skip ci] --- 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 b68214d40..4f296c7b7 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Internal +* 🐛 Fix sponsor display issue by hiding element on image error. PR [#14097](https://github.com/fastapi/fastapi/pull/14097) by [@alejsdev](https://github.com/alejsdev). * 🐛 Hide sponsor badge when sponsor image is not displayed. PR [#14096](https://github.com/fastapi/fastapi/pull/14096) by [@alejsdev](https://github.com/alejsdev). ## 0.117.1 From 81708603229951041eadb2437ce4aa810ef6898a Mon Sep 17 00:00:00 2001 From: Alejandra <90076947+alejsdev@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:11:52 +0200 Subject: [PATCH 07/14] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Refactor=20sponsor?= =?UTF-8?q?=20image=20handling=20(#14102)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docs/en/docs/css/custom.css | 12 ++++++++++-- docs/en/docs/js/custom.js | 39 +++++++++++++++++++++++++------------ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index b192f6123..a38df772f 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -102,7 +102,15 @@ a.announce-link:hover { align-items: center; } -.announce-wrapper div.item { +.announce-wrapper #announce-left div.item { + display: none; +} + +.announce-wrapper #announce-right { + display: none; +} + +.announce-wrapper #announce-right div.item { display: none; } @@ -112,7 +120,7 @@ a.announce-link:hover { top: -10px; right: 0; font-size: 0.5rem; - color: #999; + color: #e6e6e6; background-color: #666; border-radius: 10px; padding: 0 10px; diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index 425b7fce7..48e95901d 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -135,28 +135,43 @@ async function showRandomAnnouncement(groupId, timeInterval) { } } -function hideSponsorOnImageError() { - const sponsorImages = document.querySelectorAll('.sponsor-image'); +function handleSponsorImages() { const announceRight = document.getElementById('announce-right'); + if(!announceRight) return; - function hideAnnounceRight() { - if (announceRight) { - announceRight.style.display = 'none'; - } - } + const sponsorImages = document.querySelectorAll('.sponsor-image'); - sponsorImages.forEach(function(img) { - img.addEventListener('error', function() { - hideAnnounceRight(); + const imagePromises = Array.from(sponsorImages).map(img => { + return new Promise((resolve, reject) => { + if (img.complete && img.naturalHeight !== 0) { + resolve(); + } else { + img.addEventListener('load', () => { + if (img.naturalHeight !== 0) { + resolve(); + } else { + reject(); + } + }); + img.addEventListener('error', reject); + } }); }); + + Promise.all(imagePromises) + .then(() => { + announceRight.style.display = 'block'; + showRandomAnnouncement('announce-right', 10000); + }) + .catch(() => { + // do nothing + }); } async function main() { setupTermynal(); showRandomAnnouncement('announce-left', 5000) - showRandomAnnouncement('announce-right', 10000) - hideSponsorOnImageError(); + handleSponsorImages(); } document$.subscribe(() => { main() From 9aa25fd6822de7504c739c4c2f3565627594353d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Sep 2025 15:12:21 +0000 Subject: [PATCH 08/14] =?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 [skip ci] --- 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 4f296c7b7..34b0a2886 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Internal +* ♻️ Refactor sponsor image handling. PR [#14102](https://github.com/fastapi/fastapi/pull/14102) by [@alejsdev](https://github.com/alejsdev). * 🐛 Fix sponsor display issue by hiding element on image error. PR [#14097](https://github.com/fastapi/fastapi/pull/14097) by [@alejsdev](https://github.com/alejsdev). * 🐛 Hide sponsor badge when sponsor image is not displayed. PR [#14096](https://github.com/fastapi/fastapi/pull/14096) by [@alejsdev](https://github.com/alejsdev). From b40da4f0d54aa6a3bc4a0048016d7f20d1ba0560 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:30:27 +0200 Subject: [PATCH 09/14] =?UTF-8?q?=E2=AC=86=20[pre-commit.ci]=20pre-commit?= =?UTF-8?q?=20autoupdate=20(#14103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.13.0 → v0.13.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.0...v0.13.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94016ad31..8b24c8c0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.0 + rev: v0.13.1 hooks: - id: ruff args: From f23550223475e0e173ef63b0d54236fc105a8867 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Sep 2025 19:30:48 +0000 Subject: [PATCH 10/14] =?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 [skip ci] --- 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 34b0a2886..1dd99a377 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -13,6 +13,7 @@ hide: ### Internal +* ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#14103](https://github.com/fastapi/fastapi/pull/14103) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * ♻️ Refactor sponsor image handling. PR [#14102](https://github.com/fastapi/fastapi/pull/14102) by [@alejsdev](https://github.com/alejsdev). * 🐛 Fix sponsor display issue by hiding element on image error. PR [#14097](https://github.com/fastapi/fastapi/pull/14097) by [@alejsdev](https://github.com/alejsdev). * 🐛 Hide sponsor badge when sponsor image is not displayed. PR [#14096](https://github.com/fastapi/fastapi/pull/14096) by [@alejsdev](https://github.com/alejsdev). From cca3341cb93cb4d0267dd8e862db9235aeaac11c Mon Sep 17 00:00:00 2001 From: Nils-Hero Lindemann Date: Wed, 24 Sep 2025 10:10:28 +0200 Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=8C=90=20Sync=20German=20docs=20(#1?= =?UTF-8?q?4098)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Sync German docs with #13510 * Sync German docs with #14059 --------- Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> --- docs/de/docs/tutorial/cookie-params.md | 10 ++++++++++ .../docs/tutorial/path-params-numeric-validations.md | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/de/docs/tutorial/cookie-params.md b/docs/de/docs/tutorial/cookie-params.md index 9f50c7ae5..81a753211 100644 --- a/docs/de/docs/tutorial/cookie-params.md +++ b/docs/de/docs/tutorial/cookie-params.md @@ -30,6 +30,16 @@ Um Cookies zu deklarieren, müssen Sie `Cookie` verwenden, da die Parameter sons /// +/// info | Info + +Beachten Sie, dass **Browser Cookies auf besondere Weise und hinter den Kulissen handhaben** und **JavaScript** **nicht** ohne Weiteres erlauben, auf sie zuzugreifen. + +Wenn Sie zur **API-Dokumentations-UI** unter `/docs` gehen, können Sie die **Dokumentation** zu Cookies für Ihre *Pfadoperationen* sehen. + +Aber selbst wenn Sie die **Daten ausfüllen** und auf „Execute“ klicken, da die Dokumentations-UI mit **JavaScript** arbeitet, werden die Cookies nicht gesendet, und Sie sehen eine **Fehler**-Meldung, als hätten Sie keine Werte eingegeben. + +/// + ## Zusammenfassung { #recap } Deklarieren Sie Cookies mit `Cookie` und verwenden Sie dabei das gleiche allgemeine Muster wie bei `Query` und `Path`. diff --git a/docs/de/docs/tutorial/path-params-numeric-validations.md b/docs/de/docs/tutorial/path-params-numeric-validations.md index 36f466059..5b7474944 100644 --- a/docs/de/docs/tutorial/path-params-numeric-validations.md +++ b/docs/de/docs/tutorial/path-params-numeric-validations.md @@ -54,18 +54,8 @@ Für **FastAPI** spielt es keine Rolle. Es erkennt die Parameter anhand ihrer Na Sie können Ihre Funktion also so deklarieren: -//// tab | Python 3.8 nicht annotiert - -/// tip | Tipp - -Bevorzugen Sie die `Annotated`-Version, falls möglich. - -/// - {* ../../docs_src/path_params_numeric_validations/tutorial002.py hl[7] *} -//// - Aber bedenken Sie, dass Sie dieses Problem nicht haben, wenn Sie `Annotated` verwenden, da es nicht darauf ankommt, dass Sie keine Funktionsparameter-Defaultwerte für `Query()` oder `Path()` verwenden. {* ../../docs_src/path_params_numeric_validations/tutorial002_an_py39.py *} From 287eb316df5b7c35dd1e5da27ca2a8d345bee8d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Sep 2025 08:10:57 +0000 Subject: [PATCH 12/14] =?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 [skip ci] --- docs/en/docs/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 1dd99a377..c1e701877 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -11,6 +11,10 @@ hide: * 📝 Update contributing guidelines for installing requirements. PR [#14095](https://github.com/fastapi/fastapi/pull/14095) by [@alejsdev](https://github.com/alejsdev). +### Translations + +* 🌐 Sync German docs. PR [#14098](https://github.com/fastapi/fastapi/pull/14098) by [@nilslindemann](https://github.com/nilslindemann). + ### Internal * ⬆ [pre-commit.ci] pre-commit autoupdate. PR [#14103](https://github.com/fastapi/fastapi/pull/14103) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). From 3eb2ee7510905447a36abe628708f102e09cfa59 Mon Sep 17 00:00:00 2001 From: alv2017 Date: Thu, 25 Sep 2025 09:45:24 +0300 Subject: [PATCH 13/14] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20Fix=20typos=20in=20O?= =?UTF-8?q?Auth2=20password=20request=20forms=20(#14112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed typos in OAuth2PasswordRequestForm and in OAuth2PasswordRequestFormStrict --- fastapi/security/oauth2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi/security/oauth2.py b/fastapi/security/oauth2.py index 88e394db1..fdedbc2da 100644 --- a/fastapi/security/oauth2.py +++ b/fastapi/security/oauth2.py @@ -89,7 +89,7 @@ class OAuth2PasswordRequestForm: Doc( """ `password` string. The OAuth2 spec requires the exact field name - `password". + `password`. """ ), ], @@ -243,7 +243,7 @@ class OAuth2PasswordRequestFormStrict(OAuth2PasswordRequestForm): Doc( """ `password` string. The OAuth2 spec requires the exact field name - `password". + `password`. """ ), ], From 450a334253b1426aab08b4dea17b16ba8b4c098c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Sep 2025 06:45:53 +0000 Subject: [PATCH 14/14] =?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 [skip ci] --- 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 c1e701877..fe1fac8cf 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -9,6 +9,7 @@ hide: ### Docs +* ✏️ Fix typos in OAuth2 password request forms. PR [#14112](https://github.com/fastapi/fastapi/pull/14112) by [@alv2017](https://github.com/alv2017). * 📝 Update contributing guidelines for installing requirements. PR [#14095](https://github.com/fastapi/fastapi/pull/14095) by [@alejsdev](https://github.com/alejsdev). ### Translations