Commit Graph

6450 Commits

Author SHA1 Message Date
pre-commit-ci-lite[bot] b8ab033080
🎨 Auto format 2025-12-25 15:41:17 +00:00
lif f7e2c39524 test: add comprehensive tests for _try_resolve_annotated_string
Add unit tests for:
- Invalid annotation formats (missing prefix/suffix)
- Non-Depends metadata (Query, etc.)
- Eval failures for undefined functions
- Nested brackets in type annotations
- ForwardRef type resolution failures
- Exception handling with partial resolution fallback
- Resolved Annotated types
- get_typed_signature edge cases

These tests improve coverage for the forward reference handling code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 23:40:35 +08:00
lif 70bd7a592e Exclude manual test runner from coverage 2025-12-21 17:48:45 +08:00
lif 831fd18892 fix: resolve ruff lint errors (Dict -> dict, remove outdated version block) 2025-12-18 22:13:08 +08:00
lif b175737867
Merge branch 'master' into fix/annotated-forward-ref-13056 2025-12-18 21:25:44 +08:00
github-actions[bot] f58d846015 📝 Update release notes
[skip ci]
2025-12-18 13:24:47 +00:00
Sebastián Ramírez caee1d3123
👷 Add performance tests with CodSpeed (#14558)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-18 14:24:09 +01:00
pre-commit-ci-lite[bot] dc6c5b8917
🎨 Auto format 2025-12-18 13:22:49 +00:00
lif c171f468d8 Fix CI failures: Python 3.8 compatibility and Pydantic v1 tests
- Fix Python 3.8 compatibility by importing Annotated from typing_extensions
  when running on Python < 3.9
- Simplify get_typed_signature to not use get_type_hints which was causing
  issues with Pydantic v1 parameter detection (Header, Cookie, Query, etc.)
- Instead, expand globalns with module namespace to help resolve forward
  references while keeping the original annotation resolution logic intact

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 21:21:13 +08:00
Sebastián Ramírez c75f17d483 🔖 Release version 0.125.0 2025-12-17 22:37:19 +01:00
Sebastián Ramírez 241ca9a533 📝 Update release notes 2025-12-17 22:35:20 +01:00
github-actions[bot] 3f75f51255 📝 Update release notes
[skip ci]
2025-12-17 21:26:22 +00:00
Sebastián Ramírez 1c4fc96c91
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564) 2025-12-17 21:25:59 +00:00
github-actions[bot] 7f9709d75e 📝 Update release notes
[skip ci]
2025-12-17 20:47:44 +00:00
Sebastián Ramírez 84668c2acc
🔧 Drop support for Python 3.8 (#14563) 2025-12-17 20:47:16 +00:00
github-actions[bot] e0fd79139e 📝 Update release notes
[skip ci]
2025-12-17 20:42:17 +00:00
Sebastián Ramírez ed97d9dc0c
⚰️ Remove Python 3.8 from CI and remove Python 3.8 examples from source docs (#14559)
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2025-12-17 21:41:43 +01:00
github-actions[bot] 99ef383398 📝 Update release notes
[skip ci]
2025-12-17 19:59:35 +00:00
Sebastián Ramírez 56a549b4d5
🌐 Update translations for pt (add-missing) (#14539)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-17 20:59:04 +01:00
lifcc 80370ab52f Fix: Only use Annotated[Any, ...] fallback for Depends
- Remove unused type: ignore comments that caused mypy lint failure
- Only apply the partial Annotated resolution for Depends metadata
- For other metadata types (File, Form, Query, etc.), return None to
  preserve the original type detection logic
- This fixes the test failures where File/UploadFile params were being
  incorrectly identified as query parameters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 00:53:35 +08:00
pre-commit-ci-lite[bot] a975a1704e
🎨 Auto format 2025-12-17 16:28:11 +00:00
lif 9e7ca4d454 Fix Annotated with ForwardRef when using future annotations
When using `from __future__ import annotations` with `Annotated[SomeClass, Depends()]`
where SomeClass is defined after the function, FastAPI was unable to properly
resolve the forward reference and treated the parameter as a query parameter
instead of a dependency.

This fix adds special handling to partially resolve Annotated string annotations,
extracting metadata (like Depends) even when the inner type cannot be fully resolved.

Fixes #13056
2025-12-18 00:27:08 +08:00
github-actions[bot] 330f0ba571 📝 Update release notes
[skip ci]
2025-12-17 14:39:37 +00:00
Motov Yurii 06273e48c8
⬆ Bump `markdown-include-variants` from 0.0.7 to 0.0.8 (#14556) 2025-12-17 15:39:10 +01:00
github-actions[bot] a2997a8f7d 📝 Update release notes
[skip ci]
2025-12-17 10:45:18 +00:00
Motov Yurii ed5c5bef5e
🔧 Temporarily disable translations still in progress, being migrated to the new LLM setup (#14555)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-17 11:44:55 +01:00
github-actions[bot] 493ff37fc0 📝 Update release notes
[skip ci]
2025-12-17 10:42:14 +00:00
Sebastián Ramírez 1a1c29e57d
🔧 Add LLM prompt file for French, generated from the existing French docs (#14544) 2025-12-17 11:41:43 +01:00
github-actions[bot] e32eed7599 📝 Update release notes
[skip ci]
2025-12-17 10:17:30 +00:00
Motov Yurii 6400e5ee29
🌐 Sync Portuguese docs (pages found with script) (#14554) 2025-12-17 11:17:03 +01:00
github-actions[bot] d68892ab02 📝 Update release notes
[skip ci]
2025-12-17 10:15:27 +00:00
Motov Yurii 6a8a2d62c4
🌐 Sync Spanish docs (outdated pages found with script) (#14553)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2025-12-17 11:15:01 +01:00
github-actions[bot] e675b25c60 📝 Update release notes
[skip ci]
2025-12-17 07:17:24 +00:00
Nils-Hero Lindemann 353b8b29fa
🌐 Sync German docs (#14519)
Sync with #14505 (plus some more)

I actually searched for those patterns in VS Code.

Always:
    files to exclude: README.md, SECURITY.md, llm-prompt.md

This search & replace cleans up the hash parts everywhere under docs/.
It only finds the four occurences in the two _llm-test.md under docs/de/ and docs/pt/

    files to include: docs/**
        Search regex: \{[^\S\n]*#([^\S\n]*[a-z0-9]+(?:-[a-z0-9]+)*)[^\S\n]*\}
        Replace with: { #$1 }

This search finds headings without hash parts. It finds two headings in docs\de\docs\index.md (those which #14505 fixes) and all headings in docs\pt\docs\tutorial\security\index.md, which I also fixed on the way as that document seems to be in sync. docs\pt\docs\index.md is not in Sync, so I didnt touch it.

    files to include: docs/de/**, docs/pt/**
        Search regex: ^(#+)[^\S\n]*([^{}#\s]+(?:[^\S\n]+[^{}\s]+)*)[^\S\n]*(?=\n)
        (added the missing hash parts)
2025-12-17 08:17:04 +01:00
github-actions[bot] 272204c0c7 📝 Update release notes
[skip ci]
2025-12-16 21:05:45 +00:00
Sebastián Ramírez 818ce0fa2f
🔥 Remove inactive/scarce translations to Vietnamese (#14543) 2025-12-16 21:05:18 +00:00
github-actions[bot] ed20bf6bf3 📝 Update release notes
[skip ci]
2025-12-16 20:59:17 +00:00
Sebastián Ramírez 58bc4a15ac
🔥 Remove inactive/scarce translations to Persian (#14542) 2025-12-16 20:58:53 +00:00
github-actions[bot] 9be5063396 📝 Update release notes
[skip ci]
2025-12-16 20:44:35 +00:00
Sebastián Ramírez 4a6a87674a
🔥 Remove translation to emoji to simplify the new setup with LLM autotranslations (#14541) 2025-12-16 21:44:10 +01:00
github-actions[bot] 01bb87275b 📝 Update release notes
[skip ci]
2025-12-16 20:33:42 +00:00
Sebastián Ramírez 9a03503542
🌐 Update translations for pt (update-outdated) (#14537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-16 21:32:40 +01:00
github-actions[bot] e5d0e78bd4 📝 Update release notes
[skip ci]
2025-12-16 20:32:33 +00:00
Sebastián Ramírez c4fb93f9c2
🔧 Update test workflow config, remove commented code (#14540) 2025-12-16 20:32:09 +00:00
github-actions[bot] 98bee09a6a 📝 Update release notes
[skip ci]
2025-12-16 17:52:40 +00:00
Sebastián Ramírez c68dc2d419
👷 Configure coverage, error on main tests, don't wait for Smokeshow (#14536) 2025-12-16 17:52:17 +00:00
github-actions[bot] ec287a329b 📝 Update release notes
[skip ci]
2025-12-16 17:37:09 +00:00
Sebastián Ramírez c0e4b9cd67
👷 Run Smokeshow always, even on test failures (#14538) 2025-12-16 17:36:42 +00:00
github-actions[bot] c98485514c 📝 Update release notes
[skip ci]
2025-12-16 17:00:34 +00:00
Sebastián Ramírez 6281f8721a
👷 Make Pydantic versions customizable in CI (#14535) 2025-12-16 18:00:12 +01:00