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 2022-06-04 23:27:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-amqp (Old)
 and      /work/SRC/openSUSE:Factory/.python-amqp.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-amqp"

Sat Jun  4 23:27:20 2022 rev:41 rq:980751 version:5.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-amqp/python-amqp.changes  2022-03-26 
22:32:41.718087486 +0100
+++ /work/SRC/openSUSE:Factory/.python-amqp.new.1548/python-amqp.changes        
2022-06-04 23:27:24.748778653 +0200
@@ -1,0 +2,6 @@
+Sat Jun  4 11:37:33 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 5.1.1:
+  - Use AF_UNSPEC for name resolution 
+
+-------------------------------------------------------------------

Old:
----
  amqp-5.1.0.tar.gz

New:
----
  amqp-5.1.1.tar.gz

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

Other differences:
------------------
++++++ python-amqp.spec ++++++
--- /var/tmp/diff_new_pack.XCKzQn/_old  2022-06-04 23:27:25.904779821 +0200
+++ /var/tmp/diff_new_pack.XCKzQn/_new  2022-06-04 23:27:25.908779826 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-amqp
-Version:        5.1.0
+Version:        5.1.1
 Release:        0
 Summary:        Low-level AMQP client for Python (fork of amqplib)
 License:        LGPL-2.1-or-later

++++++ amqp-5.1.0.tar.gz -> amqp-5.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-5.1.0/Changelog new/amqp-5.1.1/Changelog
--- old/amqp-5.1.0/Changelog    2022-03-06 04:59:33.000000000 +0100
+++ new/amqp-5.1.1/Changelog    2022-04-17 08:32:58.000000000 +0200
@@ -5,6 +5,15 @@
 The previous amqplib changelog is here:
 http://code.google.com/p/py-amqplib/source/browse/CHANGES
 
+.. _version-5.1.1:
+
+5.1.1
+=====
+:release-date: 2022-03-06 12:45 P.M. UTC+6:00
+:release-by: Asif Saif Uddin
+
+- Use AF_UNSPEC for name resolution (#389).
+
 
 .. _version-5.1.0:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-5.1.0/PKG-INFO new/amqp-5.1.1/PKG-INFO
--- old/amqp-5.1.0/PKG-INFO     2022-03-06 05:07:19.775380000 +0100
+++ new/amqp-5.1.1/PKG-INFO     2022-04-17 08:38:35.975764300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: amqp
-Version: 5.1.0
+Version: 5.1.1
 Summary: Low-level AMQP client for Python (fork of amqplib).
 Home-page: http://github.com/celery/py-amqp
 Author: Barry Pederson
@@ -32,7 +32,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
 
-:Version: 5.1.0
+:Version: 5.1.1
 :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.0/README.rst new/amqp-5.1.1/README.rst
--- old/amqp-5.1.0/README.rst   2022-03-06 05:03:12.000000000 +0100
+++ new/amqp-5.1.1/README.rst   2022-04-17 08:35:56.000000000 +0200
@@ -4,7 +4,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
 
-:Version: 5.1.0
+:Version: 5.1.1
 :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.0/amqp/__init__.py 
new/amqp-5.1.1/amqp/__init__.py
--- old/amqp-5.1.0/amqp/__init__.py     2022-03-06 05:01:47.000000000 +0100
+++ new/amqp-5.1.1/amqp/__init__.py     2022-04-17 08:35:34.000000000 +0200
@@ -4,7 +4,7 @@
 import re
 from collections import namedtuple
 
-__version__ = '5.1.0'
+__version__ = '5.1.1'
 __author__ = 'Barry Pederson'
 __maintainer__ = 'Asif Saif Uddin, Matus Valo'
 __contact__ = 'pya...@celeryproject.org'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-5.1.0/amqp/transport.py 
new/amqp-5.1.1/amqp/transport.py
--- old/amqp-5.1.0/amqp/transport.py    2022-03-01 09:38:14.000000000 +0100
+++ new/amqp-5.1.1/amqp/transport.py    2022-04-17 08:26:59.000000000 +0200
@@ -169,59 +169,27 @@
                     sock.settimeout(prev)
 
     def _connect(self, host, port, timeout):
-        e = None
-
-        # Below we are trying to avoid additional DNS requests for AAAA if A
-        # succeeds. This helps a lot in case when a hostname has an IPv4 entry
-        # in /etc/hosts but not IPv6. Without the (arguably somewhat twisted)
-        # logic below, getaddrinfo would attempt to resolve the hostname for
-        # both IP versions, which would make the resolver talk to configured
-        # DNS servers. If those servers are for some reason not available
-        # during resolution attempt (either because of system misconfiguration,
-        # or network connectivity problem), resolution process locks the
-        # _connect call for extended time.
-        addr_types = (socket.AF_INET, socket.AF_INET6)
-        addr_types_num = len(addr_types)
-        for n, family in enumerate(addr_types):
-            # first, resolve the address for a single address family
+        entries = socket.getaddrinfo(
+            host, port, socket.AF_UNSPEC, socket.SOCK_STREAM, SOL_TCP,
+        )
+        for i, res in enumerate(entries):
+            af, socktype, proto, canonname, sa = res
             try:
-                entries = socket.getaddrinfo(
-                    host, port, family, socket.SOCK_STREAM, SOL_TCP)
-                entries_num = len(entries)
-            except socket.gaierror:
-                # we may have depleted all our options
-                if n + 1 >= addr_types_num:
-                    # if getaddrinfo succeeded before for another address
-                    # family, reraise the previous socket.error since it's more
-                    # relevant to users
-                    raise (e
-                           if e is not None
-                           else socket.error(
-                               "failed to resolve broker hostname"))
-                continue  # pragma: no cover
-
-            # now that we have address(es) for the hostname, connect to broker
-            for i, res in enumerate(entries):
-                af, socktype, proto, _, sa = res
+                self.sock = socket.socket(af, socktype, proto)
                 try:
-                    self.sock = socket.socket(af, socktype, proto)
-                    try:
-                        set_cloexec(self.sock, True)
-                    except NotImplementedError:
-                        pass
-                    self.sock.settimeout(timeout)
-                    self.sock.connect(sa)
-                except OSError as ex:
-                    e = ex
-                    if self.sock is not None:
-                        self.sock.close()
-                        self.sock = None
-                    # we may have depleted all our options
-                    if i + 1 >= entries_num and n + 1 >= addr_types_num:
-                        raise
-                else:
-                    # hurray, we established connection
-                    return
+                    set_cloexec(self.sock, True)
+                except NotImplementedError:
+                    pass
+                self.sock.settimeout(timeout)
+                self.sock.connect(sa)
+            except socket.error:
+                if self.sock:
+                    self.sock.close()
+                self.sock = None
+                if i + 1 >= len(entries):
+                    raise
+            else:
+                break
 
     def _init_socket(self, socket_settings, read_timeout, write_timeout):
         self.sock.settimeout(None)  # set socket back to blocking mode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/amqp-5.1.0/amqp.egg-info/PKG-INFO 
new/amqp-5.1.1/amqp.egg-info/PKG-INFO
--- old/amqp-5.1.0/amqp.egg-info/PKG-INFO       2022-03-06 05:07:19.000000000 
+0100
+++ new/amqp-5.1.1/amqp.egg-info/PKG-INFO       2022-04-17 08:38:35.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: amqp
-Version: 5.1.0
+Version: 5.1.1
 Summary: Low-level AMQP client for Python (fork of amqplib).
 Home-page: http://github.com/celery/py-amqp
 Author: Barry Pederson
@@ -32,7 +32,7 @@
 
 |build-status| |coverage| |license| |wheel| |pyversion| |pyimp|
 
-:Version: 5.1.0
+:Version: 5.1.1
 :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.0/docs/includes/introduction.txt 
new/amqp-5.1.1/docs/includes/introduction.txt
--- old/amqp-5.1.0/docs/includes/introduction.txt       2022-03-06 
05:02:24.000000000 +0100
+++ new/amqp-5.1.1/docs/includes/introduction.txt       2022-04-17 
08:36:12.000000000 +0200
@@ -1,4 +1,4 @@
-:Version: 5.1.0
+:Version: 5.1.1
 :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.0/t/unit/test_transport.py 
new/amqp-5.1.1/t/unit/test_transport.py
--- old/amqp-5.1.0/t/unit/test_transport.py     2021-12-17 04:55:58.000000000 
+0100
+++ new/amqp-5.1.1/t/unit/test_transport.py     2022-04-17 08:26:59.000000000 
+0200
@@ -520,54 +520,20 @@
                               side_effect=(socket.error, None)):
                 self.t.connect()
 
