1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
Description: Do not use embedded copy of ssl.match_hostname.
Author: Daniele Tricoli <eriol@mornie.org>
Forwarded: not-needed
Last-Update: 2014-05-25
--- a/test/test_connectionpool.py
+++ b/test/test_connectionpool.py
@@ -6,7 +6,7 @@
HTTPConnectionPool,
)
from urllib3.util import Timeout
-from urllib3.packages.ssl_match_hostname import CertificateError
+from ssl import CertificateError
from urllib3.exceptions import (
ClosedPoolError,
EmptyPoolError,
--- a/urllib3/connection.py
+++ b/urllib3/connection.py
@@ -38,7 +38,7 @@
from .exceptions import (
ConnectTimeoutError,
)
-from .packages.ssl_match_hostname import match_hostname
+from ssl import match_hostname
import six
from .util import (
assert_fingerprint,
--- a/urllib3/connectionpool.py
+++ b/urllib3/connectionpool.py
@@ -31,7 +31,7 @@
ReadTimeoutError,
ProxyError,
)
-from .packages.ssl_match_hostname import CertificateError
+from ssl import CertificateError
import six
from .connection import (
port_by_scheme,
--- a/urllib3/packages/__init__.py
+++ b/urllib3/packages/__init__.py
@@ -1,4 +1,3 @@
from __future__ import absolute_import
-from . import ssl_match_hostname
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,7 @@
url='http://urllib3.readthedocs.org/',
license='MIT',
packages=['urllib3',
- 'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
+ 'urllib3.packages',
'urllib3.contrib', 'urllib3.util',
],
requires=requirements,
|