hmac.HMAC: digestmod defaults to None on py37 (#9790)

This commit is contained in:
Alex Waygood
2023-02-21 18:24:34 +00:00
committed by GitHub
parent 3f6f54e9d9
commit fea57ad095
2 changed files with 7 additions and 2 deletions

View File

@@ -30,7 +30,13 @@ class HMAC:
block_size: int
@property
def name(self) -> str: ...
def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ...
if sys.version_info >= (3, 8):
def __init__(self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod = "") -> None: ...
else:
def __init__(
self, key: bytes | bytearray, msg: ReadableBuffer | None = None, digestmod: _DigestMod | None = None
) -> None: ...
def update(self, msg: ReadableBuffer) -> None: ...
def digest(self) -> bytes: ...
def hexdigest(self) -> str: ...

View File

@@ -32,7 +32,6 @@ dummy_threading.Condition.release
dummy_threading.Event.isSet
dummy_threading.local.__new__
fractions.Fraction.__new__ # overload is too complicated for stubtest to resolve
hmac.HMAC.__init__
inspect.Signature.from_builtin # Removed in 3.11, can add if someone needs this
inspect.Signature.from_function # Removed in 3.11, can add if someone needs this
ipaddress._BaseNetwork.__init__