aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-06 19:02:57 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-06 19:03:13 +0100
commitd74b01db0c139f4c769ae46ed2950381a64ab30b (patch)
treec06d40d1ee16438e3a5daed34605914439a646f0
parentcff95a63250ecb7d43dd6223b2cba3ce27d802ff (diff)
parent6058766de4b717aed7137b70f9384f35231739d9 (diff)
Merge #12588: [Utils] Remove deprecated PyZMQ call from Python ZMQ example
6058766de Remove deprecated PyZMQ call from Python ZMQ example (MichaƂ Zabielski) Pull request description: 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 and fixes mentioned examples. Tree-SHA512: af357aafa5eb9506cfa3f513f06979bbc49f6132fddc1e96fbcea175da4f8e2ea298be7c7055e7d3377f0814364e13bb88b5c195f6a07898cd28c341d23a93c5
-rw-r--r--[-rwxr-xr-x]contrib/zmq/zmq_sub.py2
-rw-r--r--[-rwxr-xr-x]contrib/zmq/zmq_sub3.4.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
index 6e44c56f52..60768dc59a 100755..100644
--- 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
index 536352d5ff..0df843c9a3 100755..100644
--- 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)