#34556: StreamingHttpResponse documentation inaccuracy
----------------------------------+--------------------------------------
Reporter: Alexandre Spaeth | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Comment (by Alexandre Spaeth):
Hello Natalia, I guess I wasn’t clear enough :-)
The `streaming_content` passed to the class constructor is an
`Iterable[bytes]` (or an `AsyncIterable[bytes]`), but according to
https://github.com/django/django/blob/6e32d1fa1dafd0c9cd9f93997ecebb26cd9a1b62/tests/httpwrappers/tests.py#L672,
it can also be an `Iterable[str]` or even `Iterable[object]` in the case
of a `memoryview` (and their respective async ones).
The documentation, as written now, assumes that only `Iterable[bytes]` are
acceptable, which is not the case.
I totally agree about the fact that the `streaming_content` is an iterable
of bytes though and wouldn’t touch this.
--
Ticket URL: <https://code.djangoproject.com/ticket/34556#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018806acadf4-6da2ead7-0215-415d-a43f-da6ef750968a-000000%40eu-central-1.amazonses.com.