Hello community,

here is the log from the commit of package python-gear for openSUSE:Factory 
checked in at 2019-03-14 22:42:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-gear (Old)
 and      /work/SRC/openSUSE:Factory/.python-gear.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-gear"

Thu Mar 14 22:42:56 2019 rev:4 rq:685060 version:0.13.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-gear/python-gear.changes  2018-12-19 
13:53:28.358948079 +0100
+++ /work/SRC/openSUSE:Factory/.python-gear.new.28833/python-gear.changes       
2019-03-14 22:42:57.698628183 +0100
@@ -1,0 +2,8 @@
+Thu Mar 14 16:02:50 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.13.0:
+  * prefer ipv6 for listen addrs
+  * add support for keepalive to client
+- Execute tests
+
+-------------------------------------------------------------------

Old:
----
  gear-0.12.0.tar.gz

New:
----
  gear-0.13.0.tar.gz

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

Other differences:
------------------
++++++ python-gear.spec ++++++
--- /var/tmp/diff_new_pack.z8krx7/_old  2019-03-14 22:42:58.354627956 +0100
+++ /var/tmp/diff_new_pack.z8krx7/_new  2019-03-14 22:42:58.354627956 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-gear
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,24 +18,34 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-gear
-Version:        0.12.0
+Version:        0.13.0
 Release:        0
 Summary:        Pure Python Async Gear Protocol Library
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            http://pypi.python.org/pypi/gear
+URL:            https://github.com/openstack-infra/gear
 Source:         
https://files.pythonhosted.org/packages/source/g/gear/gear-%{version}.tar.gz
-BuildRequires:  %{python_module pbr}
+BuildRequires:  %{python_module extras}
+BuildRequires:  %{python_module fixtures >= 0.3.12}
+BuildRequires:  %{python_module pbr >= 1.8.0}
+BuildRequires:  %{python_module pyOpenSSL}
+BuildRequires:  %{python_module python-daemon >= 2.0.4}
+BuildRequires:  %{python_module python-subunit}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module six >= 1.5.2}
+BuildRequires:  %{python_module testrepository >= 0.0.13}
+BuildRequires:  %{python_module testresources}
+BuildRequires:  %{python_module testscenarios}
+BuildRequires:  %{python_module testtools >= 0.9.27}
+BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-extras
-Requires:       python-pbr
+Requires:       python-pbr >= 1.8.0
 Requires:       python-python-daemon >= 2.0.4
-Requires:       python-six
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Requires:       python-six >= 1.5.2
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -49,8 +59,12 @@
 
 %install
 %python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 %python_clone -a %{buildroot}%{_bindir}/geard
 
+%check
+%python_expand $python -m unittest discover
+
 %post
 %python_install_alternative geard
 

++++++ gear-0.12.0.tar.gz -> gear-0.13.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/AUTHORS new/gear-0.13.0/AUTHORS
--- old/gear-0.12.0/AUTHORS     2018-04-19 18:13:52.000000000 +0200
+++ new/gear-0.13.0/AUTHORS     2019-01-28 17:30:21.000000000 +0100
@@ -25,3 +25,5 @@
 Sagi Shnaidman <[email protected]>
 Sam Thursfield <[email protected]>
 Swapnil Kulkarni (coolsvap) <[email protected]>
+Tobias Henkel <[email protected]>
+qingszhao <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/ChangeLog new/gear-0.13.0/ChangeLog
--- old/gear-0.12.0/ChangeLog   2018-04-19 18:13:52.000000000 +0200
+++ new/gear-0.13.0/ChangeLog   2019-01-28 17:30:21.000000000 +0100
@@ -1,6 +1,13 @@
 CHANGES
 =======
 
+0.13.0
+------
+
+* Change openstack-dev to openstack-discuss
+* Prefer ipv6 for listen addrs if available
+* Add support for keepalive to client
+
 0.12.0
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/PKG-INFO new/gear-0.13.0/PKG-INFO
--- old/gear-0.12.0/PKG-INFO    2018-04-19 18:13:53.000000000 +0200
+++ new/gear-0.13.0/PKG-INFO    2019-01-28 17:30:21.000000000 +0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: gear
-Version: 0.12.0
+Version: 0.13.0
 Summary: Pure Python Async Gear Protocol Library
 Home-page: http://pypi.python.org/pypi/gear
 Author: OpenStack
-Author-email: [email protected]
+Author-email: [email protected]
 License: UNKNOWN
 Description: python-gear
         ===========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/gear/__init__.py 
new/gear-0.13.0/gear/__init__.py
--- old/gear-0.12.0/gear/__init__.py    2018-04-19 18:12:43.000000000 +0200
+++ new/gear-0.13.0/gear/__init__.py    2019-01-28 17:29:44.000000000 +0100
@@ -124,16 +124,25 @@
     :arg str client_id: The client ID associated with this connection.
         It will be appending to the name of the logger (e.g.,
         gear.Connection.client_id).  Defaults to 'unknown'.
