##// END OF EJS Templates
add ioloop.install to backported patches
MinRK -
Show More
@@ -35,13 +35,7 b' import zmq'
35 # Install the pyzmq ioloop. This has to be done before anything else from
35 # Install the pyzmq ioloop. This has to be done before anything else from
36 # tornado is imported.
36 # tornado is imported.
37 from zmq.eventloop import ioloop
37 from zmq.eventloop import ioloop
38 # FIXME: ioloop.install is new in pyzmq-2.1.7, so remove this conditional
39 # when pyzmq dependency is updated beyond that.
40 if hasattr(ioloop, 'install'):
41 ioloop.install()
38 ioloop.install()
42 else:
43 import tornado.ioloop
44 tornado.ioloop.IOLoop = ioloop.IOLoop
45
39
46 from tornado import httpserver
40 from tornado import httpserver
47 from tornado import web
41 from tornado import web
@@ -20,6 +20,17 b' def patch_pyzmq():'
20 """
20 """
21
21
22 import zmq
22 import zmq
23
24 # ioloop.install, introduced in pyzmq 2.1.7
25 from zmq.eventloop import ioloop
26
27 def install():
28 import tornado.ioloop
29 tornado.ioloop.IOLoop = ioloop.IOLoop
30
31 if not hasattr(ioloop, 'install'):
32 ioloop.install = install
33
23 # fix missing DEALER/ROUTER aliases in pyzmq < 2.1.9
34 # fix missing DEALER/ROUTER aliases in pyzmq < 2.1.9
24 if not hasattr(zmq, 'DEALER'):
35 if not hasattr(zmq, 'DEALER'):
25 zmq.DEALER = zmq.XREQ
36 zmq.DEALER = zmq.XREQ
General Comments 0
You need to be logged in to leave comments. Login now