Hello community,

here is the log from the commit of package python-tenacity for openSUSE:Factory 
checked in at 2020-03-03 10:15:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tenacity (Old)
 and      /work/SRC/openSUSE:Factory/.python-tenacity.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tenacity"

Tue Mar  3 10:15:17 2020 rev:11 rq:780390 version:6.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tenacity/python-tenacity.changes  
2019-12-21 12:34:54.099463678 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-tenacity.new.26092/python-tenacity.changes   
    2020-03-03 10:15:37.254573469 +0100
@@ -1,0 +2,6 @@
+Fri Feb 28 21:45:23 UTC 2020 - Dirk Mueller <dmuel...@suse.com>
+
+- update to 6.1.0:
+  * further Python 3.8 fixes
+
+-------------------------------------------------------------------

Old:
----
  tenacity-6.0.0.tar.gz

New:
----
  tenacity-6.1.0.tar.gz

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

Other differences:
------------------
++++++ python-tenacity.spec ++++++
--- /var/tmp/diff_new_pack.n4Hswm/_old  2020-03-03 10:15:42.530584386 +0100
+++ /var/tmp/diff_new_pack.n4Hswm/_new  2020-03-03 10:15:42.570584469 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-tenacity
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %bcond_without  test
 Name:           python-tenacity
-Version:        6.0.0
+Version:        6.1.0
 Release:        0
 Summary:        Python module for retrying code until it succeeeds
 License:        Apache-2.0

++++++ tenacity-6.0.0.tar.gz -> tenacity-6.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/PKG-INFO new/tenacity-6.1.0/PKG-INFO
--- old/tenacity-6.0.0/PKG-INFO 2019-11-06 13:12:40.568314800 +0100
+++ new/tenacity-6.1.0/PKG-INFO 2020-02-26 11:39:48.327270300 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tenacity
-Version: 6.0.0
+Version: 6.1.0
 Summary: Retry code until it succeeds
 Home-page: https://github.com/jd/tenacity
 Author: Julien Danjou
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/README.rst 
new/tenacity-6.1.0/README.rst
--- old/tenacity-6.0.0/README.rst       2019-11-06 13:12:32.000000000 +0100
+++ new/tenacity-6.1.0/README.rst       2020-02-26 11:39:39.000000000 +0100
@@ -9,7 +9,7 @@
 .. image:: https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg
     :target: https://saythanks.io/to/jd
 
-.. image:: 
https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/jd/tenacity&style=flat
+.. image:: 
https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/jd/tenacity&style=flat
    :target: https://mergify.io
    :alt: Mergify Status
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/doc/source/api.rst 
new/tenacity-6.1.0/doc/source/api.rst
--- old/tenacity-6.0.0/doc/source/api.rst       2019-11-06 13:12:32.000000000 
+0100
+++ new/tenacity-6.1.0/doc/source/api.rst       2020-02-26 11:39:39.000000000 
+0100
@@ -14,7 +14,7 @@
 .. autoclass:: tenacity.AsyncRetrying
    :members:
 
-.. autoclass:: tenacity.TornadoRetrying
+.. autoclass:: tenacity.tornadoweb.TornadoRetrying
    :members:
 
 After Functions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/doc/source/conf.py 
new/tenacity-6.1.0/doc/source/conf.py
--- old/tenacity-6.0.0/doc/source/conf.py       2019-11-06 13:12:32.000000000 
+0100
+++ new/tenacity-6.1.0/doc/source/conf.py       2020-02-26 11:39:39.000000000 
+0100
@@ -17,10 +17,14 @@
 # limitations under the License.
 
 import os
+import sys
 
 master_doc = 'index'
 project = "Tenacity"
 
