summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Schwartz <mfschwartz@google.com>2019-03-30 15:28:16 -0700
committerGitHub <noreply@github.com>2019-03-30 15:28:16 -0700
commit91ba037e54ef521c379263b0ac769c66182527d7 (patch)
tree2b535d31a8fe55278e7042f62d91e269a15f562d
parent03b2268348ea81d80e3e5ddea0970f4968561010 (diff)
parentd72358a48df39ffb2fa56786370aca688732ed39 (diff)
downloadboto-91ba037e54ef521c379263b0ac769c66182527d7.tar.gz
Merge pull request #3862 from walkerjoe/stringfix
Stringfix & get_utf8 method cleanup
-rw-r--r--boto/utils.py14
-rw-r--r--requirements-py26.txt2
-rw-r--r--requirements-py33.txt1
-rw-r--r--tests/integration/s3/mock_storage_service.py2
4 files changed, 4 insertions, 15 deletions
diff --git a/boto/utils.py b/boto/utils.py
index ed782b85..5e047d88 100644
--- a/boto/utils.py
+++ b/boto/utils.py
@@ -1132,20 +1132,6 @@ def get_utf8able_str(s, errors='strict'):
raise TypeError('not expecting type "%s"' % type(s))
-def get_utf8_value(value):
- if isinstance(value, bytes):
- value.decode('utf-8')
- return value
-
- if not isinstance(value, six.string_types):
- value = six.text_type(value)
-
- if isinstance(value, six.text_type):
- value = value.encode('utf-8')
-
- return value
-
-
def print_to_fd(*objects, **kwargs):
"""A Python 2/3 compatible analogue to the print function.
diff --git a/requirements-py26.txt b/requirements-py26.txt
index e2188d20..0ec5371d 100644
--- a/requirements-py26.txt
+++ b/requirements-py26.txt
@@ -1,3 +1,5 @@
+PyYAML==3.11
+idna==2.7
unittest2==0.5.1
ordereddict==1.1
paramiko>=1.10.0,<2.4
diff --git a/requirements-py33.txt b/requirements-py33.txt
index 7c9f639a..30504948 100644
--- a/requirements-py33.txt
+++ b/requirements-py33.txt
@@ -1 +1,2 @@
+idna==2.7
paramiko>=1.10.0,<2.4
diff --git a/tests/integration/s3/mock_storage_service.py b/tests/integration/s3/mock_storage_service.py
index aece4902..d4e92650 100644
--- a/tests/integration/s3/mock_storage_service.py
+++ b/tests/integration/s3/mock_storage_service.py
@@ -88,7 +88,7 @@ class MockKey(object):
torrent=NOT_IMPL,
version_id=NOT_IMPL,
res_download_handler=NOT_IMPL):
- fp.write(self.data)
+ fp.write(six.ensure_binary(self.data))
def get_file(self, fp, headers=NOT_IMPL, cb=NOT_IMPL, num_cb=NOT_IMPL,
torrent=NOT_IMPL, version_id=NOT_IMPL,