+    :arg bool keepalive: Whether to use TCP keepalives
+    :arg int tcp_keepidle: Idle time after which to start keepalives sending
+    :arg int tcp_keepintvl: Interval in seconds between TCP keepalives
+    :arg int tcp_keepcnt: Count of TCP keepalives to send before disconnect
     """
 
     def __init__(self, host, port, ssl_key=None, ssl_cert=None, ssl_ca=None,
-                 client_id='unknown'):
+                 client_id='unknown', keepalive=False, tcp_keepidle=7200,
+                 tcp_keepintvl=75, tcp_keepcnt=9):
         self.log = logging.getLogger("gear.Connection.%s" % (client_id,))
         self.host = host
         self.port = port
         self.ssl_key = ssl_key
         self.ssl_cert = ssl_cert
         self.ssl_ca = ssl_ca
+        self.keepalive = keepalive
+        self.tcp_keepcnt = tcp_keepcnt
+        self.tcp_keepintvl = tcp_keepintvl
+        self.tcp_keepidle = tcp_keepidle
 
         self.use_ssl = False
         if all([self.ssl_key, self.ssl_cert, self.ssl_ca]):
@@ -182,6 +191,14 @@
             af, socktype, proto, canonname, sa = res
             try:
                 s = socket.socket(af, socktype, proto)
+                if self.keepalive:
+                    s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
+                    s.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE,
+                                 self.tcp_keepidle)
+                    s.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL,
+                                 self.tcp_keepintvl)
+                    s.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT,
+                                 self.tcp_keepcnt)
             except socket.error:
                 s = None
                 continue
@@ -1162,7 +1179,9 @@
         self.broadcast_lock = threading.RLock()
 
     def addServer(self, host, port=4730,
-                  ssl_key=None, ssl_cert=None, ssl_ca=None):
+                  ssl_key=None, ssl_cert=None, ssl_ca=None,
+                  keepalive=False, tcp_keepidle=7200, tcp_keepintvl=75,
+                  tcp_keepcnt=9):
         """Add a server to the client's connection pool.
 
         Any number of Gearman servers may be added to a client.  The
@@ -1184,6 +1203,11 @@
         :arg str ssl_key: Path to the SSL private key.
         :arg str ssl_cert: Path to the SSL certificate.
         :arg str ssl_ca: Path to the CA certificate.
+        :arg bool keepalive: Whether to use TCP keepalives
+        :arg int tcp_keepidle: Idle time after which to start keepalives
+            sending
+        :arg int tcp_keepintvl: Interval in seconds between TCP keepalives
+        :arg int tcp_keepcnt: Count of TCP keepalives to send before disconnect
         :raises ConfigurationError: If the host/port combination has
             already been added to the client.
         """
@@ -1196,7 +1220,8 @@
                 if conn.host == host and conn.port == port:
                     raise ConfigurationError("Host/port already specified")
             conn = Connection(host, port, ssl_key, ssl_cert, ssl_ca,
-                              self.client_id)
+                              self.client_id, keepalive, tcp_keepidle,
+                              tcp_keepintvl, tcp_keepcnt)
             self.inactive_connections.append(conn)
             self.connections_condition.notifyAll()
         finally:
@@ -2735,9 +2760,14 @@
         if all([self.ssl_key, self.ssl_cert, self.ssl_ca]):
             self.use_ssl = True
 
-        for res in socket.getaddrinfo(host, self.port, socket.AF_UNSPEC,
-                                      socket.SOCK_STREAM, 0,
-                                      socket.AI_PASSIVE):
+        # Get all valid passive listen addresses, then sort by family to prefer
+        # ipv6 if available.
+        addrs = socket.getaddrinfo(host, self.port, socket.AF_UNSPEC,
+                                   socket.SOCK_STREAM, 0,
+                                   socket.AI_PASSIVE |
+                                   socket.AI_ADDRCONFIG)
+        addrs.sort(key=lambda addr: addr[0], reverse=True)
+        for res in addrs:
             af, socktype, proto, canonname, sa = res
             try:
                 self.socket = socket.socket(af, socktype, proto)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/gear.egg-info/PKG-INFO 
new/gear-0.13.0/gear.egg-info/PKG-INFO
--- old/gear-0.12.0/gear.egg-info/PKG-INFO      2018-04-19 18:13:52.000000000 
+0200
+++ new/gear-0.13.0/gear.egg-info/PKG-INFO      2019-01-28 17:30:21.000000000 
+0100
@@ -1,10 +1,10 @@
 Metadata-Version: 1.1
 Name: gear
-Version: 0.12.0
+Version: 0.13.0
 Summary: Pure Python Async Gear Protocol Library
 Home-page: http://pypi.python.org/pypi/gear
 Author: OpenStack
-Author-email: [email protected]
+Author-email: [email protected]
 License: UNKNOWN
 Description: python-gear
         ===========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/gear.egg-info/pbr.json 
new/gear-0.13.0/gear.egg-info/pbr.json
--- old/gear-0.12.0/gear.egg-info/pbr.json      2018-04-19 18:13:52.000000000 
+0200
+++ new/gear-0.13.0/gear.egg-info/pbr.json      2019-01-28 17:30:21.000000000 
+0100
@@ -1 +1 @@
-{"git_version": "c00ca94", "is_release": true}
\ No newline at end of file
+{"git_version": "6a74177", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gear-0.12.0/setup.cfg new/gear-0.13.0/setup.cfg
--- old/gear-0.12.0/setup.cfg   2018-04-19 18:13:53.000000000 +0200
+++ new/gear-0.13.0/setup.cfg   2019-01-28 17:30:21.000000000 +0100
@@ -1,7 +1,7 @@
 [metadata]
 name = gear
 author = OpenStack
-author-email = [email protected]
+author-email = [email protected]
 summary = Pure Python Async Gear Protocol Library
 description-file = 
        README.rst


Reply via email to