forked from pool/python-httplib2
Accepting request 487690 from devel:languages:python:singlespec
1 OBS-URL: https://build.opensuse.org/request/show/487690 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-httplib2?expand=0&rev=63
This commit is contained in:
parent
06a2205920
commit
5f935d64e2
3
httplib2-0.10.3.tar.gz
Normal file
3
httplib2-0.10.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e404d3b7bd86c1bc931906098e7c1305d6a3a6dcef141b8bb1059903abb3ceeb
|
||||
size 204500
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3aba1c9539711551f4d83e857b316b5134a1c4ddce98a875b7027be7dd6d988
|
||||
size 205165
|
@ -1,21 +0,0 @@
|
||||
diff -r 93291649202b python2/httplib2/__init__.py
|
||||
--- a/python2/httplib2/__init__.py Tue Mar 26 14:17:48 2013 -0400
|
||||
+++ b/python2/httplib2/__init__.py Tue Apr 23 10:32:15 2013 +0300
|
||||
@@ -1030,7 +1030,7 @@
|
||||
raise CertificateHostnameMismatch(
|
||||
'Server presented certificate that does not match '
|
||||
'host %s: %s' % (hostname, cert), hostname, cert)
|
||||
- except ssl_SSLError, e:
|
||||
+ except (ssl_SSLError, CertificateHostnameMismatch), e:
|
||||
if sock:
|
||||
sock.close()
|
||||
if self.sock:
|
||||
@@ -1040,7 +1040,7 @@
|
||||
# to get at more detailed error information, in particular
|
||||
# whether the error is due to certificate validation or
|
||||
# something else (such as SSL protocol mismatch).
|
||||
- if e.errno == ssl.SSL_ERROR_SSL:
|
||||
+ if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL:
|
||||
raise SSLHandshakeError(e)
|
||||
else:
|
||||
raise
|
@ -43,18 +43,21 @@ Index: httplib2-0.9.2/python3/httplib2/__init__.py
|
||||
|
||||
def _get_end2end_headers(response):
|
||||
hopbyhop = list(HOP_BY_HOP)
|
||||
@@ -833,13 +832,17 @@ class HTTPSConnectionWithTimeout(http.cl
|
||||
ca_certs=None, disable_ssl_certificate_validation=False):
|
||||
@@ -838,16 +837,17 @@
|
||||
# TODO: implement proxy_info
|
||||
self.proxy_info = proxy_info
|
||||
context = None
|
||||
- if ca_certs is None:
|
||||
- ca_certs = CA_CERTS
|
||||
- if (cert_file or ca_certs) and not disable_ssl_certificate_validation:
|
||||
+ if not disable_ssl_certificate_validation:
|
||||
- if (cert_file or ca_certs):
|
||||
+ if True:
|
||||
if not hasattr(ssl, 'SSLContext'):
|
||||
raise CertificateValidationUnsupportedInPython31()
|
||||
- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
||||
- context.verify_mode = ssl.CERT_REQUIRED
|
||||
- if disable_ssl_certificate_validation:
|
||||
- context.verify_mode = ssl.CERT_NONE
|
||||
- else:
|
||||
- context.verify_mode = ssl.CERT_REQUIRED
|
||||
+
|
||||
+ cafile = ca_certs
|
||||
+ capath = None
|
||||
|
@ -1,9 +1,35 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 12 18:16:09 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- Update to 0.10.3
|
||||
* Fix certificate validation on Python<=2.7.8 without ssl.CertificateError
|
||||
- Update to 0.10.2
|
||||
* Just a reupload of 0.10.1, which was broken for Python3
|
||||
because wheel distribution doesn't play well with our 2/3 split code base.
|
||||
- Update to 0.10.1
|
||||
* Remove VeriSign Class 3 CA from trusted certs
|
||||
* Add IdenTrust DST Root CA X3
|
||||
* Support for specifying the SSL protocol version (Python v2)
|
||||
* On App Engine use urlfetch's default deadline if None is passed.
|
||||
* Fix TypeError on AppEngine “__init__() got an unexpected keyword argument 'ssl_version’”
|
||||
* Send SNI data for SSL connections on Python 2.7.9+
|
||||
* Verify the server hostname if certificate validation is enabled
|
||||
* Add proxy_headers argument to ProxyInfo constructor
|
||||
* Make disable_ssl_certificate_validation work with Python 3.5.
|
||||
* Fix socket error handling
|
||||
- Remove httplib2-bnc-818100.patch, merged upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 12 19:50:16 UTC 2016 - rjschwei@suse.com
|
||||
|
||||
- Project moved from code.google.com to GitHub, fix the url
|
||||
accordingly
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 27 14:38:59 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
- attempt to build multi-python
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 2 16:45:18 UTC 2016 - jmatejek@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-httplib2
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,8 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-httplib2
|
||||
Version: 0.9.2
|
||||
Version: 0.10.3
|
||||
Release: 0
|
||||
Url: https://github.com/httplib2/httplib2
|
||||
Summary: A Python HTTP client library
|
||||
@ -26,44 +27,41 @@ Group: Development/Libraries/Python
|
||||
Source: http://pypi.python.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system certs instead (bnc#761162)
|
||||
Patch0: httplib2-use-system-certs.patch
|
||||
# PATCH-FIX-UPSTREAM: speilicke@suse.com -- SSL certificate hostname mismatch is checked only once
|
||||
Patch1: httplib2-bnc-818100.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: python-devel
|
||||
#%%python_buildrequires
|
||||
# Test requirements (for ssl module):
|
||||
#BuildRequires: python
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
Requires: openssl-certs
|
||||
%else
|
||||
Requires: ca-certificates
|
||||
%endif
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
#%%define _specdir /home/matejcik/obs/home:matejcik:messing-with-macros/python-httplib2
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A comprehensive HTTP client library that supports many features
|
||||
left out of other HTTP libraries.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n httplib2-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
%python_install
|
||||
|
||||
#%%check
|
||||
#python python2/httplib2test.py
|
||||
#python2 python2/httplib2test.py
|
||||
#python3 python3/httplib2test.py
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root)
|
||||
%{python_sitelib}/httplib2-%{version}-py%{py_ver}.egg-info
|
||||
%{python_sitelib}/httplib2-%{version}-py%{python_version}.egg-info
|
||||
%{python_sitelib}/httplib2
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user