Skip to content

Commit 668af5b

Browse files
authored
Merge pull request #252 from chombourger/issue-251
gevent_zmq: import enums from pyzmq >= 23.0.0
2 parents 9b174c8 + dd6843c commit 668af5b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

zerorpc/gevent_zmq.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
# We want to act like zmq
2828
from zmq import * # noqa
2929

30+
try:
31+
# Try to import enums for pyzmq >= 23.0.0
32+
from zmq.constants import * # noqa
33+
except ImportError:
34+
pass
35+
36+
3037
# Explicit import to please flake8
3138
from zmq import ZMQError
3239

0 commit comments

Comments
 (0)