diff --git a/appveyor/env_info.py b/appveyor/env_info.py index cd7cfd75..200660db 100644 --- a/appveyor/env_info.py +++ b/appveyor/env_info.py @@ -21,27 +21,30 @@ import sys -def env_var(var_name): - value = os.environ.get(var_name) - print('os.environ[{!r}]: {}'.format(var_name, value)) - - def main(): - print('os.name: {}'.format(os.name)) - env_var('PYTHON_ARCH') - env_var('PYTHON_VERSION') - print('sys.platform: {}'.format(sys.platform)) - + print('>>> import os') + print('>>> os.name') + print(repr(os.name)) + print('>>> print(os.environ.get(\'PYTHON_ARCH\'))') + print(os.environ.get('PYTHON_ARCH')) + print('>>> print(os.environ.get(\'PYTHON_VERSION\'))') + print(os.environ.get('PYTHON_VERSION')) + print('>>> import sys') + print('>>> sys.platform') + print(repr(sys.platform)) + print('>>> sys.maxsize') + print(repr(sys.maxsize)) if sys.maxsize == 2**63 - 1: - print('sys.maxsize: 2^(63) - 1') + print('>>> sys.maxsize == 2**63 - 1') + print('True') elif sys.maxsize == 2**31 - 1: - print('sys.maxsize: 2^(31) - 1') - else: - print('sys.maxsize: {}'.format(sys.maxsize)) - - print('sys.version:\n{}'.format(sys.version)) - bitness = struct.calcsize('P') * 8 - print('struct.calcsize(\'P\') * 8: {}'.format(bitness)) + print('>>> sys.maxsize == 2**31 - 1') + print('True') + print('>>> print(sys.version)') + print(sys.version) + print('>>> import struct') + print('>>> struct.calcsize(\'P\') * 8') + print(repr(struct.calcsize('P') * 8)) if __name__ == '__main__': diff --git a/google/resumable_media/_upload.py b/google/resumable_media/_upload.py index e54cff66..5233c9b6 100644 --- a/google/resumable_media/_upload.py +++ b/google/resumable_media/_upload.py @@ -40,7 +40,7 @@ _CONTENT_RANGE_TEMPLATE = u'bytes {:d}-{:d}/{:d}' _RANGE_UNKNOWN_TEMPLATE = u'bytes {:d}-{:d}/*' _EMPTY_RANGE_TEMPLATE = u'bytes */{:d}' -_BOUNDARY_WIDTH = len(repr(sys.maxsize - 1)) +_BOUNDARY_WIDTH = len(str(sys.maxsize - 1)) _BOUNDARY_FORMAT = u'==============={{:0{:d}d}}=='.format(_BOUNDARY_WIDTH) _MULTIPART_SEP = b'--' _CRLF = b'\r\n'