Update to version 2.12.2
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
This commit is contained in:
parent
8c50084912
commit
f2e692fa09
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,3 +28,4 @@
|
||||
/requests-2.11.0.tar.gz
|
||||
/requests-2.11.1.tar.gz
|
||||
/requests-2.12.1.tar.gz
|
||||
/requests-2.12.2.tar.gz
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 35d7b9264b5ae2c9b327d63464ec299b3d4bda2c Mon Sep 17 00:00:00 2001
|
||||
From: Christian Heimes <christian@python.org>
|
||||
Date: Mon, 21 Nov 2016 18:00:24 +0100
|
||||
Subject: [PATCH] Restrict URL preparation to HTTP/HTTPS
|
||||
|
||||
Requests treats all URLs starting with the string 'http' as HTTP URLs.
|
||||
Preparation with IDNA breaks non-standard URIs like http+unix. Requests
|
||||
now prepares only URLs with prefix http:// and https://.
|
||||
|
||||
Signed-off-by: Christian Heimes <christian@python.org>
|
||||
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
||||
---
|
||||
requests/models.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/requests/models.py b/requests/models.py
|
||||
index a4bd41b..ca9e6fe 100644
|
||||
--- a/requests/models.py
|
||||
+++ b/requests/models.py
|
||||
@@ -344,9 +344,9 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin):
|
||||
url = unicode(url) if is_py2 else str(url)
|
||||
|
||||
# Don't do any URL preparation for non-HTTP schemes like `mailto`,
|
||||
- # `data` etc to work around exceptions from `url_parse`, which
|
||||
- # handles RFC 3986 only.
|
||||
- if ':' in url and not url.lower().startswith('http'):
|
||||
+ # `data`, `http+unix` etc to work around exceptions from `url_parse`,
|
||||
+ # which handles RFC 3986 only.
|
||||
+ if ':' in url and not url.lower().startswith(('http://', 'https://')):
|
||||
self.url = url
|
||||
return
|
||||
|
||||
--
|
||||
2.9.3
|
||||
|
@ -10,8 +10,8 @@
|
||||
%global urllib3_unbundled_version 1.19.1
|
||||
|
||||
Name: python-requests
|
||||
Version: 2.12.1
|
||||
Release: 2%{?dist}
|
||||
Version: 2.12.2
|
||||
Release: 1%{?dist}
|
||||
Summary: HTTP library, written in Python, for human beings
|
||||
|
||||
License: ASL 2.0
|
||||
@ -32,10 +32,6 @@ Patch1: python-requests-remove-nested-bundling-dep.patch
|
||||
# - https://github.com/kennethreitz/requests/issues/2816
|
||||
Patch2: python-requests-urllib3-at-%{urllib3_unbundled_version}.patch
|
||||
|
||||
# Backport of https://github.com/kennethreitz/requests/pull/3713
|
||||
# This patch should be removed after the 2.12.2 or 2.13 release.
|
||||
Patch3: 0001-Restrict-URL-preparation-to-HTTP-HTTPS.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -94,7 +90,6 @@ designed to make HTTP requests easy for developers.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Unbundle the certificate bundle from mozilla.
|
||||
rm -rf requests/cacert.pem
|
||||
@ -180,6 +175,9 @@ popd
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Nov 30 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.2-1
|
||||
- Update to 2.12.2
|
||||
|
||||
* Wed Nov 23 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-2
|
||||
- Backport #3713. Fixes #1397149
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user