Hello community,

here is the log from the commit of package python-stomp.py for openSUSE:Factory 
checked in at 2020-07-21 15:48:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-stomp.py (Old)
 and      /work/SRC/openSUSE:Factory/.python-stomp.py.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-stomp.py"

Tue Jul 21 15:48:35 2020 rev:9 rq:821979 version:6.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-stomp.py/python-stomp.py.changes  
2020-05-20 18:45:14.977253661 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-stomp.py.new.3592/python-stomp.py.changes    
    2020-07-21 15:50:06.988275349 +0200
@@ -1,0 +2,13 @@
+Mon Jul 13 19:51:13 UTC 2020 - Sebastian Wagner <[email protected]>
+
+- update to version 6.1.0:
+ * Remove traceback logging (https://github.com/jasonrbriggs/stomp.py/pull/290)
+ * Add support for \r\n EOL handling (as per [stomp protocol 
v1.2](http://stomp.github.io/stomp-specification-1.2.html#Augmented_BNF))
+ * Remove heartbeat loop sleep (issue 
https://github.com/jasonrbriggs/stomp.py/issues/297, 
https://github.com/jasonrbriggs/stomp.py/pull/298)
+ * Update version number using the makefile and the poetry version command
+ * Add `original_headers` access to the Frame so that you can get the original 
value of a header even if a listener modifies it (issue: 
https://github.com/jasonrbriggs/stomp.py/issues/300, PR 
https://github.com/jasonrbriggs/stomp.py/pull/309)
+ * Fix for reconnect failures 
(https://github.com/jasonrbriggs/stomp.py/pull/295)
+ * Fix for double disconnect notifications causing issues with reconnection
+ * Add 'verbose' to stomp.logging (and defaulting the value to False). Log 
lines which dump the stacktrace now use that variable - except for a couple of 
cases (set stomp.logging.verbose = True to change back to the previous 
behaviour)
+
+-------------------------------------------------------------------

Old:
----
  python-stomp.py-6.0.0.tar.gz
  stomp.py-6.0.0.tar.gz

New:
----
  python-stomp.py-6.1.0.tar.gz
  stomp.py-6.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-stomp.py.spec ++++++
--- /var/tmp/diff_new_pack.N4txHG/_old  2020-07-21 15:50:10.680279913 +0200
+++ /var/tmp/diff_new_pack.N4txHG/_new  2020-07-21 15:50:10.680279913 +0200
@@ -18,7 +18,7 @@
 
 %define skip_python2 1
 Name:           python-stomp.py
-Version:        6.0.0
+Version:        6.1.0
 Release:        0
 Summary:        Python STOMP client
 License:        Apache-2.0
@@ -57,7 +57,7 @@
 %python_uninstall_alternative stomp
 
 %files %{python_files}
-%doc README CHANGELOG
+%doc README CHANGELOG.md
 %license LICENSE
 %{python_sitelib}/*
 %python_alternative %{_bindir}/stomp

++++++ python-stomp.py-6.0.0.tar.gz -> python-stomp.py-6.1.0.tar.gz ++++++
++++ 2435 lines of diff (skipped)

++++++ stomp.py-6.0.0.tar.gz -> stomp.py-6.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/PKG-INFO new/stomp.py-6.1.0/PKG-INFO
--- old/stomp.py-6.0.0/PKG-INFO 2020-02-15 17:26:36.037880700 +0100
+++ new/stomp.py-6.1.0/PKG-INFO 2020-04-13 13:38:46.096743000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: stomp.py
-Version: 6.0.0
+Version: 6.1.0
 Summary: Python STOMP client, supporting versions 1.0, 1.1 and 1.2 of the 
protocol
 Home-page: https://github.com/jasonrbriggs/stomp.py
 License: Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/pyproject.toml 
new/stomp.py-6.1.0/pyproject.toml
--- old/stomp.py-6.0.0/pyproject.toml   2020-02-15 17:26:30.626533500 +0100
+++ new/stomp.py-6.1.0/pyproject.toml   2020-04-13 13:33:37.759791600 +0200
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "stomp.py"
-version = "6.0.0"
+version = "6.1.0"
 description = "Python STOMP client, supporting versions 1.0, 1.1 and 1.2 of 
the protocol"
 authors = ["Jason R Briggs <[email protected]>"]
 license = "Apache-2.0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/setup.py new/stomp.py-6.1.0/setup.py
--- old/stomp.py-6.0.0/setup.py 2020-02-15 17:26:36.037408600 +0100
+++ new/stomp.py-6.1.0/setup.py 2020-04-13 13:38:46.095874300 +0200
@@ -15,7 +15,7 @@
 
 setup_kwargs = {
     'name': 'stomp.py',
-    'version': '6.0.0',
+    'version': '6.1.0',
     'description': 'Python STOMP client, supporting versions 1.0, 1.1 and 1.2 
of the protocol',
     'long_description': '========\nstomp.py\n========\n\n.. image:: 
https://badge.fury.io/py/stomp.py.svg\n    :target: 
https://badge.fury.io/py/stomp.py\n    :alt: PyPI version\n\n.. image:: 
https://travis-ci.org/jasonrbriggs/stomp.py.svg\n    :target: 
https://travis-ci.org/jasonrbriggs/stomp.py\n    :alt: Build 
Status\n\n"stomp.py" is a Python client library for accessing messaging servers 
(such as ActiveMQ_, Artemis_ or RabbitMQ_) using the STOMP_ protocol (`STOMP 
v1.0`_, `STOMP v1.1`_ and `STOMP v1.2`_). It can also be run as a standalone, 
command-line client for testing.  NOTE: Stomp.py has officially ended support 
for Python2.x. See `python3statement.org`_ for more information. \n\n**If you 
find this project useful, why not** `buy me a coffee`_.\n\n.. contents:: \\ \n  
  :depth: 1\n\n\nQuick Start\n===========\n\nYou can connect to a message 
broker running on the local machine, and send a message using the following 
example.\n\n.. code-block:: python\n\n  import stomp\n\n  conn = 
stomp.Connection()\n  conn.connect(\'admin\', \'password\', wait=True)\n  
conn.send(body=\' \'.join(sys.argv[1:]), destination=\'/queue/test\')\n  
conn.disconnect()\n\n\nDocumentation and 
Resources\n===========================\n\n- `Main documentation`_\n- `API 
documentation`_ (see `stomp.github.io`_ for details on the STOMP protocol 
itself)\n- A basic example of using stomp.py with a message listener can be 
found in the `quick start`_ section of the main documentation\n- Description of 
the `command-line interface`_\n- `Travis`_ for continuous integration builds\n- 
Current `test coverage report`_\n- `PyPi stomp.py page`_\n\nThe current version 
of stomp.py supports:\n\n- Python 3.x (Python2 support ended as of Jan 2020)\n- 
STOMP version 1.0, 1.1 and 1.2\n\nThere is also legacy 3.1.7 version using the 
old 3-series code (see `3.1.7 on PyPi`_ and `3.1.7 on GitHub`_). This is no 
longer supported, but (at least as of 2018) there were still a couple of 
reports of this version still being used in the 
wild.\n\n\nTesting\n=======\n\nstomp.py has been perfunctorily tested on:\n\n- 
Pivotal `RabbitMQ`_   (`rabbitmq_test.py 
<https://github.com/jasonrbriggs/stomp.py/blob/dev/stomp/test/rabbitmq_test.py>`_)\n-
 Apache `ActiveMQ`_   (`activemq_test.py 
<https://github.com/jasonrbriggs/stomp.py/blob/dev/stomp/test/activemq_test.py>`_)\n-
 Apache ActiveMQ `Artemis`_  (`artemis_test.py 
<https://github.com/jasonrbriggs/stomp.py/blob/dev/stomp/test/artemis_test.py>`_)\n-
 `stompserver`_  (`stompserver_test.py 
<https://github.com/jasonrbriggs/stomp.py/blob/dev/stomp/test/stompserver_test.py>`_)\n\nFor
 testing locally, you\'ll need to install docker. Once installed:\n\n#. Create 
the docker image:\n        make docker-image\n#. Run the container:\n        
make run-docker\n#. Run stomp.py unit tests:\n        make test\n#. Cleanup the 
container afterwards if you don\'t need it any more:\n        make 
remove-docker\n\n\n.. _`STOMP`: http://stomp.github.io\n.. _`STOMP v1.0`: 
http://stomp.github.io/stomp-specification-1.0.html\n.. _`STOMP v1.1`: 
http://stomp.github.io/stomp-specification-1.1.html\n.. _`STOMP v1.2`: 
http://stomp.github.io/stomp-specification-1.2.html\n.. 
_`python3statement.org`: http://python3statement.org/\n\n.. _`Main 
documentation`: http://jasonrbriggs.github.io/stomp.py/index.html\n.. 
_`stomp.github.io`: http://stomp.github.io/\n.. _`quick start`: 
http://jasonrbriggs.github.io/stomp.py/quickstart.html\n.. _`command-line 
interface`: http://jasonrbriggs.github.io/stomp.py/commandline.html\n.. _`PyPi 
stomp.py page`: https://pypi.org/project/stomp.py/\n.. _`API documentation`: 
http://jasonrbriggs.github.io/stomp.py/api.html\n.. _`test coverage report`: 
http://jasonrbriggs.github.io/stomp.py/htmlcov/\n.. _`Travis`: 
https://travis-ci.org/jasonrbriggs/stomp.py\n\n.. _`3.1.7 on PyPi`: 
https://pypi.org/project/stomp.py/3.1.7/\n.. _`3.1.7 on GitHub`: 
https://github.com/jasonrbriggs/stomp.py/tree/stomppy-3series\n\n.. 
_`ActiveMQ`:  http://activemq.apache.org/\n.. _`Artemis`: 
https://activemq.apache.org/components/artemis/\n.. _`RabbitMQ`: 
http://www.rabbitmq.com\n.. _`stompserver`: 
http://stompserver.rubyforge.org\n\n.. _`buy me a coffee`: 
https://www.paypal.me/jasonrbriggs\n',
     'author': 'Jason R Briggs',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/__init__.py 
new/stomp.py-6.1.0/stomp/__init__.py
--- old/stomp.py-6.0.0/stomp/__init__.py        2020-02-15 16:24:05.255170000 
+0100
+++ new/stomp.py-6.1.0/stomp/__init__.py        2020-04-13 13:36:24.352790600 
+0200
@@ -14,7 +14,7 @@
 import stomp.listener as listener
 import stomp.logging as logging
 
-__version__ = (6, 0, 0)
+__version__ = (6, 1, 0)
 
 ##
 # Alias for STOMP 1.0 connections.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/connect.py 
new/stomp.py-6.1.0/stomp/connect.py
--- old/stomp.py-6.0.0/stomp/connect.py 2020-02-15 16:24:05.259170000 +0100
+++ new/stomp.py-6.1.0/stomp/connect.py 2020-04-13 13:32:44.543436500 +0200
@@ -207,7 +207,7 @@
                               reconnect_sleep_initial, 
reconnect_sleep_increase, reconnect_sleep_jitter,
                               reconnect_sleep_max, reconnect_attempts_max, 
use_ssl, ssl_key_file, ssl_cert_file,
                               ssl_ca_certs, ssl_cert_validator, ssl_version, 
timeout,
-                              keepalive, vhost, auto_decode, encoding)
+                              keepalive, vhost, auto_decode, encoding, 
is_eol_fc=self.is_eol)
         BaseConnection.__init__(self, transport)
         Protocol12.__init__(self, transport, heartbeats, auto_content_length, 
heart_beat_receive_scale=heart_beat_receive_scale)
 
@@ -226,3 +226,6 @@
         Protocol12.disconnect(self, receipt, headers, **keyword_headers)
         if receipt is not None:
             self.transport.stop()
+
+    def is_eol(self, c):
+        return c == b'\x0a' or c == b'\x0d\x0a'
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/listener.py 
new/stomp.py-6.1.0/stomp/listener.py
--- old/stomp.py-6.0.0/stomp/listener.py        2020-02-15 16:24:05.259170000 
+0100
+++ new/stomp.py-6.1.0/stomp/listener.py        2020-04-08 20:52:36.609415300 
+0200
@@ -163,7 +163,6 @@
         self.next_outbound_heartbeat = None
         self.heart_beat_receive_scale = heart_beat_receive_scale
         self.heartbeat_terminate_event = threading.Event()
-        self.loop_sleep = 1
 
     def on_connected(self, headers, body):
         """
@@ -185,9 +184,7 @@
                 # set a different heart-beat-receive-scale when creating the 
connection to override that
                 self.receive_sleep = (self.heartbeats[1] / 1000) * 
self.heart_beat_receive_scale
 
-                self.loop_sleep = max(1, int(min(self.send_sleep, 
self.receive_sleep) / 2.0))
-
-                logging.debug("Set receive_sleep to %s, send_sleep to %s, loop 
sleep to %s", self.receive_sleep, self.send_sleep, self.loop_sleep)
+                logging.debug("Set receive_sleep to %s, send_sleep to %s", 
self.receive_sleep, self.send_sleep)
 
                 # Give grace of receiving the first heartbeat
                 self.received_heartbeat = monotonic() + self.receive_sleep
@@ -308,8 +305,6 @@
                     self.transport.stop()
                     for listener in self.transport.listeners.values():
                         listener.on_heartbeat_timeout()
-
-            time.sleep(self.loop_sleep)
         self.heartbeat_thread = None
         self.heartbeat_terminate_event.clear()
         if self.heartbeats != (0, 0):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/protocol.py 
new/stomp.py-6.1.0/stomp/protocol.py
--- old/stomp.py-6.0.0/stomp/protocol.py        2020-02-15 16:24:05.259170000 
+0100
+++ new/stomp.py-6.1.0/stomp/protocol.py        2020-02-20 22:33:18.120868400 
+0100
@@ -347,8 +347,6 @@
         :param keyword_headers: any additional headers the broker requires
         """
         if not self.transport.is_connected():
-            import traceback
-            traceback.print_stack()
             logging.debug("Not sending disconnect, already disconnected")
             return
         headers = utils.merge_headers([headers, keyword_headers])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/transport.py 
new/stomp.py-6.1.0/stomp/transport.py
--- old/stomp.py-6.0.0/stomp/transport.py       2020-02-15 16:24:05.263170000 
+0100
+++ new/stomp.py-6.1.0/stomp/transport.py       2020-04-13 13:32:44.547436700 
+0200
@@ -54,7 +54,7 @@
     #
     __content_length_re = 
re.compile(b"^content-length[:]\\s*(?P<value>[0-9]+)", re.MULTILINE)
 
-    def __init__(self, auto_decode=True, encoding="utf-8"):
+    def __init__(self, auto_decode=True, encoding="utf-8", 
is_eol_fc=is_eol_default):
         self.__recvbuf = b''
         self.listeners = {}
         self.running = False
@@ -78,6 +78,7 @@
         self.__connect_wait_condition = threading.Condition()
         self.__auto_decode = auto_decode
         self.__encoding = encoding
+        self.__is_eol = is_eol_fc
 
     def override_threading(self, create_thread_fc):
         """
@@ -333,7 +334,10 @@
                         frames = self.__read()
 
                         for frame in frames:
-                            f = parse_frame(frame)
+                            if self.__is_eol(frame):
+                                f = HEARTBEAT_FRAME
+                            else:
+                                f = parse_frame(frame)
                             if f is None:
                                 continue
                             if self.__auto_decode:
@@ -382,7 +386,7 @@
             if c is None or len(c) == 0:
                 logging.debug("nothing received, raising CCE")
                 raise exception.ConnectionClosedException()
-            if c == b'\x0a' and not self.__recvbuf and not fastbuf.tell():
+            if self.__is_eol(c) and not self.__recvbuf and not fastbuf.tell():
                 #
                 # EOL to an empty receive buffer: treat as heartbeat.
                 # Note that this may misdetect an optional EOL at end of frame 
as heartbeat in case the
@@ -432,8 +436,13 @@
                     #
                     # Ignore optional EOLs at end of frame
                     #
-                    while self.__recvbuf[pos:pos + 1] == b'\x0a':
-                        pos += 1
+                    while 1:
+                        if self.__is_eol(self.__recvbuf[pos:pos + 1]):
+                            pos += 1
+                        elif self.__is_eol(self.__recvbuf[pos:pos + 2]):
+                            pos += 2
+                        else:
+                            break
                     self.__recvbuf = self.__recvbuf[pos:]
                 else:
                     break
@@ -505,9 +514,10 @@
                  vhost=None,
                  auto_decode=True,
                  encoding="utf-8",
-                 recv_bytes=1024
+                 recv_bytes=1024,
+                 is_eol_fc=is_eol_default
                  ):
-        BaseTransport.__init__(self, auto_decode, encoding)
+        BaseTransport.__init__(self, auto_decode, encoding, is_eol_fc)
 
         if host_and_ports is None:
             host_and_ports = [("localhost", 61613)]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/stomp.py-6.0.0/stomp/utils.py 
new/stomp.py-6.1.0/stomp/utils.py
--- old/stomp.py-6.0.0/stomp/utils.py   2020-02-15 16:24:05.263170000 +0100
+++ new/stomp.py-6.1.0/stomp/utils.py   2020-04-13 13:32:44.547436700 +0200
@@ -86,6 +86,9 @@
     return b''.join(chars).decode()
 
 
+def is_eol_default(c):
+    return c == b'\x0a'
+
 ##
 # Used to parse STOMP header lines in the format "key:value",
 #
@@ -188,10 +191,6 @@
     :rtype: Frame
     """
     f = Frame()
-    if frame == b'\x0a':
-        f.cmd = "heartbeat"
-        return f
-
     mat = PREAMBLE_END_RE.search(frame)
     if mat:
         preamble_end = mat.start()
@@ -349,4 +348,7 @@
     try:
         return e.errno
     except AttributeError:
-        return e.args[0]
\ No newline at end of file
+        return e.args[0]
+
+
+HEARTBEAT_FRAME = Frame("heartbeat")
\ No newline at end of file


Reply via email to