Closed tungol closed 9 months ago
Hi!
The return type of botocore.auth.SigV4Auth.signature() should be str, not bytes:
https://github.com/youtype/botocore-stubs/blob/main/botocore-stubs/auth.pyi#L60
The return value is here: https://github.com/boto/botocore/blob/1bf422484a5abca0304d328b9ee2d91801acd2d6/botocore/auth.py#L414
which is calling the internal _sign function with hex=True:
hex=True
https://github.com/boto/botocore/blob/1bf422484a5abca0304d328b9ee2d91801acd2d6/botocore/auth.py#L224
So it's getting hmac.new().hexdigest(), and that's str: https://github.com/python/typeshed/blob/main/stdlib/hmac.pyi#L42
Thanks for all your work!
I just published botocore-stubs 1.33.6.post1 with the fix included.
botocore-stubs 1.33.6.post1
Hi!
The return type of botocore.auth.SigV4Auth.signature() should be str, not bytes:
https://github.com/youtype/botocore-stubs/blob/main/botocore-stubs/auth.pyi#L60
The return value is here: https://github.com/boto/botocore/blob/1bf422484a5abca0304d328b9ee2d91801acd2d6/botocore/auth.py#L414
which is calling the internal _sign function with
hex=True
:https://github.com/boto/botocore/blob/1bf422484a5abca0304d328b9ee2d91801acd2d6/botocore/auth.py#L224
So it's getting hmac.new().hexdigest(), and that's str: https://github.com/python/typeshed/blob/main/stdlib/hmac.pyi#L42
Thanks for all your work!