Commit Graph

6929 Commits

Author SHA1 Message Date
essentiaMarco 8b2028cb25 fix: normalize lifespan (async/sync gen) before wrapper so router_events tests pass
- In FastAPI.__init__, when lifespan is an async or sync generator function,
  convert to context manager (asynccontextmanager / _wrap_gen_lifespan_context)
  before _wrap_lifespan_with_dependency_cache so orig_cm has __aenter__/__aexit__.

Made-with: Cursor
2026-03-15 17:05:37 -07:00
essentiaMarco 53ebb9b46a fix: resolve merge with master — lifespan app vs router
- Default lifespan: use app.router for _DefaultLifespan (router has
  _startup/_shutdown; FastAPI app does not).
- Wrapper: when app is FastAPI, set fastapi_app from app and pass
  app.router to _run_lifespan_dependencies so lifespan deps are collected.
- Test: use only Request.receive() (Starlette Request has no .send).

Made-with: Cursor
2026-03-15 16:59:20 -07:00
essentiaMarco df44ff0d9e feat: lifespan dependency scope (applications, deps, params)
- Wire lifespan-scoped deps in applications.py via _wrap_lifespan_with_dependency_cache
- Extend Depends(..., scope=...) with 'lifespan' in params/models/utils
- Resolved with merge of origin/master

