Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-amqp for openSUSE:Factory checked in at 2023-11-14 21:43:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-amqp (Old) and /work/SRC/openSUSE:Factory/.python-amqp.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-amqp" Tue Nov 14 21:43:41 2023 rev:43 rq:1125876 version:5.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-amqp/python-amqp.changes 2023-06-12 15:27:15.999341377 +0200 +++ /work/SRC/openSUSE:Factory/.python-amqp.new.17445/python-amqp.changes 2023-11-14 21:43:52.310483967 +0100 @@ -1,0 +2,10 @@ +Tue Nov 14 12:43:10 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 5.2.0: + * Added python 3.12 and drop python 3.7 (#423). + * Test vine 5.1.0 (#424). + * Set an explicit timeout on SSL handshake to prevent hangs. + * Add MessageNacked to recoverable errors. + * Send heartbeat frames more often. + +------------------------------------------------------------------- Old: ---- amqp-5.1.1.tar.gz New: ---- amqp-5.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-amqp.spec ++++++ --- /var/tmp/diff_new_pack.FZ2swB/_old 2023-11-14 21:43:52.774501143 +0100 +++ /var/tmp/diff_new_pack.FZ2swB/_new 2023-11-14 21:43:52.774501143 +0100 @@ -18,12 +18,13 @@ %{?sle15_python_module_pythons} Name: python-amqp -Version: 5.1.1 +Version: 5.2.0 Release: 0 Summary: Low-level AMQP client for Python (fork of amqplib) License: LGPL-2.1-or-later URL: https://github.com/celery/py-amqp Source: https://files.pythonhosted.org/packages/source/a/amqp/amqp-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module case >= 1.3.1} BuildRequires: %{python_module pytest >= 3.0} BuildRequires: %{python_module setuptools} ++++++ amqp-5.1.1.tar.gz -> amqp-5.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/Changelog new/amqp-5.2.0/Changelog --- old/amqp-5.1.1/Changelog 2022-04-17 08:32:58.000000000 +0200 +++ new/amqp-5.2.0/Changelog 2023-11-06 05:51:01.000000000 +0100 @@ -5,11 +5,27 @@ The previous amqplib changelog is here: http://code.google.com/p/py-amqplib/source/browse/CHANGES + +.. _version-5.2.0: + +5.2.0 +===== +:release-date: 2023-11-06 10:55 A.M. UTC+6:00 +:release-by: Asif Saif Uddin + +- Added python 3.12 and drop python 3.7 (#423). +- Test vine 5.1.0 (#424). +- Set an explicit timeout on SSL handshake to prevent hangs. +- Add MessageNacked to recoverable errors. +- Send heartbeat frames more often. + + + .. _version-5.1.1: 5.1.1 ===== -:release-date: 2022-03-06 12:45 P.M. UTC+6:00 +:release-date: 2022-04-17 12:45 P.M. UTC+6:00 :release-by: Asif Saif Uddin - Use AF_UNSPEC for name resolution (#389). @@ -48,7 +64,7 @@ :release-by: Asif Saif Uddin - Reduce memory usage of Connection (#377) -- Add additional error handling around code where an OSError +- Add additional error handling around code where an OSError may be raised on failed connections. Fixes (#378) @@ -60,7 +76,7 @@ :release-by: Asif Saif Uddin - Remove dependency to case -- Bugfix: not closing socket after server disconnect +- Bugfix: not closing socket after server disconnect .. _version-5.0.6: @@ -76,7 +92,7 @@ "ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled." Setting context.check_hostname prior to setting context.verify_mode resolves the issue. -- Remove TCP_USER_TIMEOUT option for Solaris (#355) +- Remove TCP_USER_TIMEOUT option for Solaris (#355) - Pass long_description to setup() (#353) - Fix for tox-docker 2.0 - Moved to GitHub actions CI (#359) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/PKG-INFO new/amqp-5.2.0/PKG-INFO --- old/amqp-5.1.1/PKG-INFO 2022-04-17 08:38:35.975764300 +0200 +++ new/amqp-5.2.0/PKG-INFO 2023-11-06 05:53:03.878006000 +0100 @@ -1,10 +1,10 @@ Metadata-Version: 2.1 Name: amqp -Version: 5.1.1 +Version: 5.2.0 Summary: Low-level AMQP client for Python (fork of amqplib). Home-page: http://github.com/celery/py-amqp Author: Barry Pederson -Author-email: pya...@celeryproject.org +Author-email: auv...@gmail.com Maintainer: Asif Saif Uddin, Matus Valo License: BSD Keywords: amqp rabbitmq cloudamqp messaging @@ -32,7 +32,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 5.1.1 +:Version: 5.2.0 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ @@ -208,12 +208,12 @@ http://www.rabbitmq.com/devtools.html#python-dev -.. |build-status| image:: https://api.travis-ci.com/celery/py-amqp.png?branch=master +.. |build-status| image:: https://github.com/celery/py-amqp/actions/workflows/ci.yaml/badge.svg :alt: Build status - :target: https://travis-ci.com/celery/py-amqp + :target: https://github.com/celery/py-amqp/actions/workflows/ci.yaml -.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=master - :target: https://codecov.io/github/celery/py-amqp?branch=master +.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=main + :target: https://codecov.io/github/celery/py-amqp?branch=main .. |license| image:: https://img.shields.io/pypi/l/amqp.svg :alt: BSD License @@ -230,7 +230,7 @@ .. |pyimp| image:: https://img.shields.io/pypi/implementation/amqp.svg :alt: Support Python implementations. :target: https://pypi.org/project/amqp/ - + py-amqp as part of the Tidelift Subscription ============================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/README.rst new/amqp-5.2.0/README.rst --- old/amqp-5.1.1/README.rst 2022-04-17 08:35:56.000000000 +0200 +++ new/amqp-5.2.0/README.rst 2023-11-06 05:50:26.000000000 +0100 @@ -4,7 +4,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 5.1.1 +:Version: 5.2.0 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ @@ -180,12 +180,12 @@ http://www.rabbitmq.com/devtools.html#python-dev -.. |build-status| image:: https://api.travis-ci.com/celery/py-amqp.png?branch=master +.. |build-status| image:: https://github.com/celery/py-amqp/actions/workflows/ci.yaml/badge.svg :alt: Build status - :target: https://travis-ci.com/celery/py-amqp + :target: https://github.com/celery/py-amqp/actions/workflows/ci.yaml -.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=master - :target: https://codecov.io/github/celery/py-amqp?branch=master +.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=main + :target: https://codecov.io/github/celery/py-amqp?branch=main .. |license| image:: https://img.shields.io/pypi/l/amqp.svg :alt: BSD License @@ -202,7 +202,7 @@ .. |pyimp| image:: https://img.shields.io/pypi/implementation/amqp.svg :alt: Support Python implementations. :target: https://pypi.org/project/amqp/ - + py-amqp as part of the Tidelift Subscription ============================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/amqp/__init__.py new/amqp-5.2.0/amqp/__init__.py --- old/amqp-5.1.1/amqp/__init__.py 2022-04-17 08:35:34.000000000 +0200 +++ new/amqp-5.2.0/amqp/__init__.py 2023-11-06 05:48:36.000000000 +0100 @@ -4,10 +4,10 @@ import re from collections import namedtuple -__version__ = '5.1.1' +__version__ = '5.2.0' __author__ = 'Barry Pederson' __maintainer__ = 'Asif Saif Uddin, Matus Valo' -__contact__ = 'pya...@celeryproject.org' +__contact__ = 'auv...@gmail.com' __homepage__ = 'http://github.com/celery/py-amqp' __docformat__ = 'restructuredtext' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/amqp/connection.py new/amqp-5.2.0/amqp/connection.py --- old/amqp-5.1.1/amqp/connection.py 2021-12-29 05:40:57.000000000 +0100 +++ new/amqp-5.2.0/amqp/connection.py 2023-10-12 09:14:31.000000000 +0200 @@ -14,7 +14,7 @@ from .abstract_channel import AbstractChannel from .channel import Channel from .exceptions import (AMQPDeprecationWarning, ChannelError, ConnectionError, - ConnectionForced, RecoverableChannelError, + ConnectionForced, MessageNacked, RecoverableChannelError, RecoverableConnectionError, ResourceError, error_for_code) from .method_framing import frame_handler, frame_writer @@ -179,6 +179,7 @@ channel_errors = (ChannelError,) recoverable_connection_errors = ( RecoverableConnectionError, + MessageNacked, socket.error, IOError, OSError, @@ -723,13 +724,18 @@ once per second. Keyword Arguments: - rate (int): Previously used, but ignored now. + rate (int): Number of heartbeat frames to send during the heartbeat + timeout """ AMQP_HEARTBEAT_LOGGER.debug('heartbeat_tick : for connection %s', self._connection_id) if not self.heartbeat: return + # If rate is wrong, let's use 2 as default + if rate <= 0: + rate = 2 + # treat actual data exchange in either direction as a heartbeat sent_now = self.bytes_sent recv_now = self.bytes_recv @@ -754,7 +760,7 @@ self.prev_sent, self.prev_recv = sent_now, recv_now # send a heartbeat if it's time to do so - if now > self.last_heartbeat_sent + self.heartbeat: + if now > self.last_heartbeat_sent + self.heartbeat / rate: AMQP_HEARTBEAT_LOGGER.debug( 'heartbeat_tick: sending heartbeat for connection %s', self._connection_id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/amqp/transport.py new/amqp-5.2.0/amqp/transport.py --- old/amqp-5.1.1/amqp/transport.py 2022-04-17 08:26:59.000000000 +0200 +++ new/amqp-5.2.0/amqp/transport.py 2023-10-12 09:14:31.000000000 +0200 @@ -401,6 +401,8 @@ def _setup_transport(self): """Wrap the socket in an SSL object.""" self.sock = self._wrap_socket(self.sock, **self.sslopts) + # Explicitly set a timeout here to stop any hangs on handshake. + self.sock.settimeout(self.connect_timeout) self.sock.do_handshake() self._quick_recv = self.sock.read diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/amqp.egg-info/PKG-INFO new/amqp-5.2.0/amqp.egg-info/PKG-INFO --- old/amqp-5.1.1/amqp.egg-info/PKG-INFO 2022-04-17 08:38:35.000000000 +0200 +++ new/amqp-5.2.0/amqp.egg-info/PKG-INFO 2023-11-06 05:53:03.000000000 +0100 @@ -1,10 +1,10 @@ Metadata-Version: 2.1 Name: amqp -Version: 5.1.1 +Version: 5.2.0 Summary: Low-level AMQP client for Python (fork of amqplib). Home-page: http://github.com/celery/py-amqp Author: Barry Pederson -Author-email: pya...@celeryproject.org +Author-email: auv...@gmail.com Maintainer: Asif Saif Uddin, Matus Valo License: BSD Keywords: amqp rabbitmq cloudamqp messaging @@ -32,7 +32,7 @@ |build-status| |coverage| |license| |wheel| |pyversion| |pyimp| -:Version: 5.1.1 +:Version: 5.2.0 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ @@ -208,12 +208,12 @@ http://www.rabbitmq.com/devtools.html#python-dev -.. |build-status| image:: https://api.travis-ci.com/celery/py-amqp.png?branch=master +.. |build-status| image:: https://github.com/celery/py-amqp/actions/workflows/ci.yaml/badge.svg :alt: Build status - :target: https://travis-ci.com/celery/py-amqp + :target: https://github.com/celery/py-amqp/actions/workflows/ci.yaml -.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=master - :target: https://codecov.io/github/celery/py-amqp?branch=master +.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=main + :target: https://codecov.io/github/celery/py-amqp?branch=main .. |license| image:: https://img.shields.io/pypi/l/amqp.svg :alt: BSD License @@ -230,7 +230,7 @@ .. |pyimp| image:: https://img.shields.io/pypi/implementation/amqp.svg :alt: Support Python implementations. :target: https://pypi.org/project/amqp/ - + py-amqp as part of the Tidelift Subscription ============================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/amqp.egg-info/requires.txt new/amqp-5.2.0/amqp.egg-info/requires.txt --- old/amqp-5.1.1/amqp.egg-info/requires.txt 2022-04-17 08:38:35.000000000 +0200 +++ new/amqp-5.2.0/amqp.egg-info/requires.txt 2023-11-06 05:53:03.000000000 +0100 @@ -1 +1 @@ -vine>=5.0.0 +vine<6.0.0,>=5.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/docs/includes/introduction.txt new/amqp-5.2.0/docs/includes/introduction.txt --- old/amqp-5.1.1/docs/includes/introduction.txt 2022-04-17 08:36:12.000000000 +0200 +++ new/amqp-5.2.0/docs/includes/introduction.txt 2023-11-06 05:49:43.000000000 +0100 @@ -1,4 +1,4 @@ -:Version: 5.1.1 +:Version: 5.2.0 :Web: https://amqp.readthedocs.io/ :Download: https://pypi.org/project/amqp/ :Source: http://github.com/celery/py-amqp/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/docs/templates/readme.txt new/amqp-5.2.0/docs/templates/readme.txt --- old/amqp-5.1.1/docs/templates/readme.txt 2021-11-18 09:18:39.000000000 +0100 +++ new/amqp-5.2.0/docs/templates/readme.txt 2023-10-12 09:14:31.000000000 +0200 @@ -6,12 +6,12 @@ .. include:: ../includes/introduction.txt -.. |build-status| image:: https://secure.travis-ci.org/celery/py-amqp.png?branch=master +.. |build-status| image:: https://github.com/celery/py-amqp/actions/workflows/ci.yaml/badge.svg :alt: Build status - :target: https://travis-ci.org/celery/py-amqp + :target: https://github.com/celery/py-amqp/actions/workflows/ci.yaml -.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=master - :target: https://codecov.io/github/celery/py-amqp?branch=master +.. |coverage| image:: https://codecov.io/github/celery/py-amqp/coverage.svg?branch=main + :target: https://codecov.io/github/celery/py-amqp?branch=main .. |license| image:: https://img.shields.io/pypi/l/amqp.svg :alt: BSD License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/requirements/default.txt new/amqp-5.2.0/requirements/default.txt --- old/amqp-5.1.1/requirements/default.txt 2022-03-06 04:54:37.000000000 +0100 +++ new/amqp-5.2.0/requirements/default.txt 2023-11-05 10:09:46.000000000 +0100 @@ -1 +1 @@ -vine>=5.0.0 +vine>=5.0.0,<6.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/t/unit/test_connection.py new/amqp-5.2.0/t/unit/test_connection.py --- old/amqp-5.1.1/t/unit/test_connection.py 2021-12-29 05:40:57.000000000 +0100 +++ new/amqp-5.2.0/t/unit/test_connection.py 2023-10-12 09:14:31.000000000 +0200 @@ -1,10 +1,10 @@ import re import socket import warnings -from array import array from unittest.mock import Mock, call, patch import pytest +import time from amqp import Connection, spec from amqp.connection import SSLError @@ -514,6 +514,38 @@ with pytest.raises(ConnectionError): self.conn.heartbeat_tick() + def _test_heartbeat_rate_tick(self, rate): + # Doing 22 calls, + # First one is setting the variables + # All nexts may send heartbeats, depending on rate + for i in range(1, 22): + self.conn.heartbeat_tick(rate) + time.sleep(0.1) + + def test_heartbeat_check_rate_default(self): + # Heartbeat set to 2 secs + self.conn.heartbeat = 2 + # Default rate is 2 --> should send frames every sec + self._test_heartbeat_rate_tick(2) + # Verify that we wrote 2 frames + assert self.conn.frame_writer.call_count == 2 + + def test_heartbeat_check_rate_four(self): + # Heartbeat set to 2 secs + self.conn.heartbeat = 2 + # Rate 4 --> should send frames every 0.5sec + self._test_heartbeat_rate_tick(4) + # Verify that we wrote 4 frames + assert self.conn.frame_writer.call_count == 4 + + def test_heartbeat_check_rate_wrong(self): + # Heartbeat set to 2 secs + self.conn.heartbeat = 2 + # Default rate is 2 --> should send frames every sec + self._test_heartbeat_rate_tick(-42) + # Verify that we wrote 2 frames + assert self.conn.frame_writer.call_count == 2 + def test_server_capabilities(self): self.conn.server_properties['capabilities'] = {'foo': 1} assert self.conn.server_capabilities == {'foo': 1} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/amqp-5.1.1/t/unit/test_transport.py new/amqp-5.2.0/t/unit/test_transport.py --- old/amqp-5.1.1/t/unit/test_transport.py 2022-04-17 08:26:59.000000000 +0200 +++ new/amqp-5.2.0/t/unit/test_transport.py 2023-10-12 09:14:31.000000000 +0200 @@ -864,6 +864,14 @@ with pytest.raises(socket.timeout): self.t._read(64) + def test_handshake_timeout(self): + self.t.sock = Mock() + self.t._wrap_socket = Mock() + self.t._wrap_socket.return_value = self.t.sock + self.t.sock.do_handshake.side_effect = socket.timeout() + with pytest.raises(socket.timeout): + self.t._setup_transport() + class test_TCPTransport: class Transport(transport.TCPTransport):