py37: drop use of 'async' as parameter name
Python 3.7 does not allow the use of 'async' as a parameter name or object attribute; update occurrences to use a different name. This is inline with PEP-492, where await and async are keywords. Change-Id: I73efcafab1e0832a0ada95f6c12cb6a659dfcf27
This commit is contained in:
parent
8a5da2c28f
commit
5626782fac
@ -57,7 +57,7 @@ class DealerPublisherDirect(zmq_dealer_publisher_base.DealerPublisherBase):
|
||||
"""
|
||||
|
||||
def __init__(self, conf, matchmaker):
|
||||
sender = zmq_senders.RequestSenderDirect(conf, async=True)
|
||||
sender = zmq_senders.RequestSenderDirect(conf, use_async=True)
|
||||
receiver = zmq_receivers.ReceiverDirect(conf)
|
||||
super(DealerPublisherDirect, self).__init__(conf, matchmaker,
|
||||
sender, receiver)
|
||||
|
@ -31,9 +31,9 @@ zmq = zmq_async.import_zmq()
|
||||
class SenderBase(object):
|
||||
"""Base request/response sending interface."""
|
||||
|
||||
def __init__(self, conf, async=False):
|
||||
def __init__(self, conf, use_async=False):
|
||||
self.conf = conf
|
||||
self.async = async
|
||||
self.use_async = use_async
|
||||
self._lock = threading.Lock()
|
||||
self._send_versions = zmq_version.get_method_versions(self, 'send')
|
||||
|
||||
@ -156,7 +156,7 @@ class RequestSenderDirect(RequestSenderBase):
|
||||
"msg_version": request.message_version})
|
||||
|
||||
def _send_v_1_0(self, socket, request):
|
||||
flags = zmq.NOBLOCK if self.async else 0
|
||||
flags = zmq.NOBLOCK if self.use_async else 0
|
||||
socket.send(b'', zmq.SNDMORE | flags)
|
||||
socket.send_string('1.0', zmq.SNDMORE | flags)
|
||||
socket.send(six.b(str(request.msg_type)), zmq.SNDMORE | flags)
|
||||
|
Loading…
Reference in New Issue
Block a user