diff -Nru python-stompy-0.2.5/debian/changelog python-stompy-0.2.9/debian/changelog --- python-stompy-0.2.5/debian/changelog 2011-10-17 17:54:23.000000000 +0000 +++ python-stompy-0.2.9/debian/changelog 2011-10-17 17:54:24.000000000 +0000 @@ -1,3 +1,16 @@ +python-stompy (0.2.9-1ubuntu1) precise; urgency=low + + * Merge from debian unstable. Remaining changes (LP: #875921): + - dh_python2 transition. + + -- Chuck Short Mon, 17 Oct 2011 21:55:37 +0000 + +python-stompy (0.2.9-1) unstable; urgency=low + + * New upstream release + + -- David Watson Sun, 07 Aug 2011 21:53:19 +0100 + python-stompy (0.2.5-1ubuntu1) oneiric; urgency=low * dh_python2 transition. @@ -28,3 +41,4 @@ * Initial release (Closes: #551987) -- David Watson Thu, 22 Oct 2009 11:36:11 +0100 + diff -Nru python-stompy-0.2.5/debian/control python-stompy-0.2.9/debian/control --- python-stompy-0.2.5/debian/control 2011-10-17 17:54:23.000000000 +0000 +++ python-stompy-0.2.9/debian/control 2011-10-17 17:54:24.000000000 +0000 @@ -5,7 +5,7 @@ XSBC-Original-Maintainer: David Watson Uploaders: David Watson Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools -Standards-Version: 3.8.3 +Standards-Version: 3.9.2 Homepage: http://pypi.python.org/pypi/stompy Package: python-stompy diff -Nru python-stompy-0.2.5/debian/rules python-stompy-0.2.9/debian/rules --- python-stompy-0.2.5/debian/rules 2011-10-17 17:54:23.000000000 +0000 +++ python-stompy-0.2.9/debian/rules 2011-10-17 17:54:24.000000000 +0000 @@ -10,7 +10,7 @@ #export DH_VERBOSE=1 %: - dh $@ -with python2 + dh $@ --with python2 override_dh_auto_install: python setup.py install --install-layout=deb --root $(CURDIR)/debian/python-stompy diff -Nru python-stompy-0.2.5/PKG-INFO python-stompy-0.2.9/PKG-INFO --- python-stompy-0.2.5/PKG-INFO 2010-01-07 05:22:20.000000000 +0000 +++ python-stompy-0.2.9/PKG-INFO 2010-08-26 05:06:46.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: stompy -Version: 0.2.5 +Version: 0.2.9 Summary: Implementation of the STOMP protocol in Python. Home-page: http://bitbucket.org/benjaminws/python-stomp/ @@ -9,7 +9,7 @@ License: BSD Description: ========================================== - stompy - Python STOMP client library + stompy - Python STOMP client library ========================================== This is useful for connecting to and communicating with @@ -28,9 +28,9 @@ To enable the `ActiveMQ`_ Broker for `STOMP`_ add the following to the ``activemq.xml`` configuration:: - - - + + + See http://bitbucket.org/benjaminws/python-stomp/ for latest code. diff -Nru python-stompy-0.2.5/setup.cfg python-stompy-0.2.9/setup.cfg --- python-stompy-0.2.5/setup.cfg 2011-10-17 17:54:23.000000000 +0000 +++ python-stompy-0.2.9/setup.cfg 2011-10-17 17:54:24.000000000 +0000 @@ -8,6 +8,9 @@ tag_date = 0 tag_svn_revision = 0 +[upload_sphinx] +upload-dir = docs/build/html + [nosetests] cover-package = stompy verbosity = 1 diff -Nru python-stompy-0.2.5/setup.py python-stompy-0.2.9/setup.py --- python-stompy-0.2.5/setup.py 2011-10-17 17:54:23.000000000 +0000 +++ python-stompy-0.2.9/setup.py 2010-08-17 05:37:46.000000000 +0000 @@ -11,8 +11,7 @@ license='BSD', url=distmeta.__homepage__, keywords='stomp activemq jms messaging', - #test_suite="nose.collector", - #setup_requires=['nose>=0.11', 'dingus'], + test_suite="nose.collector", classifiers=["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", diff -Nru python-stompy-0.2.5/stompy/distmeta.py python-stompy-0.2.9/stompy/distmeta.py --- python-stompy-0.2.5/stompy/distmeta.py 2010-01-07 05:21:25.000000000 +0000 +++ python-stompy-0.2.9/stompy/distmeta.py 2010-08-26 02:43:25.000000000 +0000 @@ -1,6 +1,6 @@ """Implementation of the STOMP protocol in Python. """ -VERSION = (0, 2, 5) +VERSION = (0, 2, 9) __version__ = ".".join(map(str, VERSION)) __author__ = "Benjamin W. Smith" __contact__ = "benjaminwarfield@just-another.net" diff -Nru python-stompy-0.2.5/stompy/frame.py python-stompy-0.2.9/stompy/frame.py --- python-stompy-0.2.5/stompy/frame.py 2009-12-10 16:44:54.000000000 +0000 +++ python-stompy-0.2.9/stompy/frame.py 2010-08-26 02:39:04.000000000 +0000 @@ -1,7 +1,7 @@ import socket import random from pprint import pformat -from errno import EAGAIN +from errno import EAGAIN, EWOULDBLOCK from Queue import Queue from Queue import Empty as QueueEmpty @@ -66,21 +66,28 @@ self.iqueue = IntermediateMessageQueue() self.rqueue = Queue() - def connect(self, sock, username=None, password=None): + def connect(self, sock, username=None, password=None, clientid=None): """Connect to the STOMP server and get the session id. :param sock: Socket object from stompy.stomp.Stomp. :keyword username: Username for connection. :keyword password: Password for connection. + :keyword clientid: Client identification for persistent connections """ self.sock = sock + + headers = {} + if username and password: - frame = self.build_frame({"command": "CONNECT", - "headers": {'login': username, - 'passcode': password}}) - else: - frame = self.build_frame({"command": "CONNECT", "headers": {}}) + headers.update({'login': username, + 'passcode': password}) + + if clientid: + headers.update({'client-id' : clientid}) + + + frame = self.build_frame({"command": "CONNECT", "headers": headers}) self.send_frame(frame.as_string()) @@ -259,10 +266,12 @@ while not buffer.endswith('\x00'): try: partial = self.sock.recv(1) + if not partial or partial == '': + raise UnknownBrokerResponseError('empty reply') except socket.error, exc: - if exc[0] == EAGAIN: + if exc[0] == EAGAIN or exc[0] == EWOULDBLOCK: if not buffer or buffer == '\n': - return None + raise UnknownBrokerResponseError('empty reply') continue buffer += partial finally: diff -Nru python-stompy-0.2.5/stompy/simple.py python-stompy-0.2.9/stompy/simple.py --- python-stompy-0.2.5/stompy/simple.py 2010-01-06 03:27:07.000000000 +0000 +++ python-stompy-0.2.9/stompy/simple.py 2010-08-17 05:25:55.000000000 +0000 @@ -19,7 +19,7 @@ >>> from stompy.simple import Client >>> stomp = Client() >>> stomp.connect() - >>> stomp.send("The quick brown fox...", destination="/queue/test") + >>> stomp.put("The quick brown fox...", destination="/queue/test") >>> stomp.subscribe("/queue/test") >>> message = stomp.get_nowait() >>> message.body @@ -80,11 +80,12 @@ return self.stomp.send(conf) - def connect(self, username=None, password=None): + def connect(self, username=None, password=None, clientid=None): """Connect to the broker. :keyword username: Username for connection :keyword password: Password for connection + :keyword clientid: Client identification for persistent connections :raises :exc:`stompy.stomp.ConnectionError`: if the connection was unsuccessful. @@ -92,7 +93,7 @@ if the connection timed out. """ - self.stomp.connect(username=username, password=password) + self.stomp.connect(username=username, password=password, clientid=clientid) def disconnect(self): """Disconnect from the broker.""" diff -Nru python-stompy-0.2.5/stompy/stomp.py python-stompy-0.2.9/stompy/stomp.py --- python-stompy-0.2.5/stompy/stomp.py 2010-01-06 12:59:58.000000000 +0000 +++ python-stompy-0.2.9/stompy/stomp.py 2010-08-17 05:25:55.000000000 +0000 @@ -36,15 +36,16 @@ self.connected = None self.frame = Frame() - def connect(self, username=None, password=None): + def connect(self, username=None, password=None, clientid=None): """Connect to STOMP server. :keyword username: Username for connection :keyword password: Password for connection + :keyword clientid: Client identification for persistent connections """ try: self.sock.connect((self.host, self.port)) - self.frame.connect(self.sock, username=username, password=password) + self.frame.connect(self.sock, username=username, password=password, clientid=clientid) except socket.timeout, exc: raise self.ConnectionTimeoutError(*exc.args) except socket.error, exc: @@ -61,6 +62,7 @@ pass try: self.sock.shutdown(0) + self.sock.close() except socket.error, exc: # likely wasn't connected pass @@ -101,7 +103,7 @@ In the case of ActiveMQ, you could do this: >>> stomp.subscribe({'destination':'/queue/foo', - ... 'ack':'client'}) + ... 'ack':'client'}) """ destination = conf["destination"] self._send_command("SUBSCRIBE", conf) diff -Nru python-stompy-0.2.5/stompy.egg-info/PKG-INFO python-stompy-0.2.9/stompy.egg-info/PKG-INFO --- python-stompy-0.2.5/stompy.egg-info/PKG-INFO 2010-01-07 05:22:20.000000000 +0000 +++ python-stompy-0.2.9/stompy.egg-info/PKG-INFO 2010-08-26 05:06:46.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: stompy -Version: 0.2.5 +Version: 0.2.9 Summary: Implementation of the STOMP protocol in Python. Home-page: http://bitbucket.org/benjaminws/python-stomp/ @@ -9,7 +9,7 @@ License: BSD Description: ========================================== - stompy - Python STOMP client library + stompy - Python STOMP client library ========================================== This is useful for connecting to and communicating with @@ -28,9 +28,9 @@ To enable the `ActiveMQ`_ Broker for `STOMP`_ add the following to the ``activemq.xml`` configuration:: - - - + + + See http://bitbucket.org/benjaminws/python-stomp/ for latest code.