You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Varun Chawla
803cff2f2f
Fix issue #11215 : Merge background tasks from dependency injection with Response.background
When a user returns a Response with a background parameter and also uses
injected BackgroundTasks, the injected tasks were being silently discarded.
This fix merges both sets of background tasks so all tasks are executed.
Changes:
- Modified fastapi/routing.py to merge BackgroundTasks when both exist
- Added comprehensive tests in test_background_tasks_merge.py
- Handles both BackgroundTask and BackgroundTasks types
- Maintains backward compatibility
Fixes #11215
5 months ago
..
_compat
♻️ Refactor and simplify Pydantic v2 (and v1) compatibility internal utils (#14862)
5 months ago
dependencies
♻️ Refactor and simplify Pydantic v2 (and v1) compatibility internal utils (#14862)
5 months ago
middleware
📝 Use `WSGIMiddleware` from `a2wsgi` instead of deprecated `fastapi.middleware.wsgi.WSGIMiddleware` (#14756)
5 months ago
openapi
♻️ Refactor and simplify Pydantic v2 (and v1) compatibility internal utils (#14862)
5 months ago
security
🐛 Strip whitespaces from `Authorization` header credentials (#14786)
5 months ago
__init__.py
🔖 Release version 0.128.4
5 months ago
__main__.py
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
2 years ago
applications.py
📝 Add links to related sections of docs to docstrings (#14776)
5 months ago
background.py
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564)
7 months ago
cli.py
♻️ Add support for `pip install "fastapi[standard]"` with standard dependencies and `python -m fastapi` (#11935)
2 years ago
concurrency.py
♻️ Upgrade internal syntax to Python 3.9+ 🎉 (#14564)
7 months ago
datastructures.py
➖ Drop support for `pydantic.v1` (#14609)
7 months ago
encoders.py
🎨 Tweak types for mypy (#14816)
5 months ago
exception_handlers.py
⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0 (#14077)
10 months ago
exceptions.py
📝 Add links to related sections of docs to docstrings (#14776)
5 months ago
logger.py
🔊 Refactor logging (#781)
7 years ago
param_functions.py
📝 Add links to related sections of docs to docstrings (#14776)
5 months ago
params.py
➖ Drop support for `pydantic.v1` (#14609)
7 months ago
py.typed
✨ add py.typed to ship typing information (#209)
7 years ago
requests.py
⬆ Require Pydantic > 1.0 (#1862)
6 years ago
responses.py
✨ Add reference (code API) docs with PEP 727, add subclass with custom docstrings for `BackgroundTasks`, refactor docs structure (#10392)
3 years ago
routing.py
Fix issue #11215: Merge background tasks from dependency injection with Response.background
5 months ago
staticfiles.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
templating.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
testclient.py
✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)
6 years ago
types.py
🏷️ Re-export `IncEx` type from Pydantic instead of duplicating it (#14641)
5 months ago
utils.py
♻️ Refactor internals, simplify Pydantic v2/v1 utils, `create_model_field`, better types for `lenient_issubclass` (#14860)
5 months ago
websockets.py
✨ Export `WebSocketState` in `fastapi.websockets` (#4376)
4 years ago