Commit Graph

478 Commits

Author SHA1 Message Date
cyberlis e94c13ce74
Add allow disabling `redirect_slashes` at the FastAPI app level (#3432)
Co-authored-by: Denis Lisovik <ckyberlis@gmail.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-22 10:37:50 +00:00
Sebastián Ramírez 32935103b1 🔖 Release version 0.97.0 2023-06-12 00:50:06 +02:00
Sebastián Ramírez 7167c77a18
⬆️ Upgrade and fully migrate to Ruff, remove isort, includes a couple of tweaks suggested by the new version of Ruff (#9660) 2023-06-12 00:37:34 +02:00
Sebastián Ramírez 4ac55af283
♻️ Update internal type annotations and upgrade mypy (#9658) 2023-06-11 22:16:01 +00:00
Sebastián Ramírez 17e49bc9f7
♻️ Simplify `AsyncExitStackMiddleware` as without Python 3.6 `AsyncExitStack` is always available (#9657)
♻️ Simplify AsyncExitStackMiddleware as without Python 3.6 AsyncExitStack is always available
2023-06-11 21:49:18 +00:00
Paulo Costa d8b8f211e8
Add support for `dependencies` in WebSocket routes (#4534)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-11 20:35:39 +00:00
Kristján Valur Jónsson ab03f22635
Add exception handler for `WebSocketRequestValidationError` (which also allows to override it) (#6030)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-11 21:08:14 +02:00
Sebastián Ramírez 19347bfc3c 🔖 Release version 0.96.1 2023-06-10 23:51:40 +02:00
Sebastián Ramírez 6dd8e567cc
🐛 Fix `HTTPException` header type annotations (#9648) 2023-06-10 19:23:12 +02:00
Marcelo Trylesinski 52fd0afc94
♻ Remove `media_type` from `ORJSONResponse` as it's inherited from the parent class (#5805)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-10 19:04:29 +02:00
Timothée Mazzucotelli 010d44ee1b
♻ Instantiate `HTTPException` only when needed, optimization refactor (#5356)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-06-10 14:05:35 +02:00
Sebastián Ramírez 2d35651a5a
🐛 Fix OpenAPI model fields int validations, change `gte` to `ge` (#9635)
🐛 Fix OpenAPI model fields int validations, change `gte` to `ge`
2023-06-07 22:44:12 +02:00
Sebastián Ramírez 1574c96231 🔖 Release version 0.96.0 2023-06-03 16:29:23 +02:00
Zanie Adkins 27618aa2e8
Update `create_cloned_field` to use a global cache and improve startup performance (#4645)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Huon Wilson <wilson.huon@gmail.com>
2023-06-03 13:37:41 +00:00
Sebastián Ramírez 8cc967a760 🔖 Release version 0.95.2 2023-05-16 15:39:43 +02:00
Sebastián Ramírez c81e136d75 🔖 Release version 0.95.1 2023-04-13 12:04:52 -07:00
Sharon Yogev fdf66c825e
🐛 Fix using `Annotated` in routers or path operations decorated multiple times (#9315)
* Fix: copy FieldInfo from Annotated arguments

We need to copy the field_info to prevent ourselves from
mutating it.  This allows multiple path or nested routers ,etc.

* 📝 Add comment in fastapi/dependencies/utils.py

Co-authored-by: Nadav Zingerman <7372858+nzig@users.noreply.github.com>

*  Extend and tweak tests for Annotated

*  Tweak coverage, it's probably covered by a different version of Python

---------

Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
Co-authored-by: Nadav Zingerman <7372858+nzig@users.noreply.github.com>
2023-04-13 10:49:22 -07:00
Sebastián Ramírez d666ccb622 🔖 Release version 0.95.0 2023-03-18 20:37:42 +01:00
Nadav Zingerman 375513f114
Add support for PEP-593 `Annotated` for specifying dependencies and parameters (#4871)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-03-17 21:35:45 +01:00
Sebastián Ramírez ef176c6631 🔖 Release version 0.94.1 2023-03-14 03:27:11 +01:00
Sebastián Ramírez 25aabe05ce
🎨 Fix types for lifespan, upgrade Starlette to 0.26.1 (#9245) 2023-03-14 03:19:04 +01:00
Sebastián Ramírez 392ffaae43 🔖 Release version 0.94.0 2023-03-10 20:00:49 +01:00
pre-commit-ci[bot] f04b61bd16
⬆ [pre-commit.ci] pre-commit autoupdate (#5709)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-03-10 19:49:18 +01:00
Sebastián Ramírez 8a4cfa52af
⬆️ Upgrade Starlette version, support new `lifespan` with state (#9239) 2023-03-10 19:24:04 +01:00
Sebastián Ramírez 25382d2d19 🔖 Release version 0.93.0 2023-03-07 17:06:47 +01:00
Jordan Speicher cc9a73c3f8
Add support for `lifespan` async context managers (superseding `startup` and `shutdown` events) (#2944)
Co-authored-by: Mike Shantz <mshantz@coldstorage.com>
Co-authored-by: Jonathan Plasse <13716151+JonathanPlasse@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-03-07 16:46:00 +01:00
Sebastián Ramírez 6879082b36 🔖 Release version 0.92.0 2023-02-14 10:17:53 +01:00
Sebastián Ramírez 2ca77f9a4d 🔖 Release version 0.91.0 2023-02-10 15:33:25 +01:00
Sebastián Ramírez d566c6cbca
⬆️ Upgrade Starlette version to `0.24.0` and refactor internals for compatibility (#5985) 2023-02-10 15:13:04 +01:00
Sebastián Ramírez 6e94ec2bf0 🔖 Release version 0.90.1 2023-02-09 20:41:40 +01:00
Sebastián Ramírez 148bcf5ce4 🔖 Release version 0.90.0 2023-02-08 11:30:01 +01:00
Marcelo Trylesinski 9293795e99
⬆️ Bump Starlette from 0.22.0 to 0.23.0 (#5739)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-02-08 11:23:07 +01:00
Sebastián Ramírez 5905c3f740 🔖 Release version 0.89.1 2023-01-10 20:31:23 +04:00
Sebastián Ramírez fb8e9083f4
📝 Update docs and examples for Response Model with Return Type Annotations, and update runtime error (#5873) 2023-01-10 16:22:47 +00:00
Marcelo Trylesinski fba7493042
🐛 Ignore Response classes on return annotation (#5855)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-10 12:45:18 +00:00
Sebastián Ramírez 69bd7d8501 🔖 Release version 0.89.0 2023-01-07 21:17:10 +04:00
Yurii Karabas d0573f5713
Add support for function return type annotations to declare the `response_model` (#1436)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2023-01-07 17:45:48 +04:00
Sebastián Ramírez 612b8ff168 🔖 Release version 0.88.0 2022-11-27 15:50:32 +01:00
Sebastián Ramírez 7c5626bef7
⬆️ Upgrade Ruff (#5698) 2022-11-27 14:59:32 +01:00
Sebastián Ramírez 63a5ffcf57 🔖 Release version 0.87.0 2022-11-13 22:36:53 +01:00
Sebastián Ramírez fa74093440
Use Ruff for linting (#5630) 2022-11-13 19:19:04 +01:00
Sebastián Ramírez d537ee93d7
Re-export Starlette's `WebSocketException` and add it to docs (#5629) 2022-11-13 17:10:54 +01:00
Paweł Rubin fdbd48be5f
⬆ Upgrade Starlette to `0.21.0`, including the new [`TestClient` based on HTTPX](https://github.com/encode/starlette/releases/tag/0.21.0) (#5471)
Co-authored-by: Paweł Rubin <pawel.rubin@ocado.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-11-13 15:26:09 +01:00
Sebastián Ramírez ccd242348f 🔖 Release version 0.86.0 2022-11-03 22:17:44 +01:00
Adrian Garcia Badaracco ac9f56ea5e
🐛 Close FormData (uploaded files) after the request is done (#5465)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-11-03 13:06:52 +01:00
Sebastián Ramírez d0917ce015 🔖 Release version 0.85.2 2022-10-31 19:57:16 +01:00
Sebastián Ramírez 90fc4299d1 🔖 Release version 0.85.1 2022-10-14 22:52:36 +02:00
Jarro van Ginkel 0ae8db447a
🐛 Fix support for strings in OpenAPI status codes: `default`, `1XX`, `2XX`, `3XX`, `4XX`, `5XX` (#5187)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
2022-10-14 22:44:22 +02:00
Sebastián Ramírez 1213227667 🔖 Release version 0.85.0 2022-09-15 15:57:23 +02:00
Sebastián Ramírez 74ce2204ae
⬆️ Upgrade mypy and tweak internal type annotations (#5398) 2022-09-15 13:26:21 +00:00