-    def test_connect_short_curcuit_on_INET_succeed(self):
+    def test_connect_calls_getaddrinfo_with_af_unspec(self):
         with patch('socket.socket', return_value=MockSocket()), \
-            patch('socket.getaddrinfo',
-                  side_effect=[
-                      [(socket.AF_INET, 1, socket.IPPROTO_TCP,
-                        '', ('127.0.0.1', 5672))],
-                      [(socket.AF_INET6, 1, socket.IPPROTO_TCP,
-                        '', ('::1', 5672))]
-                  ]) as getaddrinfo:
+            patch('socket.getaddrinfo') as getaddrinfo:
             self.t.sock = Mock()
             self.t.close()
             self.t.connect()
             getaddrinfo.assert_called_with(
-                'localhost', 5672, socket.AF_INET, ANY, ANY)
-
-    def test_connect_short_curcuit_on_INET_fails(self):
-        with patch('socket.socket', return_value=MockSocket()) as sock_mock, \
-            patch('socket.getaddrinfo',
-                  side_effect=[
-                      [(socket.AF_INET, 1, socket.IPPROTO_TCP,
-                        '', ('127.0.0.1', 5672))],
-                      [(socket.AF_INET6, 1, socket.IPPROTO_TCP,
-                        '', ('::1', 5672))]
-                  ]) as getaddrinfo:
-            self.t.sock = Mock()
-            self.t.close()
-            with patch.object(sock_mock.return_value, 'connect',
-                              side_effect=(socket.error, None)):
-                self.t.connect()
-            getaddrinfo.assert_has_calls(
-                [call('localhost', 5672, addr_type, ANY, ANY)
-                 for addr_type in (socket.AF_INET, socket.AF_INET6)])
+                'localhost', 5672, socket.AF_UNSPEC, ANY, ANY)
 
     def test_connect_getaddrinfo_raises_gaierror(self):
         with patch('socket.getaddrinfo', side_effect=socket.gaierror):
             with pytest.raises(socket.error):
                 self.t.connect()
 
-    def test_connect_getaddrinfo_raises_gaierror_once_recovers(self):
-        with patch('socket.socket', return_value=MockSocket()), \
-            patch('socket.getaddrinfo',
-                  side_effect=[
-                      socket.gaierror,
-                      [(socket.AF_INET6, 1, socket.IPPROTO_TCP,
-                        '', ('::1', 5672))]
-                  ]):
-            self.t.connect()
-
     def test_connect_survives_not_implemented_set_cloexec(self):
         with patch('socket.socket', return_value=MockSocket()), \
             patch('socket.getaddrinfo',

Reply via email to