From 7b96867e75e13b12e6a6dd1bbd6e861db7d25e2d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Sep 22 2016 22:19:39 +0000 Subject: Update python-requests patch to handle python3 bytestrings properly --- diff --git a/osbs-client.spec b/osbs-client.spec index 8bf7c3b..182c1c3 100644 --- a/osbs-client.spec +++ b/osbs-client.spec @@ -26,7 +26,7 @@ %global shortcommit %(c=%{commit}; echo ${c:0:7}) # set to 0 to create a normal release %global postrelease 0 -%global release 2 +%global release 3 %global osbs_obsolete_vr 0.14-2 @@ -226,6 +226,9 @@ LANG=en_US.utf8 py.test-%{python2_version} -vv tests %endif # with_python3 %changelog +* Thu Sep 22 2016 Adam Miller - 0.31-3 +- Update python-requests patch to handle python3 bytestrings properly + * Thu Sep 22 2016 Adam Miller - 0.31-2 - Fix python3 requires diff --git a/rewrite-httppy-pycurl-requests-0.30.patch b/rewrite-httppy-pycurl-requests-0.30.patch index 30a178a..4707128 100644 --- a/rewrite-httppy-pycurl-requests-0.30.patch +++ b/rewrite-httppy-pycurl-requests-0.30.patch @@ -1,4 +1,4 @@ -From 68704bf351ac542c1ceedaf57eae72b08d137ca2 Mon Sep 17 00:00:00 2001 +From 17ce6bb8e691560fb05b9ffbca5b1b42fef2f350 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 21 Sep 2016 13:48:07 +0000 Subject: [PATCH 1/3] Rewrite http.py to use python-requests @@ -8,11 +8,11 @@ rpm is, as used by koji-containerbuild. Signed-off-by: Patrick Uiterwijk --- - osbs/http.py | 289 +++++++++-------------------------------------------------- - 1 file changed, 41 insertions(+), 248 deletions(-) + osbs/http.py | 291 +++++++++-------------------------------------------------- + 1 file changed, 42 insertions(+), 249 deletions(-) diff --git a/osbs/http.py b/osbs/http.py -index 9955c55..e2a61c9 100644 +index 9955c55..48b29d5 100644 --- a/osbs/http.py +++ b/osbs/http.py @@ -24,77 +24,17 @@ @@ -368,9 +368,10 @@ index 9955c55..e2a61c9 100644 + if check and self.status_code not in (0, requests.codes.OK, requests.codes.CREATED): raise OsbsResponseException(self.content, self.status_code) - return json.loads(self.content) +- return json.loads(self.content) ++ return json.loads(self.content.decode('utf-8')) -From ef12a95e4d96299608c4b1cab99fd38e8a7cf4be Mon Sep 17 00:00:00 2001 +From 25242ca1696a8507ae392da3f55cddfc4d736c93 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 21 Sep 2016 14:13:25 +0000 Subject: [PATCH 2/3] Fix tests for porting of http client to requests @@ -461,7 +462,7 @@ index 674f9eb..30d2f14 100644 - finally: - HttpStream._perform = orig_perform -From 80c679cb33cdcc9edb00648b154f8559402a50ce Mon Sep 17 00:00:00 2001 +From e29a9b43caa51701986f74606c0ee79f90dc00c1 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Wed, 21 Sep 2016 14:27:16 +0000 Subject: [PATCH 3/3] Update spec file to include python-requests