From 0c55665fd66289e6197d0ec55d427cacb17b3a09 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Sun, 13 Oct 2019 10:29:19 +1300 Subject: [PATCH 1/2] Removing dependency for tornado, use whatever Mopidy provides, fixes #443 --- Dockerfile | 3 ++- setup.py | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e20ed880..0d307262 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stretch-slim +FROM debian:buster-slim RUN set -ex \ # Official Mopidy install for Debian/Ubuntu along with some extensions @@ -13,6 +13,7 @@ RUN set -ex \ gstreamer1.0-plugins-bad \ python-crypto \ python-pykka \ + python-tornado \ git \ && curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add - \ && curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list \ diff --git a/setup.py b/setup.py index 44781caf..95b1b2c4 100755 --- a/setup.py +++ b/setup.py @@ -24,8 +24,7 @@ setup( 'Mopidy >= 2.0', 'Mopidy-Local-Images >= 1.0', 'ConfigObj >= 5.0.6', - 'requests >= 2.0.0', - 'tornado >= 3.2, < 5.0' + 'requests >= 2.0.0' ], classifiers=[ 'Environment :: No Input/Output (Daemon)', From 103bcd5ba4faedf56efba207113bca5bbdc8cd6f Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Sun, 13 Oct 2019 10:51:12 +1300 Subject: [PATCH 2/2] Removing select_subptotocol as it breaks in tornado 5+; Include nano --- Dockerfile | 3 +++ mopidy_iris/handlers.py | 14 -------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0d307262..b3059256 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM debian:buster-slim +COPY . /iris + RUN set -ex \ # Official Mopidy install for Debian/Ubuntu along with some extensions # (see https://docs.mopidy.com/en/latest/installation/debian/ ) @@ -15,6 +17,7 @@ RUN set -ex \ python-pykka \ python-tornado \ git \ + nano \ && curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add - \ && curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list \ && apt-get update \ diff --git a/mopidy_iris/handlers.py b/mopidy_iris/handlers.py index 1fefd786..55e89c46 100755 --- a/mopidy_iris/handlers.py +++ b/mopidy_iris/handlers.py @@ -16,20 +16,6 @@ class WebsocketHandler(tornado.websocket.WebSocketHandler): def check_origin(self, origin): return True - - def select_subprotocol(self, subprotocols): - - # select one of our subprotocol elements and return it. This confirms the connection has been accepted. - protocols = mem.iris.digest_protocol(subprotocols) - - # if we've auto-generated some ids, the provided subprotocols was a string, so just return it right back - # this allows a connection to be completed - if protocols['generated']: - return subprotocols[0] - - # otherwise, just return one of the supplied subprotocols - else: - return protocols['client_id'] def open(self):