Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.13.8 #1026

Merged
merged 4 commits into from Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/release-notes.md
@@ -1,3 +1,12 @@
## 0.13.8

* Revert `Queue(maxsize=1)` fix for `BaseHTTPMiddleware` middleware classes and streaming responses.
* Before version `0.13.7`, [some users](https://github.com/encode/starlette/issues/1022) were relying on behavior where the response object would be fully evaluated within their middleware based on `BaseHTTPMiddleware`. (Of course, this was a problem for `StreamingResponse`s with this middleware, because they were also being loaded fully into memory.) The `maxsize=1` fix released in version `0.13.7` explicitly prevented the response object from being fully evaluated until later `await` calls, but any users who were dropping this response for any other created inside their middleware were likely to see pending tasks accumulate.
erewok marked this conversation as resolved.
Show resolved Hide resolved

* Moving forward, using `BaseHTTPMiddleware` middleware classes with streaming responses is **not recommended** See issues [#1022](https://github.com/encode/starlette/issues/1022), [#1012](https://github.com/encode/starlette/issues/1012), and [#919](https://github.com/encode/starlette/issues/919). Further, this middleware class will likely need to be redesigned and for now it is recommended that instead of subclassing `BaseHTTPMiddleware`, users consider writing middleware classes similar to [other examples](https://github.com/encode/starlette/blob/master/starlette/middleware/authentication.py#L14) in the codebase.
erewok marked this conversation as resolved.
Show resolved Hide resolved

* The `StaticFiles` constructor now allows `pathlib.Path` in addition to strings for its `directory` argument.

## 0.13.7

* Fix high memory usage when using `BaseHTTPMiddleware` middleware classes and streaming responses.
Expand Down
2 changes: 1 addition & 1 deletion starlette/__init__.py
@@ -1 +1 @@
__version__ = "0.13.7"
__version__ = "0.13.8"