From 154c4f7af4c6cb5fe7881af1f8676c918f6fc7d8866b3f306229468819456cb0 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 2 Jan 2017 08:52:00 +0000 Subject: [PATCH] Accepting request 447958 from home:tbechtold:branches:devel:languages:python update to version v2.12.4 * Python 2 compatibility * adding tests for super_len conditional flow * Check in updated idna. * Test case for requests getting stuck on post redirect with seekable stream * v2.12.2 * added new test, original test restored * Make Response.content return None if raw is None * adding unicode_is_ascii utility function * Update sidebarlogo.html * Fixed another scheme proxy over "all" priority * Add changelog for 1.19.1 * changed behavior of basic-http-auth test * correct backtick formatting * Note @jeremycline is now our contact. * Order of type check * Add prepared request pickling tests * adding comment * Add deprecation warnings for 3.0 * clarify that the `chunk_size` is optional when streaming to a file * adding ISO-8859-1 fallback for reason decoding * fixed some error * pysocks 1.5.7 blacklisting, due to IPv6 problems * Fix tests for new urllib3 exception text. * make add_dict_to_cookiejar cookielib.CookieJar compatible * correct module for cookiejar_from_dict in docs * converting update call to merge_cookies call for cookielib compatibility * streaming doc clarification * removing redundant logic from prepare_content_length * Update certifi certs to 2016.09.26 OBS-URL: https://build.opensuse.org/request/show/447958 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests?expand=0&rev=94 --- no-default-cacert.patch | 20 ++--- python-requests.changes | 125 ++++++++++++++++++++++++++++++ python-requests.spec | 3 +- requests-2.11.1.tar.gz | 3 - requests-2.12.4.tar.gz | 3 + urllib3-ssl-default-context.patch | 20 +++-- 6 files changed, 154 insertions(+), 20 deletions(-) delete mode 100644 requests-2.11.1.tar.gz create mode 100644 requests-2.12.4.tar.gz diff --git a/no-default-cacert.patch b/no-default-cacert.patch index 9991f33..e73b7ca 100644 --- a/no-default-cacert.patch +++ b/no-default-cacert.patch @@ -1,15 +1,15 @@ -Index: requests-2.9.1/MANIFEST.in +Index: requests-2.12.4/MANIFEST.in =================================================================== ---- requests-2.9.1.orig/MANIFEST.in -+++ requests-2.9.1/MANIFEST.in +--- requests-2.12.4.orig/MANIFEST.in ++++ requests-2.12.4/MANIFEST.in @@ -1 +1 @@ -include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem +include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt -Index: requests-2.9.1/requests/adapters.py +Index: requests-2.12.4/requests/adapters.py =================================================================== ---- requests-2.9.1.orig/requests/adapters.py -+++ requests-2.9.1/requests/adapters.py -@@ -179,15 +179,13 @@ class HTTPAdapter(BaseAdapter): +--- requests-2.12.4.orig/requests/adapters.py ++++ requests-2.12.4/requests/adapters.py +@@ -213,15 +213,13 @@ class HTTPAdapter(BaseAdapter): if verify is not True: cert_loc = verify @@ -30,10 +30,10 @@ Index: requests-2.9.1/requests/adapters.py conn.ca_certs = cert_loc else: conn.ca_cert_dir = cert_loc -Index: requests-2.9.1/requests/certs.py +Index: requests-2.12.4/requests/certs.py =================================================================== ---- requests-2.9.1.orig/requests/certs.py -+++ requests-2.9.1/requests/certs.py +--- requests-2.12.4.orig/requests/certs.py ++++ requests-2.12.4/requests/certs.py @@ -18,8 +18,9 @@ try: except ImportError: def where(): diff --git a/python-requests.changes b/python-requests.changes index 5bceffd..39bbb7b 100644 --- a/python-requests.changes +++ b/python-requests.changes @@ -1,3 +1,128 @@ +------------------------------------------------------------------- +Wed Dec 28 08:46:15 UTC 2016 - tbechtold@suse.com + +update to version v2.12.4 + * Python 2 compatibility + * adding tests for super_len conditional flow + * Check in updated idna. + * Test case for requests getting stuck on post redirect with seekable stream + * v2.12.2 + * added new test, original test restored + * Make Response.content return None if raw is None + * adding unicode_is_ascii utility function + * Update sidebarlogo.html + * Fixed another scheme proxy over "all" priority + * Add changelog for 1.19.1 + * changed behavior of basic-http-auth test + * correct backtick formatting + * Note @jeremycline is now our contact. + * Order of type check + * Add prepared request pickling tests + * adding comment + * Add deprecation warnings for 3.0 + * clarify that the `chunk_size` is optional when streaming to a file + * adding ISO-8859-1 fallback for reason decoding + * fixed some error + * pysocks 1.5.7 blacklisting, due to IPv6 problems + * Fix tests for new urllib3 exception text. + * make add_dict_to_cookiejar cookielib.CookieJar compatible + * correct module for cookiejar_from_dict in docs + * converting update call to merge_cookies call for cookielib compatibility + * streaming doc clarification + * removing redundant logic from prepare_content_length + * Update certifi certs to 2016.09.26 + * Specify self.cert is used for SSL client certificates + * Fix how we test fallback to latin-1 reason encoding + * adding method to url tests + * Enable UTS46 mode. + * Adding 'import requests' to readme code snippet. (#3700) + * Add Documentation for custom methods + * adding passthrough in close() for non-urllib3-like Responses + * remove extra import + * Test chunked upload doesn't set content length + * Change setuptools extra for new secure extra. + * fix issue when the file-like object raises an IOError with tell + * Added myself to AUTHORS + * Changelog entry for better IDNA. + * updated tests with IDNA encoded and IPv6 urls + * documentation line added for consistency with the post method + * Fall back to streaming + * added unicode auth test + * updates authors + * spelling fix for release-process + * Revert "Adding 'import requests' to readme code snippet." + * Document that Response.json() may raise ValueError + * Amplifies the timeout warning in the docs. + * Revert "Restrict URL preparation to HTTP/HTTPS" + * Update README.rst + * Further complicate the makefile to rewrite imports + * Unable unicode in basic http auth + * Various packaging requirements for idna + * Fixed: httpbin doesn't support bytes + * reverting 3357 and comparing properly encoded strings + * Fixed issue #3696. Added a test for it as well. + * fixed: httpbin with unicode auth + * Remove error swallowing exception catching of AttributeError + * Update sidebarintro.html + * removing use of seek to set total_length + * Update urllib3 to 1.19 + * Use IDNA2008 to encode hosts. + * Formatted the example to fix the color highlighting + * Add tests to verify that correct 'Content-Length' or 'Transfer-Encoding' headers are being set in PreparedRequest. + * [httpAdapter] allow empty password in proxy credentials + * Fixed bug to give scheme proxy priority over "all" + * adding decoding requirement for Python 3 + * fixes broken link on documentation page + * Basic tests for internationalized domain names. + * Update Comments & Magic Strings + * Change module of internal references to to_native_str() + * Add pickle test with hooks + * update 307 tests to check body content + * requests.post checked data parameters for type like dict. + * test different CookieJar types for add_dict_to_cookiejar + * Restrict URL preparation to HTTP/HTTPS + * Indicate shell command in README is code-like. + * documentation on encoding fallback for streaming + * Fixed readme typo - 'site' should be 'domain' + * Rework Bytestring Host Test to use PyTest Httpbin + * Add makefile to get latest idna release. + * Tests for our URL handling. + * Add test for request when Host header is bytestring + * Move to_native_string to _internal_utils.py to avoid circular dependency + * Add workaround to avoid implicit import of encodings.idna. + * minor doc string cleanup + * little modification in consume_socket_content + * links + * Update bundled urllib3 to 1.19.1 + * Changes to documentation based on comments and correction of list of authors. + * Add license for idna package. + * Add line to AUTHORS + * Adjust patch to utilize requests utility functions + * test _body_position and rewind_body + * Seems like we're missing a backport here. + * new logo :D + * add socket tests for 401 redirect and 401 failure + * Adding notes about Request's timeout behavior. + * fixed usage unicode string + * unicode test for _basic_auth_str + * Let's use capitals. + * adding string casting for non-bytes values + * Add patch to avoid bytestring/str hodgepodge + * Vendor idna v2.1 + * Clarify allow_redirects + * v2.12.3 + * v2.12.0 + * v2.12.1 + * v2.12.4 + * modifying IDNA encoding check to allow fallback + * Use seek from end rather than getvalue + * updating pickling tests for PreparedRequest + * We only ship tagged releases now. + * Make Response.content() return None if status_code is None + * Just lstrip instead of strip because trailing whitespace already works. + * adding rewind for re-POST bodies + * Add persistent examples + ------------------------------------------------------------------- Thu Sep 1 07:53:20 UTC 2016 - tbechtold@suse.com diff --git a/python-requests.spec b/python-requests.spec index aa38d21..e600368 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -20,7 +20,7 @@ %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif Name: python-requests -Version: 2.11.1 +Version: 2.12.4 Release: 0 Summary: Awesome Python HTTP Library That's Actually Usable License: Apache-2.0 @@ -40,6 +40,7 @@ Requires: python Recommends: python-ndg-httpsclient Recommends: python-pyOpenSSL Recommends: python-pyasn1 +Recommends: python-cryptography %if 0%{?suse_version} <= 1200 BuildRequires: openssl-certs Requires: openssl-certs diff --git a/requests-2.11.1.tar.gz b/requests-2.11.1.tar.gz deleted file mode 100644 index ea1129f..0000000 --- a/requests-2.11.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5acf980358283faba0b897c73959cecf8b841205bb4b2ad3ef545f46eae1a133 -size 485936 diff --git a/requests-2.12.4.tar.gz b/requests-2.12.4.tar.gz new file mode 100644 index 0000000..d21616a --- /dev/null +++ b/requests-2.12.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed98431a0631e309bb4b63c81d561c1654822cb103de1ac7b47e45c26be7ae34 +size 547650 diff --git a/urllib3-ssl-default-context.patch b/urllib3-ssl-default-context.patch index 5745aa9..50f9479 100644 --- a/urllib3-ssl-default-context.patch +++ b/urllib3-ssl-default-context.patch @@ -1,13 +1,21 @@ -Index: b/urllib3/util/ssl_.py +Index: urllib3-1.19.1/urllib3/util/ssl_.py =================================================================== ---- a/urllib3/util/ssl_.py -+++ b/urllib3/util/ssl_.py -@@ -299,6 +299,8 @@ def ssl_wrap_socket(sock, keyfile=None, +--- urllib3-1.19.1.orig/urllib3/util/ssl_.py ++++ urllib3-1.19.1/urllib3/util/ssl_.py +@@ -314,9 +314,13 @@ def ssl_wrap_socket(sock, keyfile=None, if e.errno == errno.ENOENT: raise SSLError(e) raise -+ elif cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'): -+ context.set_default_verify_paths() +- elif getattr(context, 'load_default_certs', None) is not None: +- # try to load OS default certs; works well on Windows (require Python3.4+) +- context.load_default_certs() ++ else: ++ if cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'): ++ context.set_default_verify_paths() ++ ++ if getattr(context, 'load_default_certs', None) is not None: ++ # try to load OS default certs; works well on Windows (require Python3.4+) ++ context.load_default_certs() if certfile: context.load_cert_chain(certfile, keyfile)