polish for release

This commit is contained in:
Tobias Oberstein
2014-01-30 18:41:38 +01:00
parent 8c56ba1761
commit 1e470e4e1b
4 changed files with 13 additions and 22 deletions

View File

@@ -21,8 +21,8 @@ clean:
find . -name "*__pycache__" -type d -exec rm -rf {} \;
publish: clean
python3 setup.py register
python3 setup.py sdist upload
python setup.py register
python setup.py sdist upload
test:
trial.py autobahn.wamp.tests
@@ -31,10 +31,3 @@ test:
# trial.py autobahn.wamp.tests.test_protocol_peer
# trial.py autobahn.wamp.tests.test_serializer
# trial.py autobahn.wamp.tests.test_uri_pattern
testp:
python -m autobahn/wamp/tests/test_protocol.py
# python -m autobahn.wamp.tests.test_protocol
# python -m autobahn.wamp.tests.test_message
# python autobahn/wamp/tests/test_message.py
# python autobahn/wamp2/tests/test_uri_pattern.py

View File

@@ -138,10 +138,8 @@ Protocol
closeSession,
publish,
subscribe,
unsubscribe,
call,
register,
unregister
register
.. autoclass:: autobahn.wamp.protocol.WampAppFactory

View File

@@ -61,7 +61,7 @@ if __name__ == '__main__':
## create a WAMP application session factory
##
from autobahn.twisted.wamp import WampAppFactory
session = WampAppFactory()
session_factory = WampAppFactory()
## dynamically load the application component ..
@@ -73,20 +73,20 @@ if __name__ == '__main__':
## .. and set the session class on the factory
##
session.session = getattr(app, klass)
session_factory.session = getattr(app, klass)
## run WAMP-over-WebSocket
##
from autobahn.twisted.websocket import WampWebSocketClientFactory
transport = WampWebSocketClientFactory(session, args.wsurl, debug = args.debug)
transport.setProtocolOptions(failByDrop = False)
transport_factory = WampWebSocketClientFactory(session_factory, args.wsurl, debug = args.debug)
transport_factory.setProtocolOptions(failByDrop = False)
## start a WebSocket client from an endpoint
##
client = clientFromString(reactor, args.websocket)
client.connect(transport)
client.connect(transport_factory)
## now enter the Twisted reactor loop

View File

@@ -61,7 +61,7 @@ if __name__ == '__main__':
## create a WAMP router session factory
##
from autobahn.twisted.wamp import WampRouterFactory
session = WampRouterFactory()
session_factory = WampRouterFactory()
## if asked to start an embedded application component ..
@@ -77,20 +77,20 @@ if __name__ == '__main__':
## .. and create and add an app WAMP session to the router
##
session.add(SessionKlass())
session_factory.add(SessionKlass())
## run WAMP over WebSocket
##
from autobahn.twisted.websocket import WampWebSocketServerFactory
transport = WampWebSocketServerFactory(session, args.wsurl, debug = args.debug)
transport.setProtocolOptions(failByDrop = False)
transport_factory = WampWebSocketServerFactory(session_factory, args.wsurl, debug = args.debug)
transport_factory.setProtocolOptions(failByDrop = False)
## start the WebSocket server from an endpoint
##
server = serverFromString(reactor, args.websocket)
server.listen(transport)
server.listen(transport_factory)
## now enter the Twisted reactor loop