Skip to content

Commit c958631

Browse files
authored
Merge pull request #69 from mupuf/master
Inherit HTTPConnection through urllib3.connection, not httplib
2 parents 31bdd06 + 39b9c64 commit c958631

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

requests_unixsocket/adapters.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
from requests.adapters import HTTPAdapter
44
from requests.compat import urlparse, unquote
55

6-
try:
7-
import http.client as httplib
8-
except ImportError:
9-
import httplib
10-
116
try:
127
from requests.packages import urllib3
138
except ImportError:
@@ -16,7 +11,7 @@
1611

1712
# The following was adapted from some code from docker-py
1813
# https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py
19-
class UnixHTTPConnection(httplib.HTTPConnection, object):
14+
class UnixHTTPConnection(urllib3.connection.HTTPConnection, object):
2015

2116
def __init__(self, unix_socket_url, timeout=60):
2217
"""Create an HTTP connection to a unix domain socket

0 commit comments

Comments
 (0)