⬆ Upgrade Starlette from 0.17.1 to 0.18.0#4483
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4483 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 531 531
Lines 13627 13630 +3
=========================================
+ Hits 13627 13630 +3
Continue to review full report at Codecov.
|
|
📝 Docs preview for commit e5c9343 at: https://61f176cddc1930f5b39fe9cd--fastapi.netlify.app |
| if response is None: | ||
| response = Response() | ||
| del response.headers["content-length"] | ||
| response.status_code = None |
There was a problem hiding this comment.
@tomchristie FastAPI uses a Response object that travels through the dependencies, but that Response is not the response that will be returned at the end. There's a "cleanup" after the dependencies are solved. You can see the "cleanup" logic below:
I've selected the whole snippet, from the point we get the Response object used in the dependencies (solve_dependencies call) until the last 5 lines (on which the values from Response are passed to the actual response object that will be used.
This comment is JFYK, I don't expect any action to be taken on Starlette. Also, considering that FastAPI tweaks Starlette internally for some features it has.
|
📝 Docs preview for commit 8d10fca at: https://61f178c33b56fbf00cd761e2--fastapi.netlify.app |
| value, errors_ = field.validate(response_content, {}, loc=("response",)) | ||
| else: | ||
| value, errors_ = await run_in_threadpool( | ||
| value, errors_ = await run_in_threadpool( # type: ignore[misc] |
There was a problem hiding this comment.
We added ParamSpec to run_in_threadpool on Starlette. The error here was:
fastapi/routing.py:129: error: "<nothing>" object is not iterable [misc]
|
📝 Docs preview for commit fb2fdf5 at: https://61f17c4d603b5ade0e34ca0d--fastapi.netlify.app |
|
can this get merged soon and released please? |
|
Starlette 0.19.0 has now been released, not sure if it's worth performing a further upgrade here, or leaving that for another time. |
|
As per history, Sebastián prefers to bump progressively. Also, those two releases have a lot of changes. |
|
Hello ! |
Let's wait for @tiangolo :) |
|
📝 Docs preview for commit e7087f5 at: https://62743b753fbbb2094bed5235--fastapi.netlify.app |
|
📝 Docs preview for commit 25feb07 at: https://62744bdcedfeb0165d6951ed--fastapi.netlify.app |
|
Awesome @Kludex, thank you! 🙇 I added a filterwarning for pytest complaining about Cryptography so we can run tests while reaching the version that drops support for Python 3.6. This will be available in the next release in a couple of hours, FastAPI |
Co-authored-by: Sebastián Ramírez <[email protected]>
For reference, set of changes that broke FastAPI:
Content-Lengthheader forContent-Length: 0cases Kludex/starlette#1395Related to #4477