diff --git a/boto-2.39.0-kinesis-decode.patch b/boto-2.39.0-kinesis-decode.patch deleted file mode 100644 index 7b5e865..0000000 --- a/boto-2.39.0-kinesis-decode.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit c5047b3dc1800dda7a6a02766c9bafdaa139014e -Author: Garrett Holmstrom -Date: Fri Jan 29 16:37:13 2016 -0800 - - Decode request bodies before passing them to json - - AWSAuthConnection._mexe encodes request bodies as UTF-8, mutating the - original request object in the process. This breaks kinesis's unit - tests on at least python 3.4 and 3.5 on Fedora, because those unit tests - call json.loads, which expect str objects rather than the bytes objects - that _mexe converted it to. - - This commit makes the test cases decode request bodies before feeding - them to json.loads. - -Index: boto-2.39.0/tests/unit/kinesis/test_kinesis.py -=================================================================== ---- boto-2.39.0.orig/tests/unit/kinesis/test_kinesis.py -+++ boto-2.39.0/tests/unit/kinesis/test_kinesis.py -@@ -36,7 +36,7 @@ class TestKinesis(AWSMockServiceTestCase - self.service_connection.put_record('stream-name', - b'\x00\x01\x02\x03\x04\x05', 'partition-key') - -- body = json.loads(self.actual_request.body) -+ body = json.loads(self.actual_request.body.decode('utf-8')) - self.assertEqual(body['Data'], 'AAECAwQF') - - target = self.actual_request.headers['X-Amz-Target'] -@@ -47,7 +47,7 @@ class TestKinesis(AWSMockServiceTestCase - self.service_connection.put_record('stream-name', - 'data', 'partition-key') - -- body = json.loads(self.actual_request.body) -+ body = json.loads(self.actual_request.body.decode('utf-8')) - self.assertEqual(body['Data'], 'ZGF0YQ==') - - target = self.actual_request.headers['X-Amz-Target'] -@@ -66,7 +66,7 @@ class TestKinesis(AWSMockServiceTestCase - self.service_connection.put_records(stream_name='stream-name', - records=[record_binary, record_str]) - -- body = json.loads(self.actual_request.body) -+ body = json.loads(self.actual_request.body.decode('utf-8')) - self.assertEqual(body['Records'][0]['Data'], 'AAECAwQF') - self.assertEqual(body['Records'][1]['Data'], 'ZGF0YQ==') - diff --git a/python-boto.spec b/python-boto.spec index c993b93..84fb7de 100644 --- a/python-boto.spec +++ b/python-boto.spec @@ -4,10 +4,11 @@ %bcond_with python3 %endif -%if 0%{?fedora} || 0%{?rhel} > 6 -%bcond_without unittests -%else +# Unit tests don't work on python 2.6 +%if 0%{?el6} %bcond_with unittests +%else +%bcond_without unittests %endif # Boto's sample executables became doc files in F23 @@ -18,17 +19,10 @@ %endif -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%if %{with python3} -%{!?__python3: %global __python3 /usr/bin/python3} -%{!?python3_sitelib: %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%endif # with python3 - Summary: A simple, lightweight interface to Amazon Web Services Name: python-boto Version: 2.40.0 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: Development/Languages URL: https://github.com/boto/boto @@ -39,9 +33,6 @@ Source1: boto-mit-license.txt # Unbundle python-six # https://github.com/boto/boto/pull/3086 Patch1: boto-2.39.0-devendor.patch -# Fix kinesis tests on python 3 -# https://github.com/boto/boto/pull/3483 -#Patch2: boto-2.39.0-kinesis-decode.patch BuildRequires: python2-devel BuildRequires: python-setuptools @@ -122,15 +113,12 @@ cloud systems like Eucalyptus, OpenStack and Open Nebula. %prep %setup -q -n boto-%{version} - %patch1 -p1 -#%%patch2 -p1 + rm -r boto/vendored cp -p %{SOURCE1} . -#rm -r boto.egg-info - %build %{__python2} setup.py build @@ -184,6 +172,9 @@ mv $RPM_BUILD_ROOT/%{_bindir} examples %changelog +* Tue Jun 21 2016 Garrett Holmstrom - 2.40.0-2 +- Cleaned up spec file + * Mon May 23 2016 Jon Ciesla - 2.40.0-1 - 2.40.0. - Kinesis patch upstreamed.