Made-with: Cursor
2026-03-15 16:57:47 -07:00
essentiaMarco 9c380fe3d9 Merge remote-tracking branch 'origin/master' 2026-03-15 16:57:21 -07:00
github-actions[bot] eb6851dd4b 📝 Update release notes
[skip ci]
2026-03-15 11:45:11 +00:00
Sofie Van Landeghem 98b269b51e
👷 Add `ty` to precommit (#15091)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
2026-03-15 12:44:39 +01:00
github-actions[bot] 7e7c4d09ac 📝 Update release notes
[skip ci]
2026-03-14 15:02:03 +00:00
dependabot[bot] b4b76c811b
⬆ Bump dorny/paths-filter from 3 to 4 (#15106)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3 to 4.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/v3...v4)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 16:01:34 +01:00
github-actions[bot] ae08a807a7 📝 Update release notes
[skip ci]
2026-03-14 15:01:19 +00:00
dependabot[bot] e4f19cd5c4
⬆ Bump cairosvg from 2.8.2 to 2.9.0 (#15108)
Bumps [cairosvg](https://github.com/Kozea/CairoSVG) from 2.8.2 to 2.9.0.
- [Release notes](https://github.com/Kozea/CairoSVG/releases)
- [Changelog](https://github.com/Kozea/CairoSVG/blob/main/NEWS.rst)
- [Commits](https://github.com/Kozea/CairoSVG/compare/2.8.2...2.9.0)

---
updated-dependencies:
- dependency-name: cairosvg
  dependency-version: 2.9.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 16:00:22 +01:00
github-actions[bot] 9d9d51e054 📝 Update release notes
[skip ci]
2026-03-14 15:00:03 +00:00
dependabot[bot] a007932885
⬆ Bump pyjwt from 2.11.0 to 2.12.0 (#15110)
Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.11.0 to 2.12.0.
- [Release notes](https://github.com/jpadilla/pyjwt/releases)
- [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/jpadilla/pyjwt/compare/2.11.0...2.12.0)

---
updated-dependencies:
- dependency-name: pyjwt
  dependency-version: 2.12.0
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 15:59:36 +01:00
essentiaMarco 9fb0fc8120 refactor(lifespan): align with reviewer feedback, add coverage tests
- Fix _collect_lifespan_dependants: handle route-level flat.computed_scope
  and iterate flat.dependencies (was incorrectly iterating flat)
- No pragmas on noop_receive/noop_send; covered by test that uses
  Request.receive/send in a lifespan dependency
- Add test_collect_lifespan_dependants_route_level_scope for route-level
  lifespan branch
- Add test_lifespan_dependency_synthetic_request_receive_send for
  noop_receive/noop_send coverage
- Add test_lifespan_dependency_nested for dependency_cache hit (utils)
- Add test_lifespan_dependency_cannot_depend_on_request_scope and
  test_lifespan_dependency_not_initialized_raises for edge cases

Made-with: Cursor
2026-03-13 23:39:27 -07:00
github-actions[bot] 04b279fe77 📝 Update release notes
[skip ci]
2026-03-12 21:15:19 +00:00
dependabot[bot] 4b826022b1
⬆ Bump black from 26.1.0 to 26.3.1 (#15100)
Bumps [black](https://github.com/psf/black) from 26.1.0 to 26.3.1.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/26.1.0...26.3.1)

---
updated-dependencies:
- dependency-name: black
  dependency-version: 26.3.1
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-12 21:14:44 +00:00
github-actions[bot] 11614be902 📝 Update release notes
[skip ci]
2026-03-07 09:29:24 +00:00
Sebastián Ramírez edaf23943c
📝 Add docs for `pyproject.toml` with `entrypoint` (#15075) 2026-03-07 10:29:03 +01:00
github-actions[bot] 627c10a293 📝 Update release notes
[skip ci]
2026-03-05 18:14:11 +00:00
Sebastián Ramírez 5b485f0848
📝 Update links in docs to no longer use the classes external-link and internal-link (#15061) 2026-03-05 19:13:19 +01:00
github-actions[bot] b618ba2792 📝 Update release notes
[skip ci]
2026-03-05 18:08:06 +00:00
Sebastián Ramírez f552fd3254
🔨 Add JS and CSS handling for automatic `target=_blank` for links in docs (#15063) 2026-03-05 18:59:48 +01:00
github-actions[bot] d23918588e 📝 Update release notes
[skip ci]
2026-03-05 17:58:48 +00:00
Sebastián Ramírez 0c0be9429f
🔨 Update script to autofix permalinks to account for headers with Markdown links (#15062) 2026-03-05 17:46:10 +00:00
github-actions[bot] b27fe99c2f 📝 Update release notes
[skip ci]
2026-03-05 11:54:36 +00:00
Sebastián Ramírez 8d6fdc80e8
💄 Update styles for internal and external links in new tab (#15058) 2026-03-05 11:54:05 +00:00
github-actions[bot] 4d6a5470bc 📝 Update release notes
[skip ci]
2026-03-05 11:27:42 +00:00
Savannah Ostrowski 196cafa07a
📝 Add documentation for the FastAPI VS Code extension (#15008)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2026-03-05 12:27:12 +01:00
github-actions[bot] e26eb871f8 📝 Update release notes
[skip ci]
2026-03-05 10:35:51 +00:00
Sebastián Ramírez 9d475aae74
📌 Pin Click for MkDocs live reload (#15057) 2026-03-05 10:35:17 +00:00
github-actions[bot] 365fad3c7b 📝 Update release notes
[skip ci]
2026-03-04 12:53:13 +00:00
Motov Yurii 8b0090c39b
📝 Fix doctrings for `max_digits` and `decimal_places` (#14944)
Fix doctrings for `max_digits` and `decimal_places`
2026-03-04 13:52:48 +01:00
github-actions[bot] 2bb280667d 📝 Update release notes
[skip ci]
2026-03-04 10:57:54 +00:00
Motov Yurii 9cfd5d685a
📝 Add dates to release notes (#15001)
Add dates to release notes
2026-03-04 11:57:30 +01:00
github-actions[bot] 7a03018d6a 📝 Update release notes
[skip ci]
2026-03-03 12:40:40 +00:00
dependabot[bot] 3234e25368
⬆ Bump werkzeug from 3.1.5 to 3.1.6 (#14948)
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-version: 3.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 13:40:06 +01:00
github-actions[bot] b54aa52294 📝 Update release notes
[skip ci]
2026-03-03 00:15:45 +00:00
github-actions[bot] 0bc4d1be96 📝 Update release notes
[skip ci]
2026-03-03 00:15:28 +00:00
dependabot[bot] 800a1dbf5c
⬆ Bump pydantic-ai from 1.62.0 to 1.63.0 (#15035)
Bumps [pydantic-ai](https://github.com/pydantic/pydantic-ai) from 1.62.0 to 1.63.0.
- [Release notes](https://github.com/pydantic/pydantic-ai/releases)
- [Changelog](https://github.com/pydantic/pydantic-ai/blob/main/docs/changelog.md)
- [Commits](https://github.com/pydantic/pydantic-ai/compare/v1.62.0...v1.63.0)

---
updated-dependencies:
- dependency-name: pydantic-ai
  dependency-version: 1.63.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:15:05 +01:00
dependabot[bot] cac584c85d
⬆ Bump pytest-codspeed from 4.2.0 to 4.3.0 (#15034)
Bumps [pytest-codspeed](https://github.com/CodSpeedHQ/pytest-codspeed) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/CodSpeedHQ/pytest-codspeed/releases)
- [Changelog](https://github.com/CodSpeedHQ/pytest-codspeed/blob/master/CHANGELOG.md)
- [Commits](https://github.com/CodSpeedHQ/pytest-codspeed/compare/v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: pytest-codspeed
  dependency-version: 4.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:14:10 +01:00
github-actions[bot] 8469e19125 📝 Update release notes
[skip ci]
2026-03-03 00:14:05 +00:00
github-actions[bot] 107808931e 📝 Update release notes
[skip ci]
2026-03-03 00:13:32 +00:00
dependabot[bot] e1b271f566
⬆ Bump strawberry-graphql from 0.291.2 to 0.307.1 (#15033)
Bumps [strawberry-graphql](https://github.com/strawberry-graphql/strawberry) from 0.291.2 to 0.307.1.
- [Release notes](https://github.com/strawberry-graphql/strawberry/releases)
- [Changelog](https://github.com/strawberry-graphql/strawberry/blob/main/CHANGELOG.md)
- [Commits](https://github.com/strawberry-graphql/strawberry/compare/0.291.2...0.307.1)

---
updated-dependencies:
- dependency-name: strawberry-graphql
  dependency-version: 0.307.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:13:14 +01:00
github-actions[bot] d0ac80bccc 📝 Update release notes
[skip ci]
2026-03-03 00:13:05 +00:00
dependabot[bot] ce0a705066
⬆ Bump typer from 0.21.1 to 0.24.1 (#15032)
Bumps [typer](https://github.com/fastapi/typer) from 0.21.1 to 0.24.1.
- [Release notes](https://github.com/fastapi/typer/releases)
- [Changelog](https://github.com/fastapi/typer/blob/master/docs/release-notes.md)
- [Commits](https://github.com/fastapi/typer/compare/0.21.1...0.24.1)

---
updated-dependencies:
- dependency-name: typer
  dependency-version: 0.24.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:12:33 +01:00
github-actions[bot] a3e3903cfa 📝 Update release notes
[skip ci]
2026-03-03 00:12:12 +00:00
dependabot[bot] 80c5fb6b1c
⬆ Bump actions/download-artifact from 7 to 8 (#15020)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:12:02 +01:00
dependabot[bot] 2f098a3121
⬆ Bump actions/upload-artifact from 6 to 7 (#15019)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 01:11:44 +01:00
Sebastián Ramírez ca5f60ee72 🔖 Release version 0.135.1 2026-03-01 19:17:26 +01:00
github-actions[bot] 87f75aa62c 📝 Update release notes
[skip ci]
2026-03-01 18:16:24 +00:00
Sebastián Ramírez 8a9258b169
🐛 Fix, avoid yield from a TaskGroup, only as an async context manager, closed in the request async exit stack (#15038) 2026-03-01 19:16:03 +01:00