mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-27 08:10:57 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ca77f9a4d | ||
|
|
3c05189b06 | ||
|
|
a04acf6900 | ||
|
|
d566c6cbca |
@@ -3,6 +3,14 @@
|
||||
## Latest Changes
|
||||
|
||||
|
||||
## 0.91.0
|
||||
|
||||
### Upgrades
|
||||
|
||||
* ⬆️ Upgrade Starlette version to `0.24.0` and refactor internals for compatibility. PR [#5985](https://github.com/tiangolo/fastapi/pull/5985) by [@tiangolo](https://github.com/tiangolo).
|
||||
* This can solve nuanced errors when using middlewares. Before Starlette `0.24.0`, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware class expected to be created only once, with only one instance, that happened in some cases. This upgrade would solve those cases (thanks [@adriangb](https://github.com/adriangb)! Starlette PR [#2017](https://github.com/encode/starlette/pull/2017)). Now the middleware class instances are created once, right before the first request (the first time the app is called).
|
||||
* If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade.
|
||||
|
||||
## 0.90.1
|
||||
|
||||
### Upgrades
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""FastAPI framework, high performance, easy to learn, fast to code, ready for production"""
|
||||
|
||||
__version__ = "0.90.1"
|
||||
__version__ = "0.91.0"
|
||||
|
||||
from starlette import status as status
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ class FastAPI(Starlette):
|
||||
),
|
||||
**extra: Any,
|
||||
) -> None:
|
||||
self._debug: bool = debug
|
||||
self.debug = debug
|
||||
self.title = title
|
||||
self.description = description
|
||||
self.version = version
|
||||
@@ -144,7 +144,7 @@ class FastAPI(Starlette):
|
||||
self.user_middleware: List[Middleware] = (
|
||||
[] if middleware is None else list(middleware)
|
||||
)
|
||||
self.middleware_stack: ASGIApp = self.build_middleware_stack()
|
||||
self.middleware_stack: Union[ASGIApp, None] = None
|
||||
self.setup()
|
||||
|
||||
def build_middleware_stack(self) -> ASGIApp:
|
||||
|
||||
@@ -39,7 +39,7 @@ classifiers = [
|
||||
"Topic :: Internet :: WWW/HTTP",
|
||||
]
|
||||
dependencies = [
|
||||
"starlette>=0.22.0,<0.24.0",
|
||||
"starlette>=0.24.0,<0.25.0",
|
||||
"pydantic >=1.6.2,!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0",
|
||||
]
|
||||
dynamic = ["version"]
|
||||
|
||||
Reference in New Issue
Block a user