diff --git a/python/python-requests/centos/build_srpm.data b/python/python-requests/centos/build_srpm.data index 70b4b5dcb..8aeb55368 100644 --- a/python/python-requests/centos/build_srpm.data +++ b/python/python-requests/centos/build_srpm.data @@ -1 +1 @@ -TIS_PATCH_VER=2 +TIS_PATCH_VER=1 diff --git a/python/python-requests/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch b/python/python-requests/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch index 4139cedca..3098d8d31 100644 --- a/python/python-requests/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch +++ b/python/python-requests/centos/meta_patches/0001-Update-package-versioning-for-TIS-format.patch @@ -3,6 +3,7 @@ From: jmckenna Date: Wed, 13 Dec 2017 09:02:08 -0500 Subject: [PATCH 1/2] Update package versioning for TIS format +Signed-off-by: Dongqi Chen --- SPECS/python-requests.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -11,12 +12,12 @@ diff --git a/SPECS/python-requests.spec b/SPECS/python-requests.spec index efe0966..111bab7 100644 --- a/SPECS/python-requests.spec +++ b/SPECS/python-requests.spec -@@ -13,7 +13,7 @@ +@@ -10,7 +10,7 @@ Name: python-requests - Version: 2.21.0 --Release: 2%{?dist} -+Release: 2.el7%{?_tis_dist}.%{tis_patch_ver} + Version: 2.20.0 +-Release: 1%{?dist} ++Release: 1.el8%{?_tis_dist}.%{tis_patch_ver} Summary: HTTP library, written in Python, for human beings License: ASL 2.0 diff --git a/python/python-requests/centos/meta_patches/0002-include-patch-for-error-handling.patch b/python/python-requests/centos/meta_patches/0002-include-patch-for-error-handling.patch index 69b329877..fad143a55 100644 --- a/python/python-requests/centos/meta_patches/0002-include-patch-for-error-handling.patch +++ b/python/python-requests/centos/meta_patches/0002-include-patch-for-error-handling.patch @@ -3,6 +3,7 @@ From: jmckenna Date: Wed, 13 Dec 2017 09:02:40 -0500 Subject: [PATCH 2/2] include patch for error handling +Signed-off-by: Dongqi Chen --- SPECS/python-requests.spec | 2 ++ 1 file changed, 2 insertions(+) @@ -11,10 +12,10 @@ diff --git a/SPECS/python-requests.spec b/SPECS/python-requests.spec index 111bab7..8aab964 100644 --- a/SPECS/python-requests.spec +++ b/SPECS/python-requests.spec -@@ -39,6 +39,8 @@ Patch2: python-requests-urllib3-at-%{urllib3_unbundled_version}.patch - # https://bugzilla.redhat.com/show_bug.cgi?id=1653223 - Patch5: requests-2.20.0-no-py2-httpbin.patch - +@@ -38,6 +38,8 @@ Patch4: Don-t-inject-pyopenssl-into-urllib3.patch + # build-time package tests + Patch5: Skip-all-tests-needing-httpbin.patch + +Patch6: 0001-close-connection-on-HTTP-413-Request-Entit.patch + BuildArch: noarch diff --git a/python/python-requests/centos/patches/0001-close-connection-on-HTTP-413-Request-Entit.patch b/python/python-requests/centos/patches/0001-close-connection-on-HTTP-413-Request-Entit.patch index 5779d4be2..a5a366268 100644 --- a/python/python-requests/centos/patches/0001-close-connection-on-HTTP-413-Request-Entit.patch +++ b/python/python-requests/centos/patches/0001-close-connection-on-HTTP-413-Request-Entit.patch @@ -7,6 +7,8 @@ Subject: [PATCH] close connection on HTTP 413 Request Entity Too Allow low_conn to retrieve/handle unread response data buffers in case ProtocolError or socket.error are raised while sending request data. + +Signed-off-by: Dongqi Chen --- requests/adapters.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) @@ -16,9 +18,9 @@ index fd46325..087258a 100644 --- a/requests/adapters.py +++ b/requests/adapters.py @@ -466,12 +466,18 @@ class HTTPAdapter(BaseAdapter): - + low_conn.endheaders() - + - for i in request.body: - low_conn.send(hex(len(i))[2:].encode('utf-8')) - low_conn.send(b'\r\n') @@ -37,7 +39,7 @@ index fd46325..087258a 100644 + # data buffers in case ProtocolError or socket.error + # are raised while sending request data + pass - + # Receive the response from the server try: -- diff --git a/python/python-requests/centos/srpm_path b/python/python-requests/centos/srpm_path index ebfbd310f..02d76bec3 100644 --- a/python/python-requests/centos/srpm_path +++ b/python/python-requests/centos/srpm_path @@ -1 +1 @@ -mirror:Source/python-requests-2.21.0-2.el7.src.rpm +mirror:Source/python-requests-2.20.0-1.el8.src.rpm