email: improve bytes handling (#9032)

This commit is contained in:
Jelle Zijlstra
2022-11-01 02:13:30 -07:00
committed by GitHub
parent 3e46f9a9ee
commit 7ab933f3c3
10 changed files with 26 additions and 19 deletions

View File

@@ -16,6 +16,6 @@ class HeaderParser(Parser): ...
class BytesParser:
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
def parsebytes(self, text: bytes | bytearray, headersonly: bool = ...) -> Message: ...
class BytesHeaderParser(BytesParser): ...