fastapi v0.61.0 Release Notes
Release Date: 2020-08-09 // over 3 years ago-
๐ Features
- โ Add support for injecting
HTTPConnection
(asRequest
andWebSocket
). Useful for sharing app state in dependencies. PR #1827 by @nsidnev. - ๐ Export
WebSocketDisconnect
and add example handling WebSocket disconnections to docs. PR #1822 by @rkbeatss.
๐ฅ Breaking Changes
- Require Pydantic >
1.0.0
.- Remove support for deprecated Pydantic
0.32.2
. This improves maintainability and allows new features. - In
FastAPI
andAPIRouter
: - Remove path operation decorators related/deprecated parameter
response_model_skip_defaults
(useresponse_model_exclude_unset
instead). - Change path operation decorators parameter default for
response_model_exclude
fromset()
toNone
(as is in Pydantic). - In
encoders.jsonable_encoder
: - Remove deprecated
skip_defaults
, use insteadexclude_unset
. - Set default of
exclude
fromset()
toNone
(as is in Pydantic). - PR #1862.
- Remove support for deprecated Pydantic
- ๐ In
encoders.jsonable_encoder
remove parametersqlalchemy_safe
.- It was an early hack to allow returning SQLAlchemy models, but it was never documented, and the recommended way is using Pydantic's
orm_mode
as described in the tutorial: SQL (Relational) Databases. - PR #1864.
- It was an early hack to allow returning SQLAlchemy models, but it was never documented, and the recommended way is using Pydantic's
๐ Docs
- โ Add link to the course by TestDriven.io: Test-Driven Development with FastAPI and Docker. PR #1860.
- ๐ Fix empty log message in docs example about handling errors. PR #1815 by @manlix.
- Reword text to reduce ambiguity while not being gender-specific. PR #1824 by @Mause.
Internal
- โ Add Flake8 linting. Original PR #1774 by @MashhadiNima.
- Disable Gitter bot, as it's currently broken, and Gitter's response doesn't show the problem. PR #1853.
- โ Add support for injecting