Hello community,

here is the log from the commit of package python-aiorpcX for openSUSE:Factory 
checked in at 2019-03-22 15:00:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiorpcX (Old)
 and      /work/SRC/openSUSE:Factory/.python-aiorpcX.new.25356 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-aiorpcX"

Fri Mar 22 15:00:32 2019 rev:2 rq:682110 version:0.10.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aiorpcX/python-aiorpcX.changes    
2019-02-27 15:06:18.766444016 +0100
+++ /work/SRC/openSUSE:Factory/.python-aiorpcX.new.25356/python-aiorpcX.changes 
2019-03-22 15:00:38.125816960 +0100
@@ -1,0 +2,7 @@
+Wed Mar  6 11:20:11 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.10.5:
+  * batches: fix handling of session loss
+  * Export normalize_corofunc
+
+-------------------------------------------------------------------

Old:
----
  0.10.4.tar.gz

New:
----
  0.10.5.tar.gz

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

Other differences:
------------------
++++++ python-aiorpcX.spec ++++++
--- /var/tmp/diff_new_pack.GdIlic/_old  2019-03-22 15:00:39.261816191 +0100
+++ /var/tmp/diff_new_pack.GdIlic/_new  2019-03-22 15:00:39.265816188 +0100
@@ -17,17 +17,20 @@
 
 
 %define skip_python2 1
-
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-aiorpcX
-Version:        0.10.4
+Version:        0.10.5
 Release:        0
 Summary:        Generic async RPC implementation, including JSON-RPC
 License:        MIT
 Group:          Development/Languages/Python
-Url:            https://github.com/kyuupichan/aiorpcX
+URL:            https://github.com/kyuupichan/aiorpcX
 Source:         https://github.com/kyuupichan/aiorpcX/archive/%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+Requires:       python-attrs
+BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module aiohttp >= 2.3.2}
 BuildRequires:  %{python_module attrs}
@@ -35,11 +38,6 @@
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module uvloop}
 # /SECTION
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
-Requires:       python-attrs
-BuildArch:      noarch
-
 %python_subpackages
 
 %description

++++++ 0.10.4.tar.gz -> 0.10.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/aiorpcx/__init__.py 
new/aiorpcX-0.10.5/aiorpcx/__init__.py
--- old/aiorpcX-0.10.4/aiorpcx/__init__.py      2019-02-08 04:01:52.000000000 
+0100
+++ new/aiorpcX-0.10.5/aiorpcx/__init__.py      2019-02-16 07:09:27.000000000 
+0100
@@ -6,7 +6,7 @@
 from .util import *
 
 
-_version_str = '0.10.4'
+_version_str = '0.10.5'
 _version = tuple(int(part) for part in _version_str.split('.'))
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/aiorpcx/framing.py 
new/aiorpcX-0.10.5/aiorpcx/framing.py
--- old/aiorpcX-0.10.4/aiorpcx/framing.py       2019-02-08 04:01:52.000000000 
+0100
+++ new/aiorpcX-0.10.5/aiorpcx/framing.py       2019-02-16 07:09:27.000000000 
+0100
@@ -31,7 +31,7 @@
 from hashlib import sha256 as _sha256
 from struct import Struct
 
-from aiorpcx import Queue
+from .curio import Queue
 
 
 class FramerBase(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/aiorpcx/session.py 
new/aiorpcX-0.10.5/aiorpcx/session.py
--- old/aiorpcX-0.10.4/aiorpcx/session.py       2019-02-08 04:01:52.000000000 
+0100
+++ new/aiorpcX-0.10.5/aiorpcx/session.py       2019-02-16 07:09:27.000000000 
+0100
@@ -31,7 +31,6 @@
 import asyncio
 import logging
 import time
-from contextlib import suppress
 
 from aiorpcx.curio import (
     Event, TaskGroup, TaskTimeout, CancelledError,
@@ -436,9 +435,13 @@
             message, event = self._session.connection.send_batch(self.batch)
             await self._session._send_message(message)
             await event.wait()
-            self.results = event.result
+            result = event.result
+            # Can happen with cancel_pending_requests
+            if isinstance(result, CancelledError):
+                raise result
+            self.results = result
             if self._raise_errors:
-                if any(isinstance(item, Exception) for item in event.result):
+                if any(isinstance(item, Exception) for item in result):
                     raise BatchError(self)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/aiorpcx/util.py 
new/aiorpcX-0.10.5/aiorpcx/util.py
--- old/aiorpcX-0.10.4/aiorpcx/util.py  2019-02-08 04:01:52.000000000 +0100
+++ new/aiorpcX-0.10.5/aiorpcx/util.py  2019-02-16 07:09:27.000000000 +0100
@@ -23,7 +23,7 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-__all__ = ()
+__all__ = ('normalize_corofunc', )
 
 
 import asyncio
@@ -85,23 +85,24 @@
     return SignatureInfo(min_args, max_args, required_names, other_names)
 
 
+def _require_non_negative(value):
+    if not isinstance(value, int) or value < 0:
+        raise RuntimeError('concurrency must be a natural number')
+
+
 class Concurrency(object):
 
     def __init__(self, max_concurrent):
-        self._require_non_negative(max_concurrent)
+        _require_non_negative(max_concurrent)
         self._max_concurrent = max_concurrent
         self.semaphore = asyncio.Semaphore(max_concurrent)
 
-    def _require_non_negative(self, value):
-        if not isinstance(value, int) or value < 0:
-            raise RuntimeError('concurrency must be a natural number')
-
     @property
     def max_concurrent(self):
         return self._max_concurrent
 
     async def set_max_concurrent(self, value):
-        self._require_non_negative(value)
+        _require_non_negative(value)
         diff = value - self._max_concurrent
         self._max_concurrent = value
         if diff >= 0:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/docs/changelog.rst 
new/aiorpcX-0.10.5/docs/changelog.rst
--- old/aiorpcX-0.10.4/docs/changelog.rst       2019-02-08 04:01:52.000000000 
+0100
+++ new/aiorpcX-0.10.5/docs/changelog.rst       2019-02-16 07:09:27.000000000 
+0100
@@ -4,6 +4,12 @@
 .. note:: The aiorpcX API changes regularly and is still unstable
 
 
+Version 0.10.5 (16 Feb 2019)
+----------------------------
+
+* export 'normalize_corofunc'
+* batches: fix handling of session loss; add test
+
 Version 0.10.4 (07 Feb 2019)
 ----------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aiorpcX-0.10.4/tests/test_session.py 
new/aiorpcX-0.10.5/tests/test_session.py
--- old/aiorpcX-0.10.4/tests/test_session.py    2019-02-08 04:01:52.000000000 
+0100
+++ new/aiorpcX-0.10.5/tests/test_session.py    2019-02-16 07:09:27.000000000 
+0100
@@ -419,6 +419,18 @@
             assert isinstance(batch.results[1], RPCError)
 
     @pytest.mark.asyncio
+    async def test_send_batch_cancelled(self, server):
+        async with Connector(RPCSession, 'localhost', server.port) as client:
+            async def send_batch():
+                async with client.send_batch(raise_errors=True) as batch:
+                    batch.add_request('sleepy')
+
+            task = await spawn(send_batch)
+            await client.close()
+            with pytest.raises(CancelledError):
+                task.result()
+
+    @pytest.mark.asyncio
     async def test_send_batch_bad_request(self, server):
         async with Connector(RPCSession, 'localhost', server.port) as client:
             with RaiseTest(JSONRPC.METHOD_NOT_FOUND, 'string', ProtocolError):


Reply via email to