diff --git a/autobahn/asyncio/wamp.py b/autobahn/asyncio/wamp.py index 6c8e92b3..45eb2ab1 100644 --- a/autobahn/asyncio/wamp.py +++ b/autobahn/asyncio/wamp.py @@ -79,7 +79,7 @@ class ApplicationRunner(object): """ def __init__(self, url, realm, extra=None, serializers=None, - debug=False, debug_wamp=False, debug_app=False, + debug=False, debug_app=False, ssl=None): """ :param url: The WebSocket URL of the WAMP router to connect to (e.g. `ws://somehost.com:8090/somepath`) @@ -98,9 +98,6 @@ class ApplicationRunner(object): :param debug: Turn on low-level debugging. :type debug: bool - :param debug_wamp: Turn on WAMP-level debugging. - :type debug_wamp: bool - :param debug_app: Turn on app-level debugging. :type debug_app: bool @@ -118,7 +115,6 @@ class ApplicationRunner(object): self.extra = extra or dict() self.serializers = serializers self.debug = debug - self.debug_wamp = debug_wamp self.debug_app = debug_app self.ssl = ssl @@ -157,7 +153,7 @@ class ApplicationRunner(object): # 2) create a WAMP-over-WebSocket transport client factory transport_factory = WampWebSocketClientFactory(create, url=self.url, serializers=self.serializers, - debug=self.debug, debug_wamp=self.debug_wamp) + debug=self.debug) # 3) start the client loop = asyncio.get_event_loop() diff --git a/autobahn/asyncio/websocket.py b/autobahn/asyncio/websocket.py index 15067344..7619335d 100644 --- a/autobahn/asyncio/websocket.py +++ b/autobahn/asyncio/websocket.py @@ -288,9 +288,8 @@ class WampWebSocketServerFactory(websocket.WampWebSocketServerFactory, WebSocket def __init__(self, factory, *args, **kwargs): serializers = kwargs.pop('serializers', None) - debug_wamp = kwargs.pop('debug_wamp', False) - websocket.WampWebSocketServerFactory.__init__(self, factory, serializers, debug_wamp=debug_wamp) + websocket.WampWebSocketServerFactory.__init__(self, factory, serializers) kwargs['protocols'] = self._protocols @@ -314,9 +313,8 @@ class WampWebSocketClientFactory(websocket.WampWebSocketClientFactory, WebSocket def __init__(self, factory, *args, **kwargs): serializers = kwargs.pop('serializers', None) - debug_wamp = kwargs.pop('debug_wamp', False) - websocket.WampWebSocketClientFactory.__init__(self, factory, serializers, debug_wamp=debug_wamp) + websocket.WampWebSocketClientFactory.__init__(self, factory, serializers) kwargs['protocols'] = self._protocols diff --git a/autobahn/twisted/wamp.py b/autobahn/twisted/wamp.py index bbdb2770..4151cb6b 100644 --- a/autobahn/twisted/wamp.py +++ b/autobahn/twisted/wamp.py @@ -92,7 +92,7 @@ class ApplicationRunner(object): log = txaio.make_logger() def __init__(self, url, realm, extra=None, serializers=None, - debug=False, debug_wamp=False, debug_app=False, + debug=False, debug_app=False, ssl=None, proxy=None): """ @@ -112,9 +112,6 @@ class ApplicationRunner(object): :param debug: Turn on low-level debugging. :type debug: bool - :param debug_wamp: Turn on WAMP-level debugging. - :type debug_wamp: bool - :param debug_app: Turn on app-level debugging. :type debug_app: bool @@ -139,7 +136,6 @@ class ApplicationRunner(object): self.extra = extra or dict() self.serializers = serializers self.debug = debug - self.debug_wamp = debug_wamp self.debug_app = debug_app self.ssl = ssl self.proxy = proxy @@ -172,7 +168,7 @@ class ApplicationRunner(object): txaio.use_twisted() txaio.config.loop = reactor - if self.debug or self.debug_wamp or self.debug_app: + if self.debug or self.debug_app: txaio.start_logging(level='debug') else: txaio.start_logging(level='info') @@ -199,7 +195,7 @@ class ApplicationRunner(object): # create a WAMP-over-WebSocket transport client factory transport_factory = WampWebSocketClientFactory(create, url=self.url, serializers=self.serializers, - proxy=self.proxy, debug=self.debug, debug_wamp=self.debug_wamp) + proxy=self.proxy, debug=self.debug) # supress pointless log noise like # "Starting factory "" @@ -381,7 +377,7 @@ class Application(object): return self.session def run(self, url=u"ws://localhost:8080/ws", realm=u"realm1", - debug=False, debug_wamp=False, debug_app=False, + debug=False, debug_app=False, start_reactor=True): """ Run the application. @@ -392,13 +388,11 @@ class Application(object): :type realm: unicode :param debug: Turn on low-level debugging. :type debug: bool - :param debug_wamp: Turn on WAMP-level debugging. - :type debug_wamp: bool :param debug_app: Turn on app-level debugging. :type debug_app: bool """ runner = ApplicationRunner(url, realm, - debug=debug, debug_wamp=debug_wamp, debug_app=debug_app) + debug=debug, debug_app=debug_app) runner.run(self.__call__, start_reactor) def register(self, uri=None): @@ -570,7 +564,7 @@ if service: factory = WampWebSocketClientFactory def __init__(self, url, realm, make, extra=None, context_factory=None, - debug=False, debug_wamp=False, debug_app=False): + debug=False, debug_app=False): """ :param url: The WebSocket URL of the WAMP router to connect to (e.g. `ws://somehost.com:8090/somepath`) @@ -593,9 +587,6 @@ if service: :param debug: Turn on low-level debugging. :type debug: bool - :param debug_wamp: Turn on WAMP-level debugging. - :type debug_wamp: bool - :param debug_app: Turn on app-level debugging. :type debug_app: bool @@ -606,7 +597,6 @@ if service: self.realm = realm self.extra = extra or dict() self.debug = debug - self.debug_wamp = debug_wamp self.debug_app = debug_app self.make = make self.context_factory = context_factory @@ -627,8 +617,7 @@ if service: return session # create a WAMP-over-WebSocket transport client factory - transport_factory = self.factory(create, url=self.url, - debug=self.debug, debug_wamp=self.debug_wamp) + transport_factory = self.factory(create, url=self.url, debug=self.debug) # setup the client from a Twisted endpoint diff --git a/autobahn/twisted/websocket.py b/autobahn/twisted/websocket.py index 2e6206d1..6a17edba 100644 --- a/autobahn/twisted/websocket.py +++ b/autobahn/twisted/websocket.py @@ -590,9 +590,8 @@ class WampWebSocketServerFactory(websocket.WampWebSocketServerFactory, WebSocket def __init__(self, factory, *args, **kwargs): serializers = kwargs.pop('serializers', None) - debug_wamp = kwargs.pop('debug_wamp', False) - websocket.WampWebSocketServerFactory.__init__(self, factory, serializers, debug_wamp=debug_wamp) + websocket.WampWebSocketServerFactory.__init__(self, factory, serializers) kwargs['protocols'] = self._protocols @@ -616,9 +615,8 @@ class WampWebSocketClientFactory(websocket.WampWebSocketClientFactory, WebSocket def __init__(self, factory, *args, **kwargs): serializers = kwargs.pop('serializers', None) - debug_wamp = kwargs.pop('debug_wamp', False) - websocket.WampWebSocketClientFactory.__init__(self, factory, serializers, debug_wamp=debug_wamp) + websocket.WampWebSocketClientFactory.__init__(self, factory, serializers) kwargs['protocols'] = self._protocols diff --git a/autobahn/wamp/message.py b/autobahn/wamp/message.py index b2fd47fa..bc238da6 100644 --- a/autobahn/wamp/message.py +++ b/autobahn/wamp/message.py @@ -431,7 +431,7 @@ class Hello(Message): """ Return a string representation of this message. """ - return "WAMP HELLO Message (realm = {0}, roles = {1}, authmethods = {2}, authid = {3}, authrole = {4}, authextra = {5})".format(self.realm, self.roles, self.authmethods, self.authid, self.authrole, self.authextra) + return u"Hello(realm={0}, roles={1}, authmethods={2}, authid={3}, authrole={4}, authextra={5})".format(self.realm, self.roles, self.authmethods, self.authid, self.authrole, self.authextra) class Welcome(Message): @@ -603,7 +603,7 @@ class Welcome(Message): """ Returns string representation of this message. """ - return "WAMP WELCOME Message (session = {0}, roles = {1}, realm = {2}, authid = {3}, authrole = {4}, authmethod = {5}, authprovider = {6}, authextra = {7})".format(self.session, self.roles, self.realm, self.authid, self.authrole, self.authmethod, self.authprovider, self.authextra) + return u"Welcome(session={0}, roles={1}, realm={2}, authid={3}, authrole={4}, authmethod={5}, authprovider={6}, authextra={7})".format(self.session, self.roles, self.realm, self.authid, self.authrole, self.authmethod, self.authprovider, self.authextra) class Abort(Message): @@ -683,7 +683,7 @@ class Abort(Message): """ Returns string representation of this message. """ - return "WAMP ABORT Message (message = {0}, reason = {1})".format(self.message, self.reason) + return u"Abort(message={0}, reason={1})".format(self.message, self.reason) class Challenge(Message): @@ -752,7 +752,7 @@ class Challenge(Message): """ Returns string representation of this message. """ - return "WAMP CHALLENGE Message (method = {0}, extra = {1})".format(self.method, self.extra) + return u"Challenge(method={0}, extra={1})".format(self.method, self.extra) class Authenticate(Message): @@ -821,7 +821,7 @@ class Authenticate(Message): """ Returns string representation of this message. """ - return "WAMP AUTHENTICATE Message (signature = {0}, extra = {1})".format(self.signature, self.extra) + return u"Authenticate(signature={0}, extra={1})".format(self.signature, self.extra) class Goodbye(Message): @@ -906,7 +906,7 @@ class Goodbye(Message): """ Returns string representation of this message. """ - return "WAMP GOODBYE Message (message = {0}, reason = {1})".format(self.message, self.reason) + return u"Goodbye(message={0}, reason={1})".format(self.message, self.reason) class Error(Message): @@ -1080,7 +1080,7 @@ class Error(Message): """ Returns string representation of this message. """ - return "WAMP ERROR Message (request_type = {0}, request = {1}, error = {2}, args = {3}, kwargs = {4}, enc_algo = {5}, enc_key = {6}, enc_serializer = {7}, payload = {8})".format(self.request_type, self.request, self.error, self.args, self.kwargs, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Error(request_type={0}, request={1}, error={2}, args={3}, kwargs={4}, enc_algo={5}, enc_key={6}, enc_serializer={7}, payload={8})".format(self.request_type, self.request, self.error, self.args, self.kwargs, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Publish(Message): @@ -1349,7 +1349,7 @@ class Publish(Message): """ Returns string representation of this message. """ - return "WAMP PUBLISH Message (request = {0}, topic = {1}, args = {2}, kwargs = {3}, acknowledge = {4}, exclude_me = {5}, exclude = {6}, eligible = {7}, disclose_me = {8}, enc_algo = {9}, enc_key = {10}, enc_serializer = {11}, payload = {12})".format(self.request, self.topic, self.args, self.kwargs, self.acknowledge, self.exclude_me, self.exclude, self.eligible, self.disclose_me, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Publish(request={0}, topic={1}, args={2}, kwargs={3}, acknowledge={4}, exclude_me={5}, exclude={6}, eligible={7}, disclose_me={8}, enc_algo={9}, enc_key={10}, enc_serializer={11}, payload={12})".format(self.request, self.topic, self.args, self.kwargs, self.acknowledge, self.exclude_me, self.exclude, self.eligible, self.disclose_me, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Published(Message): @@ -1415,7 +1415,7 @@ class Published(Message): """ Returns string representation of this message. """ - return "WAMP PUBLISHED Message (request = {0}, publication = {1})".format(self.request, self.publication) + return u"Published(request={0}, publication={1})".format(self.request, self.publication) class Subscribe(Message): @@ -1509,7 +1509,7 @@ class Subscribe(Message): """ Returns string representation of this message. """ - return "WAMP SUBSCRIBE Message (request = {0}, topic = {1}, match = {2})".format(self.request, self.topic, self.match) + return u"Subscribe(request={0}, topic={1}, match={2})".format(self.request, self.topic, self.match) class Subscribed(Message): @@ -1575,7 +1575,7 @@ class Subscribed(Message): """ Returns string representation of this message. """ - return "WAMP SUBSCRIBED Message (request = {0}, subscription = {1})".format(self.request, self.subscription) + return u"Subscribed(request={0}, subscription={1})".format(self.request, self.subscription) class Unsubscribe(Message): @@ -1641,7 +1641,7 @@ class Unsubscribe(Message): """ Returns string representation of this message. """ - return "WAMP UNSUBSCRIBE Message (request = {0}, subscription = {1})".format(self.request, self.subscription) + return u"Unsubscribe(request={0}, subscription={1})".format(self.request, self.subscription) class Unsubscribed(Message): @@ -1740,7 +1740,7 @@ class Unsubscribed(Message): """ Returns string representation of this message. """ - return "WAMP UNSUBSCRIBED Message (request = {0}, reason = {1}, subscription = {2})".format(self.request, self.reason, self.subscription) + return u"Unsubscribed(request={0}, reason={1}, subscription={2})".format(self.request, self.reason, self.subscription) class Event(Message): @@ -1936,7 +1936,7 @@ class Event(Message): """ Returns string representation of this message. """ - return "WAMP EVENT Message (subscription = {0}, publication = {1}, args = {2}, kwargs = {3}, publisher = {4}, topic = {5}, enc_algo = {6}, enc_key = {7}, enc_serializer = {8}, payload = {9})".format(self.subscription, self.publication, self.args, self.kwargs, self.publisher, self.topic, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Event(subscription={0}, publication={1}, args={2}, kwargs={3}, publisher={4}, topic={5}, enc_algo={6}, enc_key={7}, enc_serializer={8}, payload={9})".format(self.subscription, self.publication, self.args, self.kwargs, self.publisher, self.topic, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Call(Message): @@ -2165,7 +2165,7 @@ class Call(Message): """ Returns string representation of this message. """ - return "WAMP CALL Message (request = {0}, procedure = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, disclose_me = {6}, enc_algo = {7}, enc_key = {8}, enc_serializer = {9}, payload = {10})".format(self.request, self.procedure, self.args, self.kwargs, self.timeout, self.receive_progress, self.disclose_me, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Call(request={0}, procedure={1}, args={2}, kwargs={3}, timeout={4}, receive_progress={5}, disclose_me={6}, enc_algo={7}, enc_key={8}, enc_serializer={9}, payload={10})".format(self.request, self.procedure, self.args, self.kwargs, self.timeout, self.receive_progress, self.disclose_me, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Cancel(Message): @@ -2256,7 +2256,7 @@ class Cancel(Message): """ Returns string representation of this message. """ - return "WAMP CANCEL Message (request = {0}, mode = '{1}'')".format(self.request, self.mode) + return u"Cancel(request={0}, mode={1})".format(self.request, self.mode) class Result(Message): @@ -2431,7 +2431,7 @@ class Result(Message): """ Returns string representation of this message. """ - return "WAMP RESULT Message (request = {0}, args = {1}, kwargs = {2}, progress = {3}, enc_algo = {4}, enc_key = {5}, enc_serializer = {6}, payload = {7})".format(self.request, self.args, self.kwargs, self.progress, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Result(request={0}, args={1}, kwargs={2}, progress={3}, enc_algo={4}, enc_key={5}, enc_serializer={6}, payload={7})".format(self.request, self.args, self.kwargs, self.progress, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Register(Message): @@ -2568,7 +2568,7 @@ class Register(Message): """ Returns string representation of this message. """ - return "WAMP REGISTER Message (request = {0}, procedure = {1}, match = {2}, invoke = {3})".format(self.request, self.procedure, self.match, self.invoke) + return u"Register(request={0}, procedure={1}, match={2}, invoke={3})".format(self.request, self.procedure, self.match, self.invoke) class Registered(Message): @@ -2634,7 +2634,7 @@ class Registered(Message): """ Returns string representation of this message. """ - return "WAMP REGISTERED Message (request = {0}, registration = {1})".format(self.request, self.registration) + return u"Registered(request={0}, registration={1})".format(self.request, self.registration) class Unregister(Message): @@ -2700,7 +2700,7 @@ class Unregister(Message): """ Returns string representation of this message. """ - return "WAMP UNREGISTER Message (request = {0}, registration = {1})".format(self.request, self.registration) + return u"Unregister(request={0}, registration={1})".format(self.request, self.registration) class Unregistered(Message): @@ -2798,7 +2798,7 @@ class Unregistered(Message): """ Returns string representation of this message. """ - return "WAMP UNREGISTERED Message (request = {0}, reason = {1}, registration = {2})".format(self.request, self.reason, self.registration) + return u"Unregistered(request={0}, reason={1}, registration={2})".format(self.request, self.reason, self.registration) class Invocation(Message): @@ -3044,7 +3044,7 @@ class Invocation(Message): """ Returns string representation of this message. """ - return "WAMP INVOCATION Message (request = {0}, registration = {1}, args = {2}, kwargs = {3}, timeout = {4}, receive_progress = {5}, caller = {6}, procedure = {7}, enc_algo = {8}, enc_key = {9}, enc_serializer = {10}, payload = {11})".format(self.request, self.registration, self.args, self.kwargs, self.timeout, self.receive_progress, self.caller, self.procedure, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Invocation(request={0}, registration={1}, args={2}, kwargs={3}, timeout={4}, receive_progress={5}, caller={6}, procedure={7}, enc_algo={8}, enc_key={9}, enc_serializer={10}, payload={11})".format(self.request, self.registration, self.args, self.kwargs, self.timeout, self.receive_progress, self.caller, self.procedure, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) class Interrupt(Message): @@ -3134,7 +3134,7 @@ class Interrupt(Message): """ Returns string representation of this message. """ - return "WAMP INTERRUPT Message (request = {0}, mode = '{1}')".format(self.request, self.mode) + return u"Interrupt(request={0}, mode={1})".format(self.request, self.mode) class Yield(Message): @@ -3309,4 +3309,4 @@ class Yield(Message): """ Returns string representation of this message. """ - return "WAMP YIELD Message (request = {0}, args = {1}, kwargs = {2}, progress = {3}, enc_algo = {4}, enc_key = {5}, enc_serializer = {6}, payload = {7})".format(self.request, self.args, self.kwargs, self.progress, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) + return u"Yield(request={0}, args={1}, kwargs={2}, progress={3}, enc_algo={4}, enc_key={5}, enc_serializer={6}, payload={7})".format(self.request, self.args, self.kwargs, self.progress, self.enc_algo, self.enc_key, self.enc_serializer, b2a(self.payload)) diff --git a/autobahn/wamp/test/test_component.py b/autobahn/wamp/test/test_component.py index 6dd403e7..592f9ca5 100644 --- a/autobahn/wamp/test/test_component.py +++ b/autobahn/wamp/test/test_component.py @@ -207,7 +207,6 @@ if os.environ.get('USE_TWISTED', False): realm=self.realm, make=component, debug=bool(os.environ.get('debug_websocket', False)), - debug_wamp=bool(os.environ.get('debug_lowlevel', False)), debug_app=bool(os.environ.get('debug_app', False)) ) c.setServiceParent(app) diff --git a/autobahn/wamp/websocket.py b/autobahn/wamp/websocket.py index 29e38d12..441a9fd6 100644 --- a/autobahn/wamp/websocket.py +++ b/autobahn/wamp/websocket.py @@ -47,8 +47,7 @@ class WampWebSocketProtocol(object): _session = None # default; self.session is set in onOpen def _bailout(self, code, reason=None): - if self.factory.debug_wamp: - print("Failing WAMP-over-WebSocket transport: code = {0}, reason = '{1}'".format(code, reason)) + self.log.debug('Failing WAMP-over-WebSocket transport: code={code}, reason="{reason}"', code=code, reason=reason) self.failConnection(code, reason) def onOpen(self): @@ -62,8 +61,7 @@ class WampWebSocketProtocol(object): self._session.onOpen(self) except Exception as e: self.log.critical(traceback.format_exc()) - # Exceptions raised in onOpen are fatal .. - reason = "WAMP Internal Error ({0})".format(e) + reason = u'WAMP Internal Error ({0})'.format(e) self._bailout(protocol.WebSocketProtocol.CLOSE_STATUS_CODE_INTERNAL_ERROR, reason=reason) def onClose(self, wasClean, code, reason): @@ -76,12 +74,10 @@ class WampWebSocketProtocol(object): # session close callback # noinspection PyBroadException try: - if self.factory.debug_wamp: - print("WAMP-over-WebSocket transport lost: wasClean = {0}, code = {1}, reason = '{2}'".format(wasClean, code, reason)) + self.log.debug('WAMP-over-WebSocket transport lost: wasClean={wasClean}, code={code}, reason="{reason}"', wasClean=wasClean, code=code, reason=reason) self._session.onClose(wasClean) except Exception: - print("Error invoking onClose():") - traceback.print_exc() + self.log.critical(traceback.format_exc()) self._session = None def onMessage(self, payload, isBinary): @@ -90,20 +86,17 @@ class WampWebSocketProtocol(object): """ try: for msg in self._serializer.unserialize(payload, isBinary): - if self.factory.debug_wamp: - print("RX {0}".format(msg)) + self.log.trace("WAMP RECV: message={message}, session={session}, authid={authid}", authid=self._session._authid, session=self._session._session_id, message=msg) self._session.onMessage(msg) except ProtocolError as e: - print(e) - if self.factory.debug_wamp: - traceback.print_exc() - reason = "WAMP Protocol Error ({0})".format(e) + self.log.critical(traceback.format_exc()) + reason = u'WAMP Protocol Error ({0})'.format(e) self._bailout(protocol.WebSocketProtocol.CLOSE_STATUS_CODE_PROTOCOL_ERROR, reason=reason) except Exception as e: self.log.critical(traceback.format_exc()) - reason = "WAMP Internal Error ({0})".format(e) + reason = u'WAMP Internal Error ({0})'.format(e) self._bailout(protocol.WebSocketProtocol.CLOSE_STATUS_CODE_INTERNAL_ERROR, reason=reason) def send(self, msg): @@ -112,13 +105,12 @@ class WampWebSocketProtocol(object): """ if self.isOpen(): try: - if self.factory.debug_wamp: - print("TX {0}".format(msg)) + self.log.trace("WAMP SEND: message={message}, session={session}, authid={authid}", authid=self._session._authid, session=self._session._session_id, message=msg) payload, isBinary = self._serializer.serialize(msg) except Exception as e: - self.log.failure("Serialization failure") + self.log.failure("WAMP message serialization error") # all exceptions raised from above should be serialization errors .. - raise SerializationError("WAMP serialization error ({0})".format(e)) + raise SerializationError(u"WAMP message serialization error: {0}".format(e)) else: self.sendMessage(payload, isBinary) else: @@ -154,11 +146,11 @@ ITransport.register(WampWebSocketProtocol) def parseSubprotocolIdentifier(subprotocol): try: - s = subprotocol.split('.') - if s[0] != "wamp": - raise Exception("invalid protocol %s" % s[0]) + s = subprotocol.split(u'.') + if s[0] != u'wamp': + raise Exception(u'WAMP WebSocket subprotocol identifier must start with "wamp", not "{}"'.format(s[0])) version = int(s[1]) - serializerId = '.'.join(s[2:]) + serializerId = u'.'.join(s[2:]) return version, serializerId except: return None, None @@ -183,10 +175,10 @@ class WampWebSocketServerProtocol(WampWebSocketProtocol): return subprotocol, headers if self.STRICT_PROTOCOL_NEGOTIATION: - raise ConnectionDeny(ConnectionDeny.BAD_REQUEST, u'This server only speaks WebSocket subprotocols {0}'.format(u', '.join(self.factory.protocols))) + raise ConnectionDeny(ConnectionDeny.BAD_REQUEST, u'This server only speaks WebSocket subprotocols {}'.format(u', '.join(self.factory.protocols))) else: # assume wamp.2.json - self._serializer = self.factory._serializers['json'] + self._serializer = self.factory._serializers[u'json'] return None, headers @@ -203,10 +195,10 @@ class WampWebSocketClientProtocol(WampWebSocketProtocol): """ if response.protocol not in self.factory.protocols: if self.STRICT_PROTOCOL_NEGOTIATION: - raise Exception("Server does not speak any of the WebSocket subprotocols we requested (%s)." % ', '.join(self.factory.protocols)) + raise Exception(u'The server does not speak any of the WebSocket subprotocols {} we requested.'.format(u', '.join(self.factory.protocols))) else: # assume wamp.2.json - serializerId = 'json' + serializerId = u'json' else: version, serializerId = parseSubprotocolIdentifier(response.protocol) @@ -218,7 +210,7 @@ class WampWebSocketFactory(object): Base class for WAMP-over-WebSocket transport factory mixins. """ - def __init__(self, factory, serializers=None, debug_wamp=False): + def __init__(self, factory, serializers=None): """ Ctor. @@ -230,11 +222,10 @@ class WampWebSocketFactory(object): :class:`autobahn.wamp.interfaces.ISerializer`. :type serializers: list """ - assert(callable(factory)) + if not callable(factory): + raise Exception(u'factory must be a callable') self._factory = factory - self.debug_wamp = debug_wamp - if serializers is None: serializers = [] @@ -263,13 +254,13 @@ class WampWebSocketFactory(object): pass if not serializers: - raise Exception("could not import any WAMP serializers") + raise Exception(u'Could not import any WAMP serializer') self._serializers = {} for ser in serializers: self._serializers[ser.SERIALIZER_ID] = ser - self._protocols = ["wamp.2.%s" % ser.SERIALIZER_ID for ser in serializers] + self._protocols = [u'wamp.2.{}'.format(ser.SERIALIZER_ID) for ser in serializers] class WampWebSocketServerFactory(WampWebSocketFactory): diff --git a/examples/asyncio/wamp/overview/backend.py b/examples/asyncio/wamp/overview/backend.py index fe4297b4..25ef3735 100644 --- a/examples/asyncio/wamp/overview/backend.py +++ b/examples/asyncio/wamp/overview/backend.py @@ -24,7 +24,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(MyComponent) diff --git a/examples/asyncio/wamp/overview/frontend.py b/examples/asyncio/wamp/overview/frontend.py index 756134c6..ec7eaa82 100644 --- a/examples/asyncio/wamp/overview/frontend.py +++ b/examples/asyncio/wamp/overview/frontend.py @@ -21,7 +21,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(MyComponent) diff --git a/examples/asyncio/wamp/pubsub/basic/backend.py b/examples/asyncio/wamp/pubsub/basic/backend.py index 76845844..57bc9a81 100644 --- a/examples/asyncio/wamp/pubsub/basic/backend.py +++ b/examples/asyncio/wamp/pubsub/basic/backend.py @@ -53,7 +53,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/basic/frontend.py b/examples/asyncio/wamp/pubsub/basic/frontend.py index c2eb78ea..1aca138b 100644 --- a/examples/asyncio/wamp/pubsub/basic/frontend.py +++ b/examples/asyncio/wamp/pubsub/basic/frontend.py @@ -61,7 +61,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/complex/backend.py b/examples/asyncio/wamp/pubsub/complex/backend.py index 7857b0c7..3f7b38ea 100644 --- a/examples/asyncio/wamp/pubsub/complex/backend.py +++ b/examples/asyncio/wamp/pubsub/complex/backend.py @@ -62,7 +62,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/complex/frontend.py b/examples/asyncio/wamp/pubsub/complex/frontend.py index 948e1797..12d40c94 100644 --- a/examples/asyncio/wamp/pubsub/complex/frontend.py +++ b/examples/asyncio/wamp/pubsub/complex/frontend.py @@ -66,7 +66,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/decorators/backend.py b/examples/asyncio/wamp/pubsub/decorators/backend.py index 29d463a0..156ee689 100644 --- a/examples/asyncio/wamp/pubsub/decorators/backend.py +++ b/examples/asyncio/wamp/pubsub/decorators/backend.py @@ -57,7 +57,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/decorators/frontend.py b/examples/asyncio/wamp/pubsub/decorators/frontend.py index bec0c0fd..b0862e6c 100644 --- a/examples/asyncio/wamp/pubsub/decorators/frontend.py +++ b/examples/asyncio/wamp/pubsub/decorators/frontend.py @@ -76,7 +76,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/options/backend.py b/examples/asyncio/wamp/pubsub/options/backend.py index 9d69a2ea..44e7ac1e 100644 --- a/examples/asyncio/wamp/pubsub/options/backend.py +++ b/examples/asyncio/wamp/pubsub/options/backend.py @@ -62,7 +62,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/options/frontend.py b/examples/asyncio/wamp/pubsub/options/frontend.py index 6dc8c73c..00239d26 100644 --- a/examples/asyncio/wamp/pubsub/options/frontend.py +++ b/examples/asyncio/wamp/pubsub/options/frontend.py @@ -63,7 +63,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/tls/backend_selfsigned.py b/examples/asyncio/wamp/pubsub/tls/backend_selfsigned.py index 6f42f357..ef3ffb6a 100644 --- a/examples/asyncio/wamp/pubsub/tls/backend_selfsigned.py +++ b/examples/asyncio/wamp/pubsub/tls/backend_selfsigned.py @@ -63,7 +63,7 @@ if __name__ == '__main__': environ.get("AUTOBAHN_DEMO_ROUTER", u"wss://127.0.0.1:8083/ws"), u"crossbardemo", ssl=options, # try removing this, but still use self-signed cert - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/pubsub/unsubscribe/frontend.py b/examples/asyncio/wamp/pubsub/unsubscribe/frontend.py index df31419c..00464595 100644 --- a/examples/asyncio/wamp/pubsub/unsubscribe/frontend.py +++ b/examples/asyncio/wamp/pubsub/unsubscribe/frontend.py @@ -78,7 +78,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/arguments/backend.py b/examples/asyncio/wamp/rpc/arguments/backend.py index a1a74ff8..ca49ed2e 100644 --- a/examples/asyncio/wamp/rpc/arguments/backend.py +++ b/examples/asyncio/wamp/rpc/arguments/backend.py @@ -71,7 +71,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/arguments/frontend.py b/examples/asyncio/wamp/rpc/arguments/frontend.py index dbad7dd1..ef44b326 100644 --- a/examples/asyncio/wamp/rpc/arguments/frontend.py +++ b/examples/asyncio/wamp/rpc/arguments/frontend.py @@ -88,7 +88,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/complex/backend.py b/examples/asyncio/wamp/rpc/complex/backend.py index 065491da..e7d01394 100644 --- a/examples/asyncio/wamp/rpc/complex/backend.py +++ b/examples/asyncio/wamp/rpc/complex/backend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/complex/frontend.py b/examples/asyncio/wamp/rpc/complex/frontend.py index 968bd965..f1184b40 100644 --- a/examples/asyncio/wamp/rpc/complex/frontend.py +++ b/examples/asyncio/wamp/rpc/complex/frontend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/decorators/backend.py b/examples/asyncio/wamp/rpc/decorators/backend.py index 34ac08b4..ef16a95a 100644 --- a/examples/asyncio/wamp/rpc/decorators/backend.py +++ b/examples/asyncio/wamp/rpc/decorators/backend.py @@ -77,7 +77,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/decorators/frontend.py b/examples/asyncio/wamp/rpc/decorators/frontend.py index 58d9928a..bd2f9a6e 100644 --- a/examples/asyncio/wamp/rpc/decorators/frontend.py +++ b/examples/asyncio/wamp/rpc/decorators/frontend.py @@ -63,7 +63,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/errors/backend.py b/examples/asyncio/wamp/rpc/errors/backend.py index b9d65a94..3dc5175c 100644 --- a/examples/asyncio/wamp/rpc/errors/backend.py +++ b/examples/asyncio/wamp/rpc/errors/backend.py @@ -96,7 +96,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/errors/frontend.py b/examples/asyncio/wamp/rpc/errors/frontend.py index 07144087..0e2258ad 100644 --- a/examples/asyncio/wamp/rpc/errors/frontend.py +++ b/examples/asyncio/wamp/rpc/errors/frontend.py @@ -93,7 +93,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/options/backend.py b/examples/asyncio/wamp/rpc/options/backend.py index eb23bf71..93c3b0c7 100644 --- a/examples/asyncio/wamp/rpc/options/backend.py +++ b/examples/asyncio/wamp/rpc/options/backend.py @@ -64,7 +64,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/options/frontend.py b/examples/asyncio/wamp/rpc/options/frontend.py index 630526c7..98b719dd 100644 --- a/examples/asyncio/wamp/rpc/options/frontend.py +++ b/examples/asyncio/wamp/rpc/options/frontend.py @@ -62,7 +62,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/progress/backend.py b/examples/asyncio/wamp/rpc/progress/backend.py index fa7b0464..8e29b880 100644 --- a/examples/asyncio/wamp/rpc/progress/backend.py +++ b/examples/asyncio/wamp/rpc/progress/backend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/progress/frontend.py b/examples/asyncio/wamp/rpc/progress/frontend.py index a550dd62..3c706db6 100644 --- a/examples/asyncio/wamp/rpc/progress/frontend.py +++ b/examples/asyncio/wamp/rpc/progress/frontend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/slowsquare/backend.py b/examples/asyncio/wamp/rpc/slowsquare/backend.py index 31b5b44e..962eab69 100644 --- a/examples/asyncio/wamp/rpc/slowsquare/backend.py +++ b/examples/asyncio/wamp/rpc/slowsquare/backend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/slowsquare/frontend.py b/examples/asyncio/wamp/rpc/slowsquare/frontend.py index 40e9a6a5..8d1bdbb1 100644 --- a/examples/asyncio/wamp/rpc/slowsquare/frontend.py +++ b/examples/asyncio/wamp/rpc/slowsquare/frontend.py @@ -71,7 +71,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/timeservice/backend.py b/examples/asyncio/wamp/rpc/timeservice/backend.py index 2a636819..d587ff24 100644 --- a/examples/asyncio/wamp/rpc/timeservice/backend.py +++ b/examples/asyncio/wamp/rpc/timeservice/backend.py @@ -55,7 +55,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/asyncio/wamp/rpc/timeservice/frontend.py b/examples/asyncio/wamp/rpc/timeservice/frontend.py index b6493f66..828963e5 100644 --- a/examples/asyncio/wamp/rpc/timeservice/frontend.py +++ b/examples/asyncio/wamp/rpc/timeservice/frontend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/app/calculator/calculator.py b/examples/twisted/wamp/app/calculator/calculator.py index d1e4ec3f..64fed6d9 100644 --- a/examples/twisted/wamp/app/calculator/calculator.py +++ b/examples/twisted/wamp/app/calculator/calculator.py @@ -105,7 +105,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Calculator) diff --git a/examples/twisted/wamp/overview/backend.py b/examples/twisted/wamp/overview/backend.py index ad5683ec..e38b6c9e 100644 --- a/examples/twisted/wamp/overview/backend.py +++ b/examples/twisted/wamp/overview/backend.py @@ -26,7 +26,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(MyComponent) diff --git a/examples/twisted/wamp/overview/frontend.py b/examples/twisted/wamp/overview/frontend.py index 26106c72..a5ccae69 100644 --- a/examples/twisted/wamp/overview/frontend.py +++ b/examples/twisted/wamp/overview/frontend.py @@ -22,7 +22,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(MyComponent) diff --git a/examples/twisted/wamp/pubsub/basic/backend.py b/examples/twisted/wamp/pubsub/basic/backend.py index ad667f7c..236327c0 100644 --- a/examples/twisted/wamp/pubsub/basic/backend.py +++ b/examples/twisted/wamp/pubsub/basic/backend.py @@ -53,7 +53,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/basic/frontend.py b/examples/twisted/wamp/pubsub/basic/frontend.py index 6c4d5588..e555afe2 100644 --- a/examples/twisted/wamp/pubsub/basic/frontend.py +++ b/examples/twisted/wamp/pubsub/basic/frontend.py @@ -67,7 +67,7 @@ if __name__ == '__main__': extra=dict( max_events=5, # [A] pass in additional configuration ), - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/complex/backend.py b/examples/twisted/wamp/pubsub/complex/backend.py index 896c3602..39397965 100644 --- a/examples/twisted/wamp/pubsub/complex/backend.py +++ b/examples/twisted/wamp/pubsub/complex/backend.py @@ -63,7 +63,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/complex/frontend.py b/examples/twisted/wamp/pubsub/complex/frontend.py index 49301942..fca7e619 100644 --- a/examples/twisted/wamp/pubsub/complex/frontend.py +++ b/examples/twisted/wamp/pubsub/complex/frontend.py @@ -70,7 +70,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/decorators/backend.py b/examples/twisted/wamp/pubsub/decorators/backend.py index b17a8409..7cb51884 100644 --- a/examples/twisted/wamp/pubsub/decorators/backend.py +++ b/examples/twisted/wamp/pubsub/decorators/backend.py @@ -58,7 +58,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/decorators/frontend.py b/examples/twisted/wamp/pubsub/decorators/frontend.py index 112f98cd..7c223880 100644 --- a/examples/twisted/wamp/pubsub/decorators/frontend.py +++ b/examples/twisted/wamp/pubsub/decorators/frontend.py @@ -72,7 +72,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/options/backend.py b/examples/twisted/wamp/pubsub/options/backend.py index 35e8df5d..f3760e3e 100644 --- a/examples/twisted/wamp/pubsub/options/backend.py +++ b/examples/twisted/wamp/pubsub/options/backend.py @@ -69,7 +69,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/options/frontend.py b/examples/twisted/wamp/pubsub/options/frontend.py index 9bb3d7a7..9c8bb87e 100644 --- a/examples/twisted/wamp/pubsub/options/frontend.py +++ b/examples/twisted/wamp/pubsub/options/frontend.py @@ -66,7 +66,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/tls/backend_selfsigned.py b/examples/twisted/wamp/pubsub/tls/backend_selfsigned.py index 80349ab8..3e354b5e 100644 --- a/examples/twisted/wamp/pubsub/tls/backend_selfsigned.py +++ b/examples/twisted/wamp/pubsub/tls/backend_selfsigned.py @@ -68,7 +68,7 @@ if __name__ == '__main__': environ.get("AUTOBAHN_DEMO_ROUTER", u"wss://127.0.0.1:8083/ws"), u"crossbardemo", ssl=options, # try removing this, but still use self-signed cert - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/unsubscribe/backend.py b/examples/twisted/wamp/pubsub/unsubscribe/backend.py index bcf8e85d..6aa7f3e2 100644 --- a/examples/twisted/wamp/pubsub/unsubscribe/backend.py +++ b/examples/twisted/wamp/pubsub/unsubscribe/backend.py @@ -54,7 +54,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/pubsub/unsubscribe/frontend.py b/examples/twisted/wamp/pubsub/unsubscribe/frontend.py index c07d386d..0da2374b 100644 --- a/examples/twisted/wamp/pubsub/unsubscribe/frontend.py +++ b/examples/twisted/wamp/pubsub/unsubscribe/frontend.py @@ -74,7 +74,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/arguments/backend.py b/examples/twisted/wamp/rpc/arguments/backend.py index 4ab725ca..2ab77d89 100644 --- a/examples/twisted/wamp/rpc/arguments/backend.py +++ b/examples/twisted/wamp/rpc/arguments/backend.py @@ -67,7 +67,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/arguments/frontend.py b/examples/twisted/wamp/rpc/arguments/frontend.py index b701024b..83c526de 100644 --- a/examples/twisted/wamp/rpc/arguments/frontend.py +++ b/examples/twisted/wamp/rpc/arguments/frontend.py @@ -87,7 +87,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/complex/backend.py b/examples/twisted/wamp/rpc/complex/backend.py index 0dd22eaa..373a1471 100644 --- a/examples/twisted/wamp/rpc/complex/backend.py +++ b/examples/twisted/wamp/rpc/complex/backend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/complex/frontend.py b/examples/twisted/wamp/rpc/complex/frontend.py index 232f5e85..b3fb48e4 100644 --- a/examples/twisted/wamp/rpc/complex/frontend.py +++ b/examples/twisted/wamp/rpc/complex/frontend.py @@ -58,7 +58,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/decorators/backend.py b/examples/twisted/wamp/rpc/decorators/backend.py index 69673cff..7452ceec 100644 --- a/examples/twisted/wamp/rpc/decorators/backend.py +++ b/examples/twisted/wamp/rpc/decorators/backend.py @@ -90,7 +90,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/decorators/frontend.py b/examples/twisted/wamp/rpc/decorators/frontend.py index b67cda3c..1b992e45 100644 --- a/examples/twisted/wamp/rpc/decorators/frontend.py +++ b/examples/twisted/wamp/rpc/decorators/frontend.py @@ -63,7 +63,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/errors/backend.py b/examples/twisted/wamp/rpc/errors/backend.py index 63101696..fb75e0a9 100644 --- a/examples/twisted/wamp/rpc/errors/backend.py +++ b/examples/twisted/wamp/rpc/errors/backend.py @@ -95,7 +95,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/errors/frontend.py b/examples/twisted/wamp/rpc/errors/frontend.py index 103d0c94..4fa8d2ba 100644 --- a/examples/twisted/wamp/rpc/errors/frontend.py +++ b/examples/twisted/wamp/rpc/errors/frontend.py @@ -93,7 +93,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/options/backend.py b/examples/twisted/wamp/rpc/options/backend.py index b4e7f3da..1506c942 100644 --- a/examples/twisted/wamp/rpc/options/backend.py +++ b/examples/twisted/wamp/rpc/options/backend.py @@ -64,7 +64,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/options/frontend.py b/examples/twisted/wamp/rpc/options/frontend.py index 4cb63fc6..721f08e8 100644 --- a/examples/twisted/wamp/rpc/options/frontend.py +++ b/examples/twisted/wamp/rpc/options/frontend.py @@ -61,7 +61,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/progress/backend.py b/examples/twisted/wamp/rpc/progress/backend.py index 6ec55a5d..5f456be7 100644 --- a/examples/twisted/wamp/rpc/progress/backend.py +++ b/examples/twisted/wamp/rpc/progress/backend.py @@ -62,7 +62,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/progress/frontend.py b/examples/twisted/wamp/rpc/progress/frontend.py index abeec852..61763279 100644 --- a/examples/twisted/wamp/rpc/progress/frontend.py +++ b/examples/twisted/wamp/rpc/progress/frontend.py @@ -59,7 +59,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/slowsquare/backend.py b/examples/twisted/wamp/rpc/slowsquare/backend.py index 5eb30a43..1983efb2 100644 --- a/examples/twisted/wamp/rpc/slowsquare/backend.py +++ b/examples/twisted/wamp/rpc/slowsquare/backend.py @@ -60,7 +60,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/slowsquare/frontend.py b/examples/twisted/wamp/rpc/slowsquare/frontend.py index e0e4c319..56a307b0 100644 --- a/examples/twisted/wamp/rpc/slowsquare/frontend.py +++ b/examples/twisted/wamp/rpc/slowsquare/frontend.py @@ -68,7 +68,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/timeservice/backend.py b/examples/twisted/wamp/rpc/timeservice/backend.py index 40f9fa4b..6d657133 100644 --- a/examples/twisted/wamp/rpc/timeservice/backend.py +++ b/examples/twisted/wamp/rpc/timeservice/backend.py @@ -57,7 +57,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component) diff --git a/examples/twisted/wamp/rpc/timeservice/frontend.py b/examples/twisted/wamp/rpc/timeservice/frontend.py index 5a1529f8..e32b73e3 100644 --- a/examples/twisted/wamp/rpc/timeservice/frontend.py +++ b/examples/twisted/wamp/rpc/timeservice/frontend.py @@ -57,7 +57,7 @@ if __name__ == '__main__': runner = ApplicationRunner( environ.get("AUTOBAHN_DEMO_ROUTER", u"ws://127.0.0.1:8080/ws"), u"crossbardemo", - debug_wamp=False, # optional; log many WAMP details + debug=False, # optional; log even more details ) runner.run(Component)