Merge base64 module into 2and3 (#1141)

* Merge base64 module

* Move base64 into 2and3
This commit is contained in:
David Euresti
2017-04-05 16:51:26 -04:00
committed by Matthias Kramm
parent f7e4cb8c79
commit b9616f1517
2 changed files with 5 additions and 28 deletions

View File

@@ -1,25 +0,0 @@
# Stubs for base64
# Based on http://docs.python.org/3.2/library/base64.html
from typing import IO
def b64encode(s: str, altchars: str = ...) -> str: ...
def b64decode(s: str, altchars: str = ...,
validate: bool = ...) -> str: ...
def standard_b64encode(s: str) -> str: ...
def standard_b64decode(s: str) -> str: ...
def urlsafe_b64encode(s: str) -> str: ...
def urlsafe_b64decode(s: str) -> str: ...
def b32encode(s: str) -> str: ...
def b32decode(s: str, casefold: bool = ...,
map01: str = ...) -> str: ...
def b16encode(s: str) -> str: ...
def b16decode(s: str, casefold: bool = ...) -> str: ...
def decode(input: IO[str], output: IO[str]) -> None: ...
def decodebytes(s: str) -> str: ...
def decodestring(s: str) -> str: ...
def encode(input: IO[str], output: IO[str]) -> None: ...
def encodebytes(s: str) -> str: ...
def encodestring(s: str) -> str: ...

View File

@@ -1,10 +1,12 @@
# Stubs for base64
from typing import IO, Union
from typing import IO, Union, Text
import sys
if sys.version_info < (3, 3):
if sys.version_info < (3,):
_encodable = Union[bytes, Text]
_decodable = Union[bytes, Text]
elif sys.version_info < (3, 3):
_encodable = bytes
_decodable = bytes
elif sys.version_info[:2] == (3, 3):