Skip to content

Commit 3170277

Browse files
committed
Updated websocket-client dependency to latest version (now supports python 3)
1 parent f40e034 commit 3170277

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

docker/client.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import requests
2424
import requests.exceptions
2525
import six
26+
import websocket
27+
2628

2729
from . import constants
2830
from . import errors
@@ -33,10 +35,6 @@
3335
from .tls import TLSConfig
3436

3537

36-
if not six.PY3:
37-
import websocket
38-
39-
4038
class Client(requests.Session):
4139
def __init__(self, base_url=None, version=None,
4240
timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False):
@@ -154,9 +152,6 @@ def _attach_params(self, override=None):
154152

155153
@check_resource
156154
def _attach_websocket(self, container, params=None):
157-
if six.PY3:
158-
raise NotImplementedError("This method is not currently supported "
159-
"under python 3")
160155
url = self._url("/containers/{0}/attach/ws".format(container))
161156
req = requests.Request("POST", url, params=self._attach_params(params))
162157
full_url = req.prepare().url

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests==2.5.3
22
six>=1.3.0
3-
websocket-client==0.11.0
3+
websocket-client==0.32.0

requirements3.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
]
1313

1414
if sys.version_info[0] < 3:
15-
requirements.append('websocket-client >= 0.11.0')
15+
requirements.append('websocket-client >= 0.32.0')
1616

1717
exec(open('docker/version.py').read())
1818

0 commit comments

Comments
 (0)