diff --git a/docs/en/docs/contributing.md b/docs/en/docs/contributing.md index 07031a235a..fe7318f6cd 100644 --- a/docs/en/docs/contributing.md +++ b/docs/en/docs/contributing.md @@ -191,7 +191,11 @@ If you see mistakes in your language, you can make suggestions to the prompt in #### Reviewing Translation PRs -You can also check the currently [existing pull requests](https://github.com/fastapi/fastapi/pulls) for your language. You can filter the pull requests by the ones with the label for your language. For example, for Spanish, the label is [`lang-es`](https://github.com/fastapi/fastapi/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3Alang-es+label%3Aawaiting-review). +We don’t require approval from native speakers for translation PRs generated automatically by our translation workflow. However, you can still review them and suggest improvements to the LLM prompt for that language to make the future translations better. + +You can check the currently [existing pull requests](https://github.com/fastapi/fastapi/pulls) for your language. You can filter the pull requests by the ones with the label for your language. For example, for Spanish, the label is [`lang-es`](https://github.com/fastapi/fastapi/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3Alang-es+label%3Aawaiting-review). + +You can also review already merged translation PRs. To do this, go to the [closed pull requests](https://github.com/fastapi/fastapi/pulls?q=is%3Apr+is%3Aclosed) and filter by your language label. For example, for Spanish, you can use [`lang-es`](https://github.com/fastapi/fastapi/pulls?q=is%3Apr+is%3Aclosed+label%3Alang-es). When reviewing a pull request, it's better not to suggest changes in the same pull request, because it is LLM generated, and it won't be possible to make sure that small individual changes are replicated in other similar sections, or that they are preserved when translating the same content again. @@ -203,6 +207,8 @@ Check the docs about [adding a pull request review](https://help.github.com/en/g /// +PRs with suggestions to the language-specific LLM prompt require approval from at least one native speaker. Your help here is very much appreciated! + #### Subscribe to Notifications for Your Language Check if there's a [GitHub Discussion](https://github.com/fastapi/fastapi/discussions/categories/translations) to coordinate translations for your language. You can subscribe to it, and when there's a new pull request to review, an automatic comment will be added to the discussion. diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index e207197c75..bbfd49b55e 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -254,6 +254,12 @@ Inspired by Termynal's CSS tricks with modifications box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930; } +.doc-param-details .highlight { + overflow-x: auto; + width: 0; + min-width: 100%; +} + .md-typeset dfn { border-bottom: .05rem dotted var(--md-default-fg-color--light); cursor: help; diff --git a/docs/en/docs/management-tasks.md b/docs/en/docs/management-tasks.md index e4094c4a18..3388013a00 100644 --- a/docs/en/docs/management-tasks.md +++ b/docs/en/docs/management-tasks.md @@ -114,7 +114,14 @@ For these language translation PRs, confirm that: * The PR was automated (authored by @tiangolo), not made by another user. * It has the labels `lang-all` and `lang-{lang code}`. -* If the PR is approved by at least one native speaker, you can merge it. + +For PRs that update language-specific LLM prompts, confirm that: + +* The PR has the labels `lang-all` and `lang-{lang code}`. +* It is approved by at least one native speaker. +* In some cases you might need to translate several pages with new prompt to make sure it works as expected. + +If the PR meets the above conditions, you can merge it. 😎 ## Review PRs diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index e832bdbe5b..387973e56f 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -7,12 +7,17 @@ hide: ## Latest Changes +## 0.135.2 (2026-03-01) + ### Upgrades * ⬆️ Increase lower bound to `pydantic >=2.9.0.` and fix the test suite. PR [#15139](https://github.com/fastapi/fastapi/pull/15139) by [@svlandeg](https://github.com/svlandeg). ### Docs +* πŸ“ Add missing last release notes dates. PR [#15202](https://github.com/fastapi/fastapi/pull/15202) by [@tiangolo](https://github.com/tiangolo). +* πŸ“ Update docs for contributors and team members regarding translation PRs. PR [#15200](https://github.com/fastapi/fastapi/pull/15200) by [@YuriiMotov](https://github.com/YuriiMotov). +* πŸ’„ Fix code blocks in reference docs overflowing table width. PR [#15094](https://github.com/fastapi/fastapi/pull/15094) by [@YuriiMotov](https://github.com/YuriiMotov). * πŸ“ Fix duplicated words in docstrings. PR [#15116](https://github.com/fastapi/fastapi/pull/15116) by [@AhsanSheraz](https://github.com/AhsanSheraz). * πŸ“ Add docs for `pyproject.toml` with `entrypoint`. PR [#15075](https://github.com/fastapi/fastapi/pull/15075) by [@tiangolo](https://github.com/tiangolo). * πŸ“ Update links in docs to no longer use the classes external-link and internal-link. PR [#15061](https://github.com/fastapi/fastapi/pull/15061) by [@tiangolo](https://github.com/tiangolo). @@ -48,6 +53,7 @@ hide: ### Internal +* πŸ”¨ Exclude spam comments from statistics in `scripts/people.py`. PR [#15088](https://github.com/fastapi/fastapi/pull/15088) by [@YuriiMotov](https://github.com/YuriiMotov). * ⬆ Bump authlib from 1.6.7 to 1.6.9. PR [#15128](https://github.com/fastapi/fastapi/pull/15128) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump pyasn1 from 0.6.2 to 0.6.3. PR [#15143](https://github.com/fastapi/fastapi/pull/15143) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump ujson from 5.11.0 to 5.12.0. PR [#15150](https://github.com/fastapi/fastapi/pull/15150) by [@dependabot[bot]](https://github.com/apps/dependabot). @@ -70,7 +76,7 @@ hide: * ⬆ Bump actions/download-artifact from 7 to 8. PR [#15020](https://github.com/fastapi/fastapi/pull/15020) by [@dependabot[bot]](https://github.com/apps/dependabot). * ⬆ Bump actions/upload-artifact from 6 to 7. PR [#15019](https://github.com/fastapi/fastapi/pull/15019) by [@dependabot[bot]](https://github.com/apps/dependabot). -## 0.135.1 +## 0.135.1 (2026-03-01) ### Fixes @@ -87,14 +93,14 @@ hide: * πŸ‘₯ Update FastAPI People - Contributors and Translators. PR [#15029](https://github.com/fastapi/fastapi/pull/15029) by [@tiangolo](https://github.com/tiangolo). * πŸ‘₯ Update FastAPI GitHub topic repositories. PR [#15036](https://github.com/fastapi/fastapi/pull/15036) by [@tiangolo](https://github.com/tiangolo). -## 0.135.0 +## 0.135.0 (2026-03-01) ### Features * ✨ Add support for Server Sent Events. PR [#15030](https://github.com/fastapi/fastapi/pull/15030) by [@tiangolo](https://github.com/tiangolo). * New docs: [Server-Sent Events (SSE)](https://fastapi.tiangolo.com/tutorial/server-sent-events/). -## 0.134.0 +## 0.134.0 (2026-02-27) ### Features @@ -114,7 +120,7 @@ hide: * πŸ”¨ Run tests with `pytest-xdist` and `pytest-cov`. PR [#14992](https://github.com/fastapi/fastapi/pull/14992) by [@YuriiMotov](https://github.com/YuriiMotov). -## 0.133.1 +## 0.133.1 (2026-02-25) ### Features diff --git a/docs/en/mkdocs.yml b/docs/en/mkdocs.yml index 0db3e7a95b..4614194981 100644 --- a/docs/en/mkdocs.yml +++ b/docs/en/mkdocs.yml @@ -279,6 +279,7 @@ markdown_extensions: pymdownx.caret: null pymdownx.highlight: line_spans: __span + linenums_style: pymdownx-inline pymdownx.inlinehilite: null pymdownx.keys: null pymdownx.mark: null diff --git a/fastapi/__init__.py b/fastapi/__init__.py index 06dacbd9dc..5ab8b2c955 100644 --- a/fastapi/__init__.py +++ b/fastapi/__init__.py @@ -1,6 +1,6 @@ """FastAPI framework, high performance, easy to learn, fast to code, ready for production""" -__version__ = "0.135.1" +__version__ = "0.135.2" from starlette import status as status diff --git a/scripts/people.py b/scripts/people.py index 2e84fcc455..5718d65da9 100644 --- a/scripts/people.py +++ b/scripts/people.py @@ -7,12 +7,12 @@ from collections.abc import Container from datetime import datetime, timedelta, timezone from math import ceil from pathlib import Path -from typing import Any +from typing import Annotated, Any import httpx import yaml from github import Github -from pydantic import BaseModel, SecretStr +from pydantic import BaseModel, BeforeValidator, SecretStr from pydantic_settings import BaseSettings github_graphql_url = "https://api.github.com/graphql" @@ -21,6 +21,8 @@ questions_category_id = "DIC_kwDOCZduT84B6E2a" POINTS_PER_MINUTE_LIMIT = 84 # 5000 points per hour +MINIMIZED_COMMENTS_REASONS_TO_EXCLUDE = {"abuse", "off-topic", "duplicate", "spam"} + class RateLimiter: def __init__(self) -> None: @@ -102,8 +104,10 @@ query Q($after: String, $category_id: ID) { avatarUrl url } + minimizedReason } } + minimizedReason } } } @@ -118,6 +122,10 @@ query Q($after: String, $category_id: ID) { } """ +LowerStr = Annotated[ + str, BeforeValidator(lambda v: v.lower() if isinstance(v, str) else v) +] + class Author(BaseModel): login: str @@ -128,6 +136,7 @@ class Author(BaseModel): class CommentsNode(BaseModel): createdAt: datetime author: Author | None = None + minimizedReason: LowerStr | None = None class Replies(BaseModel): @@ -136,6 +145,7 @@ class Replies(BaseModel): class DiscussionsCommentsNode(CommentsNode): + minimizedReason: LowerStr | None = None replies: Replies @@ -278,7 +288,10 @@ def get_discussions_experts( discussion_author_name = discussion.author.login discussion_commentors: dict[str, datetime] = {} for comment in discussion.comments.nodes: - if comment.author: + if ( + comment.minimizedReason not in MINIMIZED_COMMENTS_REASONS_TO_EXCLUDE + and comment.author + ): authors[comment.author.login] = comment.author if comment.author.login != discussion_author_name: author_time = discussion_commentors.get( @@ -288,7 +301,10 @@ def get_discussions_experts( author_time, comment.createdAt ) for reply in comment.replies.nodes: - if reply.author: + if ( + reply.minimizedReason not in MINIMIZED_COMMENTS_REASONS_TO_EXCLUDE + and reply.author + ): authors[reply.author.login] = reply.author if reply.author.login != discussion_author_name: author_time = discussion_commentors.get(