Merge pull request #250 from markflyhigh/fix-py3-encoding
Handle encoded response content in batch http request in Python 3
diff --git a/apitools/base/protorpclite/messages_test.py b/apitools/base/protorpclite/messages_test.py
index 0131c86..3ad75e4 100644
--- a/apitools/base/protorpclite/messages_test.py
+++ b/apitools/base/protorpclite/messages_test.py
@@ -39,6 +39,11 @@
# pylint:disable=unused-variable
# pylint:disable=too-many-lines
+try:
+ long # Python 2
+except NameError:
+ long = int # Python 3
+
class ModuleInterfaceTest(test_util.ModuleInterfaceTest,
test_util.TestCase):
diff --git a/ez_setup.py b/ez_setup.py
index be314e4..18bd16c 100755
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -91,7 +91,7 @@
return do_download()
try:
pkg_resources.require("setuptools>="+version); return
- except pkg_resources.VersionConflict, e:
+ except pkg_resources.VersionConflict as e:
if was_imported:
print >>sys.stderr, (
"The required version of setuptools (>=%s) is not available, and\n"
diff --git a/samples/storage_sample/downloads_test.py b/samples/storage_sample/downloads_test.py
index b2d928f..9f4339e 100644
--- a/samples/storage_sample/downloads_test.py
+++ b/samples/storage_sample/downloads_test.py
@@ -171,7 +171,7 @@
def testSerializedDownload(self):
def _ProgressCallback(unused_response, download_object):
- print 'Progress %s' % download_object.progress
+ print('Progress %s' % download_object.progress)
file_contents = self.__GetTestdataFileContents('fifteen_byte_file')
object_name = os.path.join(self._TESTDATA_PREFIX, 'fifteen_byte_file')
diff --git a/setup.py b/setup.py
index ce8d807..878fc13 100644
--- a/setup.py
+++ b/setup.py
@@ -49,7 +49,7 @@
py_version = platform.python_version()
-_APITOOLS_VERSION = '0.5.24'
+_APITOOLS_VERSION = '0.5.25'
with open('README.rst') as fileobj:
README = fileobj.read()