Skip to content
Myr

Clarify decode_unicode behaviour in iter_{content,lines} docstrings (#7365)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Chris Riches · committed by GitHub · parent a044b02 · Browse files · 1 file+7 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−2 removed

  • other:+7 added−2 removed

1 file+7 added−2 removed

modified:src/requests/models.py+7 added-2 removed
809 unmodified lines
810 stream=True will read data as it arrives in whatever size the811 chunks are received. If stream=False, data is returned as812 a single chunk.813814 If decode_unicode is True, content will be decoded using the best815 available encoding based on the response.814 If decode_unicode is True, content will be decoded using encoding815 information from the response. If no encoding information is available,816 bytes will be returned. This can be bypassed by manually setting817 `encoding` on the response.818 """819820 def generate():821 # Special case for urllib3.
42 unmodified lines
864 """Iterates over the response data, one line at a time. When865 stream=True is set on the request, this avoids reading the866 content at once into memory for large responses.867868 The decode_unicode param works the same as in `iter_content`, with the869 same caveats.870871 .. note:: This method is not reentrant safe.872 """873874 pending = None
172 unmodified lines