diff --git a/stdlib/2and3/base64.pyi b/stdlib/2and3/base64.pyi index 2385f4071..d61cb3acd 100644 --- a/stdlib/2and3/base64.pyi +++ b/stdlib/2and3/base64.pyi @@ -31,9 +31,10 @@ if sys.version_info >= (3, 4): def b85decode(b: _decodable) -> bytes: ... def decode(input: IO[bytes], output: IO[bytes]) -> None: ... -def decodebytes(s: bytes) -> bytes: ... def encode(input: IO[bytes], output: IO[bytes]) -> None: ... -def encodebytes(s: bytes) -> bytes: ... +if sys.version_info >= (3,): + def encodebytes(s: bytes) -> bytes: ... + def decodebytes(s: bytes) -> bytes: ... if sys.version_info < (3, 9): def encodestring(s: bytes) -> bytes: ... def decodestring(s: bytes) -> bytes: ... diff --git a/third_party/2and3/boto/compat.pyi b/third_party/2and3/boto/compat.pyi index ce997030a..070c75fe8 100644 --- a/third_party/2and3/boto/compat.pyi +++ b/third_party/2and3/boto/compat.pyi @@ -1,7 +1,10 @@ import sys from typing import Any -from base64 import encodestring as encodebytes +if sys.version_info >= (3,): + from base64 import encodebytes as encodebytes +else: + from base64 import encodestring as encodebytes from six.moves import http_client