+# Add tenacity to the path, so sphinx can find the functions for autodoc.
+sys.path.insert(0, os.path.abspath('../..'))
+
 extensions = [
     'sphinx.ext.doctest',
     'sphinx.ext.autodoc',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/doc/source/index.rst 
new/tenacity-6.1.0/doc/source/index.rst
--- old/tenacity-6.0.0/doc/source/index.rst     2019-11-06 13:12:32.000000000 
+0100
+++ new/tenacity-6.1.0/doc/source/index.rst     2020-02-26 11:39:39.000000000 
+0100
@@ -9,7 +9,7 @@
 .. image:: https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg
     :target: https://saythanks.io/to/jd
 
-.. image:: 
https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/jd/tenacity&style=flat
+.. image:: 
https://img.shields.io/endpoint.svg?url=https://dashboard.mergify.io/badges/jd/tenacity&style=flat
    :target: https://mergify.io
    :alt: Mergify Status
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/tenacity/__init__.py 
new/tenacity-6.1.0/tenacity/__init__.py
--- old/tenacity-6.0.0/tenacity/__init__.py     2019-11-06 13:12:32.000000000 
+0100
+++ new/tenacity-6.1.0/tenacity/__init__.py     2020-02-26 11:39:39.000000000 
+0100
@@ -18,9 +18,9 @@
 # limitations under the License.
 
 try:
-    import asyncio
+    from inspect import iscoroutinefunction
 except ImportError:
-    asyncio = None
+    iscoroutinefunction = None
 
 try:
     import tornado
@@ -96,7 +96,7 @@
         return retry()(dargs[0])
     else:
         def wrap(f):
-            if asyncio and asyncio.iscoroutinefunction(f):
+            if iscoroutinefunction is not None and iscoroutinefunction(f):
                 r = AsyncRetrying(*dargs, **dkw)
             elif tornado and hasattr(tornado.gen, 'is_coroutine_function') \
                     and tornado.gen.is_coroutine_function(f):
@@ -479,7 +479,7 @@
         self.outcome, self.outcome_timestamp = fut, ts
 
 
-if asyncio:
+if iscoroutinefunction:
     from tenacity._asyncio import AsyncRetrying
 
 if tornado:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/tenacity/_asyncio.py 
new/tenacity-6.1.0/tenacity/_asyncio.py
--- old/tenacity-6.0.0/tenacity/_asyncio.py     2019-11-06 13:12:32.000000000 
+0100
+++ new/tenacity-6.1.0/tenacity/_asyncio.py     2020-02-26 11:39:39.000000000 
+0100
@@ -16,12 +16,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-try:
-    import asyncio
-except ImportError:
-    asyncio = None
-
 import sys
+from asyncio import sleep
 
 from tenacity import BaseRetrying
 from tenacity import DoAttempt
@@ -29,38 +25,30 @@
 from tenacity import RetryCallState
 
 
-if asyncio:
-    class AsyncRetrying(BaseRetrying):
+class AsyncRetrying(BaseRetrying):
 
-        def __init__(self,
-                     sleep=asyncio.sleep,
-                     **kwargs):
-            super(AsyncRetrying, self).__init__(**kwargs)
-            self.sleep = sleep
-
-        def wraps(self, fn):
-            fn = super().wraps(fn)
-            # Ensure wrapper is recognized as a coroutine function.
-            fn._is_coroutine = asyncio.coroutines._is_coroutine
-            return fn
-
-        @asyncio.coroutine
-        def call(self, fn, *args, **kwargs):
-            self.begin(fn)
-
-            retry_state = RetryCallState(
-                retry_object=self, fn=fn, args=args, kwargs=kwargs)
-            while True:
-                do = self.iter(retry_state=retry_state)
-                if isinstance(do, DoAttempt):
-                    try:
-                        result = yield from fn(*args, **kwargs)
-                    except BaseException:
-                        retry_state.set_exception(sys.exc_info())
-                    else:
-                        retry_state.set_result(result)
-                elif isinstance(do, DoSleep):
-                    retry_state.prepare_for_next_attempt()
-                    yield from self.sleep(do)
+    def __init__(self,
+                 sleep=sleep,
+                 **kwargs):
+        super(AsyncRetrying, self).__init__(**kwargs)
+        self.sleep = sleep
+
+    async def call(self, fn, *args, **kwargs):
+        self.begin(fn)
+
+        retry_state = RetryCallState(
+            retry_object=self, fn=fn, args=args, kwargs=kwargs)
+        while True:
+            do = self.iter(retry_state=retry_state)
+            if isinstance(do, DoAttempt):
+                try:
+                    result = await fn(*args, **kwargs)
+                except BaseException:
+                    retry_state.set_exception(sys.exc_info())
                 else:
-                    return do
+                    retry_state.set_result(result)
+            elif isinstance(do, DoSleep):
+                retry_state.prepare_for_next_attempt()
+                await self.sleep(do)
+            else:
+                return do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/tenacity/tests/test_asyncio.py 
new/tenacity-6.1.0/tenacity/tests/test_asyncio.py
--- old/tenacity-6.0.0/tenacity/tests/test_asyncio.py   2019-11-06 
13:12:32.000000000 +0100
+++ new/tenacity-6.1.0/tenacity/tests/test_asyncio.py   2020-02-26 
11:39:39.000000000 +0100
@@ -25,8 +25,6 @@
 
 
 def asynctest(callable_):
-    callable_ = asyncio.coroutine(callable_)
-
     @six.wraps(callable_)
     def wrapper(*a, **kw):
         loop = asyncio.get_event_loop()
@@ -42,27 +40,23 @@
 
 
 @retry(stop=stop_after_attempt(2))
-@asyncio.coroutine
-def _retryable_coroutine_with_2_attempts(thing):
-    yield from asyncio.sleep(0.00001)
+async def _retryable_coroutine_with_2_attempts(thing):
+    await asyncio.sleep(0.00001)
     thing.go()
 
 
 class TestAsync(unittest.TestCase):
     @asynctest
-    def test_retry(self):
-        assert asyncio.iscoroutinefunction(_retryable_coroutine)
+    async def test_retry(self):
         thing = NoIOErrorAfterCount(5)
-        yield from _retryable_coroutine(thing)
+        await _retryable_coroutine(thing)
         assert thing.counter == thing.count
 
     @asynctest
-    def test_stop_after_attempt(self):
-        assert asyncio.iscoroutinefunction(
-            _retryable_coroutine_with_2_attempts)
+    async def test_stop_after_attempt(self):
         thing = NoIOErrorAfterCount(2)
         try:
-            yield from _retryable_coroutine_with_2_attempts(thing)
+            await _retryable_coroutine_with_2_attempts(thing)
         except RetryError:
             assert thing.counter == 2
 
@@ -70,7 +64,7 @@
         repr(tasyncio.AsyncRetrying())
 
     @asynctest
-    def test_attempt_number_is_correct_for_interleaved_coroutines(self):
+    async def test_attempt_number_is_correct_for_interleaved_coroutines(self):
 
         attempts = []
 
@@ -79,22 +73,21 @@
 
         thing1 = NoIOErrorAfterCount(3)
         thing2 = NoIOErrorAfterCount(3)
-        future1 = asyncio.ensure_future(
-            _retryable_coroutine.retry_with(after=after)(thing1))
-        future2 = asyncio.ensure_future(
+
+        await asyncio.gather(
+            _retryable_coroutine.retry_with(after=after)(thing1),
             _retryable_coroutine.retry_with(after=after)(thing2))
-        yield from asyncio.gather(future1, future2)
 
         # There's no waiting on retry, only a wait in the coroutine, so the
         # executions should be interleaved.
-        thing1_attempts = attempts[::2]
-        things1, attempt_nos1 = zip(*thing1_attempts)
-        assert all(thing is thing1 for thing in things1)
+        even_thing_attempts = attempts[::2]
+        things, attempt_nos1 = zip(*even_thing_attempts)
+        assert len(set(things)) == 1
         assert list(attempt_nos1) == [1, 2, 3]
 
-        thing2_attempts = attempts[1::2]
-        things2, attempt_nos2 = zip(*thing2_attempts)
-        assert all(thing is thing2 for thing in things2)
+        odd_thing_attempts = attempts[1::2]
+        things, attempt_nos2 = zip(*odd_thing_attempts)
+        assert len(set(things)) == 1
         assert list(attempt_nos2) == [1, 2, 3]
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/tenacity.egg-info/PKG-INFO 
new/tenacity-6.1.0/tenacity.egg-info/PKG-INFO
--- old/tenacity-6.0.0/tenacity.egg-info/PKG-INFO       2019-11-06 
13:12:40.000000000 +0100
+++ new/tenacity-6.1.0/tenacity.egg-info/PKG-INFO       2020-02-26 
11:39:48.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tenacity
-Version: 6.0.0
+Version: 6.1.0
 Summary: Retry code until it succeeds
 Home-page: https://github.com/jd/tenacity
 Author: Julien Danjou
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.0.0/tox.ini new/tenacity-6.1.0/tox.ini
--- old/tenacity-6.0.0/tox.ini  2019-11-06 13:12:32.000000000 +0100
+++ new/tenacity-6.1.0/tox.ini  2020-02-26 11:39:39.000000000 +0100
@@ -1,5 +1,5 @@
 [tox]
-envlist = py27, py35, py36, py37, pep8, pypy
+envlist = py27, py35, py36, py37, py38, pep8, pypy
 
 [testenv]
 usedevelop = True
@@ -9,9 +9,9 @@
     pytest
 commands =
     py{27,py}: pytest --ignore='tenacity/tests/test_asyncio.py' {posargs}
-    py3{5,6,7}: pytest {posargs}
-    py3{5,6,7}: sphinx-build -a -E -W -b doctest doc/source doc/build
-    py3{5,6,7}: sphinx-build -a -E -W -b html doc/source doc/build
+    py3{5,6,7,8}: pytest {posargs}
+    py3{5,6,7,8}: sphinx-build -a -E -W -b doctest doc/source doc/build
+    py3{5,6,7,8}: sphinx-build -a -E -W -b html doc/source doc/build
 
 [testenv:pep8]
 basepython = python3


Reply via email to