From 6058766de4b717aed7137b70f9384f35231739d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zabielski?= Date: Sat, 3 Mar 2018 06:05:53 +0100 Subject: [PATCH] Remove deprecated PyZMQ call from Python ZMQ example PyZMQ 17.0.0 has deprecated and removed zmq.asyncio.install() call with advice to use asyncio native run-loop instead of zmq specific. This caused exception when running the contrib/zmq/zmq_sub*.py examples. This commit simply follows the advice. --- contrib/zmq/zmq_sub.py | 2 +- contrib/zmq/zmq_sub3.4.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100755 => 100644 contrib/zmq/zmq_sub.py mode change 100755 => 100644 contrib/zmq/zmq_sub3.4.py diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py old mode 100755 new mode 100644 index 6e44c56f5..60768dc59 --- a/contrib/zmq/zmq_sub.py +++ b/contrib/zmq/zmq_sub.py @@ -38,7 +38,7 @@ port = 28332 class ZMQHandler(): def __init__(self): - self.loop = zmq.asyncio.install() + self.loop = asyncio.get_event_loop() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB) diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py old mode 100755 new mode 100644 index 536352d5f..0df843c9a --- a/contrib/zmq/zmq_sub3.4.py +++ b/contrib/zmq/zmq_sub3.4.py @@ -42,7 +42,7 @@ port = 28332 class ZMQHandler(): def __init__(self): - self.loop = zmq.asyncio.install() + self.loop = asyncio.get_event_loop() self.zmqContext = zmq.asyncio.Context() self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)