Skip to content
Myr

models.RequestEncodingMixin._encode_files now takes bytearray as fp in addition to the currently supported bytes and str input.

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

authored by Rasmus Scholer (TimelineX) · committed by Rasmus Scholer (TimelineX) · parent 461b740 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/models.py+1 added-1 removed
143 unmodified lines
144 fn = guess_filename(v) or k145 fp = v146 if isinstance(fp, str):147 fp = StringIO(fp)148 if isinstance(fp, bytes):148 if isinstance(fp, (bytes, bytearray)):149 fp = BytesIO(fp)150151 rf = RequestField(name=k, data=fp.read(),152 filename=fn, headers=fh)
687 unmodified lines