Skip to content
Myr

Drop unneccessary `binascii` import (#2909)

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

* Drop unneccessary binascii import * Update httpx/_multipart.py Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com> * boundary is 'bytes' not 'str' ---------

authored by Tom Christie · committed by GitHub · parent 31a7bb3 · Browse files · 1 file+1 added−2 removed
This commit

State

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

Trailers

  • Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:httpx/_multipart.py+1 added-2 removed
1import binascii1import io2import os3import typing4from pathlib import Path
193 unmodified lines
198 files: RequestFiles,199 boundary: typing.Optional[bytes] = None,200 ) -> None:201 if boundary is None:203 boundary = binascii.hexlify(os.urandom(16))202 boundary = os.urandom(16).hex().encode("ascii")203204 self.boundary = boundary205 self.content_type = "multipart/form-data; boundary=%s" % boundary.decode(206 "ascii"
60 unmodified lines