Hello community,

here is the log from the commit of package python3-apache-libcloud for 
openSUSE:Factory checked in at 2015-03-03 11:14:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-apache-libcloud (Old)
 and      /work/SRC/openSUSE:Factory/.python3-apache-libcloud.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-apache-libcloud"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python3-apache-libcloud/python3-apache-libcloud.changes
  2015-02-20 12:01:54.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python3-apache-libcloud.new/python3-apache-libcloud.changes
     2015-03-03 11:14:35.000000000 +0100
@@ -1,0 +2,13 @@
+Sat Feb 28 21:42:50 UTC 2015 - [email protected]
+
+- added python3-apache-libcloud-ssl_match_hostname.patch
+- removed python3-backports.ssl_match_hostname from dependency list,
+  with the patch now in place, we use native funztions instead of
+  an external additional package
+
+-------------------------------------------------------------------
+Sat Feb 28 18:11:51 UTC 2015 - [email protected]
+
+- added python3-backports.ssl_match_hostname as dependency
+
+-------------------------------------------------------------------

New:
----
  python3-apache-libcloud-ssl_match_hostname.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-apache-libcloud.spec ++++++
--- /var/tmp/diff_new_pack.xDbA2j/_old  2015-03-03 11:14:35.000000000 +0100
+++ /var/tmp/diff_new_pack.xDbA2j/_new  2015-03-03 11:14:35.000000000 +0100
@@ -24,6 +24,7 @@
 Group:          Devel/Languages/Python
 Url:            https://libcloud.apache.org
 Source0:        
http://pypi.python.org/packages/source/a/apache-libcloud/apache-libcloud-%{version}.tar.bz2
+Patch0:                        python3-apache-libcloud-ssl_match_hostname.patch
 %if 0%{?suse_version}
 BuildRequires:  fdupes
 BuildRequires:  python3-xml
@@ -43,6 +44,7 @@
 
 %prep
 %setup -q -n apache-libcloud-%{version}
+%patch0 -p1
 
 %build
 python3 setup.py build

++++++ python3-apache-libcloud-ssl_match_hostname.patch ++++++
diff --git a/libcloud/httplib_ssl.py b/libcloud/httplib_ssl.py
index 52d1ed1..bd65656 100644
--- a/libcloud/httplib_ssl.py
+++ b/libcloud/httplib_ssl.py
@@ -23,13 +23,13 @@
 import base64
 import warnings
 
-from backports.ssl_match_hostname import match_hostname, CertificateError
-
 import libcloud.security
 from libcloud.utils.py3 import b
 from libcloud.utils.py3 import httplib
 from libcloud.utils.py3 import urlparse
 from libcloud.utils.py3 import urlunquote
+from libcloud.utils.py3 import match_hostname
+from libcloud.utils.py3 import CertificateError
 
 
 __all__ = [
diff --git a/libcloud/utils/py3.py b/libcloud/utils/py3.py
index 2b695a4..7ef3c8b 100644
--- a/libcloud/utils/py3.py
+++ b/libcloud/utils/py3.py
@@ -53,6 +53,13 @@
 if sys.version_info >= (3, 2) and sys.version_info < (3, 3):
     PY32 = True
 
+if sys.version_info >= (3, 2):
+    # ssl module in Python >= 3.2 includes match hostname function
+    from ssl import match_hostname, CertificateError  # NOQA
+else:
+    from backports.ssl_match_hostname import match_hostname, CertificateError  
# NOQA
+
+
 if PY3:
     import http.client as httplib
     from io import StringIO
diff --git a/setup.py b/setup.py
index 63e9ce7..23049fb 100644
--- a/setup.py
+++ b/setup.py
@@ -30,7 +30,6 @@
 
 import libcloud.utils.misc
 from libcloud.utils.dist import get_packages, get_data_files
-from libcloud.utils.py3 import unittest2_required
 
 libcloud.utils.misc.SHOW_DEPRECATION_WARNING = False
 
@@ -47,10 +46,19 @@
 SUPPORTED_VERSIONS = ['2.5', '2.6', '2.7', 'PyPy', '3.x']
 
 TEST_REQUIREMENTS = [
-    'backports.ssl_match_hostname',
     'mock'
 ]
 
+if sys.version_info < (3, 2):
+    TEST_REQUIREMENTS.append('backports.ssl_match_hostname')
+
+# Note: we cant use libcloud.utils.py3 here because it relies on backports
+# dependency on being available
+if sys.version_info >= (2, 7):
+    unittest2_required = False
+else:
+    unittest2_required = True
+
 if sys.version_info <= (2, 4):
     version = '.'.join([str(x) for x in sys.version_info[:3]])
     print('Version ' + version + ' is not supported. Supported versions are ' +
@@ -222,10 +230,13 @@ def run(self):
 
 forbid_publish()
 
-install_requires = ['backports.ssl_match_hostname']
+install_requires = []
 if pre_python26:
     install_requires.extend(['ssl', 'simplejson'])
 
+if sys.version_info < (3, 2):
+    install_requires.append('backports.ssl_match_hostname')
+
 setup(
     name='apache-libcloud',
     version=read_version_string(),
diff --git a/tox.ini b/tox.ini
index d081603..e612f5f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -29,20 +29,17 @@ deps = backports.ssl_match_hostname
        lockfile
 
 [testenv:py32]
-deps = backports.ssl_match_hostname
-       mock
+deps = mock
        lockfile
 
 [testenv:py33]
-deps = backports.ssl_match_hostname
-       mock
+deps = mock
        lockfile
 
 [testenv:py34]
 # At some point we can switch to use the stdlib provided mock module on
 # Python3.4+
-deps = backports.ssl_match_hostname
-       mock
+deps = mock
        lockfile
 
 [testenv:docs]
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to