Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tenacity for openSUSE:Factory 
checked in at 2021-04-23 17:50:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tenacity (Old)
 and      /work/SRC/openSUSE:Factory/.python-tenacity.new.12324 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tenacity"

Fri Apr 23 17:50:40 2021 rev:14 rq:887893 version:6.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tenacity/python-tenacity.changes  
2020-06-30 21:59:03.443240236 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-tenacity.new.12324/python-tenacity.changes   
    2021-04-23 17:50:56.446826683 +0200
@@ -1,0 +2,10 @@
+Thu Apr 22 20:45:21 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 6.3.1:
+  * Make AsyncRetrying callable
+  * Replace nap.sleep with a method to allow mocking after import
+  * Always return booleans from all retry_* methods
+  * Fix asyncio.iscoroutinefunction(f) check for decorated function
+  * Add call method to AsyncRetying
+
+-------------------------------------------------------------------

Old:
----
  tenacity-6.2.0.tar.gz

New:
----
  tenacity-6.3.1.tar.gz

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

Other differences:
------------------
++++++ python-tenacity.spec ++++++
--- /var/tmp/diff_new_pack.bl3FQX/_old  2021-04-23 17:50:56.830827343 +0200
+++ /var/tmp/diff_new_pack.bl3FQX/_new  2021-04-23 17:50:56.834827351 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-tenacity
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 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  python2
 Name:           python-tenacity
-Version:        6.2.0
+Version:        6.3.1
 Release:        0
 Summary:        Python module for retrying code until it succeeeds
 License:        Apache-2.0

++++++ tenacity-6.2.0.tar.gz -> tenacity-6.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/PKG-INFO new/tenacity-6.3.1/PKG-INFO
--- old/tenacity-6.2.0/PKG-INFO 2020-04-30 12:01:33.701704300 +0200
+++ new/tenacity-6.3.1/PKG-INFO 2020-12-16 20:20:53.025258800 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tenacity
-Version: 6.2.0
+Version: 6.3.1
 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.2.0/README.rst 
new/tenacity-6.3.1/README.rst
--- old/tenacity-6.2.0/README.rst       2020-04-30 12:01:22.000000000 +0200
+++ new/tenacity-6.3.1/README.rst       2020-11-02 16:59:34.000000000 +0100
@@ -83,6 +83,10 @@
 .. testsetup:: *
 
     import logging
+    #
+    # Note the following import is used for demonstration convenience only.
+    # Production code should always explicitly import the names it needs.
+    #
     from tenacity import *
 
     class MyException(Exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/doc/source/index.rst 
new/tenacity-6.3.1/doc/source/index.rst
--- old/tenacity-6.2.0/doc/source/index.rst     2020-04-30 12:01:22.000000000 
+0200
+++ new/tenacity-6.3.1/doc/source/index.rst     2020-11-02 16:59:34.000000000 
+0100
@@ -83,6 +83,10 @@
 .. testsetup:: *
 
     import logging
+    #
+    # Note the following import is used for demonstration convenience only.
+    # Production code should always explicitly import the names it needs.
+    #
     from tenacity import *
 
     class MyException(Exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/tenacity-6.2.0/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml
 
new/tenacity-6.3.1/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml
--- 
old/tenacity-6.2.0/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml
      1970-01-01 01:00:00.000000000 +0100
+++ 
new/tenacity-6.3.1/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml
      2020-11-02 16:59:34.000000000 +0100
@@ -0,0 +1,3 @@
+---
+other:
+  - Unit tests can now mock ``nap.sleep()`` for testing in all tenacity usage 
styles
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/__init__.py 
new/tenacity-6.3.1/tenacity/__init__.py
--- old/tenacity-6.2.0/tenacity/__init__.py     2020-04-30 12:01:22.000000000 
+0200
+++ new/tenacity-6.3.1/tenacity/__init__.py     2020-12-16 20:20:28.000000000 
+0100
@@ -30,8 +30,11 @@
 import sys
 import threading
 import typing as t
+import warnings
+from abc import ABCMeta, abstractmethod
 from concurrent import futures
 
+
 import six
 
 from tenacity import _utils
@@ -209,6 +212,7 @@
 
 
 class BaseRetrying(object):
+    __metaclass__ = ABCMeta
 
     def __init__(self,
                  sleep=sleep,
@@ -326,7 +330,7 @@
         """
         @_utils.wraps(f)
         def wrapped_f(*args, **kw):
-            return self.call(f, *args, **kw)
+            return self(f, *args, **kw)
 
         def retry_with(*args, **kwargs):
             return self.copy(*args, **kwargs).wraps(f)
@@ -396,11 +400,21 @@
             else:
                 break
 
+    @abstractmethod
+    def __call__(self, *args, **kwargs):
+        pass
+
+    def call(self, *args, **kwargs):
+        """Use ``__call__`` instead because this method is deprecated."""
+        warnings.warn("'call()' method is deprecated. " +
+                      "Use '__call__()' instead", DeprecationWarning)
+        return self.__call__(*args, **kwargs)
+
 
 class Retrying(BaseRetrying):
     """Retrying controller."""
 
-    def call(self, fn, *args, **kwargs):
+    def __call__(self, fn, *args, **kwargs):
         self.begin(fn)
 
         retry_state = RetryCallState(
@@ -420,8 +434,6 @@
             else:
                 return do
 
-    __call__ = call
-
 
 class Future(futures.Future):
     """Encapsulates a (future or past) attempted call to a target function."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/_asyncio.py 
new/tenacity-6.3.1/tenacity/_asyncio.py
--- old/tenacity-6.2.0/tenacity/_asyncio.py     2020-04-30 12:01:22.000000000 
+0200
+++ new/tenacity-6.3.1/tenacity/_asyncio.py     2020-12-15 10:30:33.000000000 
+0100
@@ -15,7 +15,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-
 import sys
 from asyncio import sleep
 
@@ -34,7 +33,7 @@
         super(AsyncRetrying, self).__init__(**kwargs)
         self.sleep = sleep
 
-    async def call(self, fn, *args, **kwargs):
+    async def __call__(self, fn, *args, **kwargs):
         self.begin(fn)
 
         retry_state = RetryCallState(
@@ -71,3 +70,16 @@
                 await self.sleep(do)
             else:
                 return do
+
+    def wraps(self, fn):
+        fn = super().wraps(fn)
+        # Ensure wrapper is recognized as a coroutine function.
+
+        async def async_wrapped(*args, **kwargs):
+            return await fn(*args, **kwargs)
+
+        # Preserve attributes
+        async_wrapped.retry = fn.retry
+        async_wrapped.retry_with = fn.retry_with
+
+        return async_wrapped
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/nap.py 
new/tenacity-6.3.1/tenacity/nap.py
--- old/tenacity-6.2.0/tenacity/nap.py  2020-04-30 12:01:22.000000000 +0200
+++ new/tenacity-6.3.1/tenacity/nap.py  2020-11-02 16:59:34.000000000 +0100
@@ -18,8 +18,14 @@
 
 import time
 
-#: Default sleep strategy.
-sleep = time.sleep
+
+def sleep(seconds):
+    """
+    Sleep strategy that delays execution for a given number of seconds.
+
+    This is the default strategy, and may be mocked out for unit testing.
+    """
+    time.sleep(seconds)
 
 
 class sleep_using_event(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/retry.py 
new/tenacity-6.3.1/tenacity/retry.py
--- old/tenacity-6.2.0/tenacity/retry.py        2020-04-30 12:01:22.000000000 
+0200
+++ new/tenacity-6.3.1/tenacity/retry.py        2020-11-02 16:59:34.000000000 
+0100
@@ -67,6 +67,8 @@
     def __call__(self, retry_state):
         if retry_state.outcome.failed:
             return self.predicate(retry_state.outcome.exception())
+        else:
+            return False
 
 
 class retry_if_exception_type(retry_if_exception):
@@ -104,6 +106,8 @@
     def __call__(self, retry_state):
         if not retry_state.outcome.failed:
             return self.predicate(retry_state.outcome.result())
+        else:
+            return False
 
 
 class retry_if_not_result(retry_base):
@@ -116,6 +120,8 @@
     def __call__(self, retry_state):
         if not retry_state.outcome.failed:
             return not self.predicate(retry_state.outcome.result())
+        else:
+            return False
 
 
 class retry_if_exception_message(retry_if_exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/tests/test_asyncio.py 
new/tenacity-6.3.1/tenacity/tests/test_asyncio.py
--- old/tenacity-6.2.0/tenacity/tests/test_asyncio.py   2020-04-30 
12:01:22.000000000 +0200
+++ new/tenacity-6.3.1/tenacity/tests/test_asyncio.py   2020-12-16 
20:20:28.000000000 +0100
@@ -14,11 +14,14 @@
 # limitations under the License.
 
 import asyncio
+import inspect
 import unittest
 
+import pytest
+
 import six
 
-from tenacity import RetryError
+from tenacity import AsyncRetrying, RetryError
 from tenacity import _asyncio as tasyncio
 from tenacity import retry, stop_after_attempt
 from tenacity.tests.test_tenacity import NoIOErrorAfterCount, current_time_ms
@@ -34,6 +37,11 @@
     return wrapper
 
 
+async def _async_function(thing):
+    await asyncio.sleep(0.00001)
+    return thing.go()
+
+
 @retry
 async def _retryable_coroutine(thing):
     await asyncio.sleep(0.00001)
@@ -54,6 +62,26 @@
         assert thing.counter == thing.count
 
     @asynctest
+    async def test_iscoroutinefunction(self):
+        assert asyncio.iscoroutinefunction(_retryable_coroutine)
+        assert inspect.iscoroutinefunction(_retryable_coroutine)
+
+    @asynctest
+    async def test_retry_using_async_retying(self):
+        thing = NoIOErrorAfterCount(5)
+        retrying = AsyncRetrying()
+        await retrying(_async_function, thing)
+        assert thing.counter == thing.count
+
+    @asynctest
+    async def test_retry_using_async_retying_legacy_method(self):
+        thing = NoIOErrorAfterCount(5)
+        retrying = AsyncRetrying()
+        with pytest.warns(DeprecationWarning):
+            await retrying.call(_async_function, thing)
+        assert thing.counter == thing.count
+
+    @asynctest
     async def test_stop_after_attempt(self):
         thing = NoIOErrorAfterCount(2)
         try:
@@ -64,6 +92,10 @@
     def test_repr(self):
         repr(tasyncio.AsyncRetrying())
 
+    def test_retry_attributes(self):
+        assert hasattr(_retryable_coroutine, 'retry')
+        assert hasattr(_retryable_coroutine, 'retry_with')
+
     @asynctest
     async def test_attempt_number_is_correct_for_interleaved_coroutines(self):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/tests/test_tenacity.py 
new/tenacity-6.3.1/tenacity/tests/test_tenacity.py
--- old/tenacity-6.2.0/tenacity/tests/test_tenacity.py  2020-04-30 
12:01:22.000000000 +0200
+++ new/tenacity-6.3.1/tenacity/tests/test_tenacity.py  2020-11-02 
16:59:34.000000000 +0100
@@ -14,7 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import logging
-import os
 import re
 import sys
 import time
@@ -34,8 +33,13 @@
 
 
 class TestBase(unittest.TestCase):
+
     def test_repr(self):
-        repr(tenacity.BaseRetrying())
+        class ConcreteRetrying(tenacity.BaseRetrying):
+            def __call__(self):
+                pass
+
+        repr(ConcreteRetrying())
 
 
 class TestStopConditions(unittest.TestCase):
@@ -135,7 +139,7 @@
         def failing():
             raise NotImplementedError()
         with pytest.raises(RetryError):
-            retrying.call(failing)
+            retrying(failing)
 
     def test_stop_func_with_retry_state(self):
         def stop_func(retry_state):
@@ -283,7 +287,7 @@
                      stop=tenacity.stop_after_attempt(r_attempts),
                      reraise=True)
         with reports_deprecation_warning():
-            self.assertRaises(Exception, r.call, dying)
+            self.assertRaises(Exception, r, dying)
         self.assertEqual(r_attempts - 1, len(captures))
         self.assertTrue(all([r.failed for r in captures]))
 
@@ -451,14 +455,14 @@
 
         retrying1 = Retrying(wait=wait1, stop=tenacity.stop_after_attempt(4))
         with reports_deprecation_warning():
-            self.assertRaises(Exception, lambda: retrying1.call(dying))
+            self.assertRaises(Exception, lambda: retrying1(dying))
         self.assertEqual([t[0] for t in wait1.calls], [1, 2, 3])
         # This assumes that 3 iterations complete within 1 second.
         self.assertTrue(all(t[1] < 1 for t in wait1.calls))
 
         retrying2 = Retrying(wait=wait2, stop=tenacity.stop_after_attempt(4))
         with reports_deprecation_warning():
-            self.assertRaises(Exception, lambda: retrying2.call(dying))
+            self.assertRaises(Exception, lambda: retrying2(dying))
         self.assertEqual([t[0] for t in wait2.calls], [1, 2, 3])
         # This assumes that 3 iterations complete within 1 second.
         self.assertTrue(all(t[1] < 1 for t in wait2.calls))
@@ -494,7 +498,7 @@
         def returnval():
             return 123
         try:
-            retrying.call(returnval)
+            retrying(returnval)
         except ExtractCallState as err:
             retry_state = err.args[0]
         self.assertIs(retry_state.fn, returnval)
@@ -502,13 +506,13 @@
         self.assertEqual(retry_state.kwargs, {})
         self.assertEqual(retry_state.outcome.result(), 123)
         self.assertEqual(retry_state.attempt_number, 1)
-        self.assertGreater(retry_state.outcome_timestamp,
-                           retry_state.start_time)
+        self.assertGreaterEqual(retry_state.outcome_timestamp,
+                                retry_state.start_time)
 
         def dying():
             raise Exception("Broken")
         try:
-            retrying.call(dying)
+            retrying(dying)
         except ExtractCallState as err:
             retry_state = err.args[0]
         self.assertIs(retry_state.fn, dying)
@@ -516,8 +520,8 @@
         self.assertEqual(retry_state.kwargs, {})
         self.assertEqual(str(retry_state.outcome.exception()), 'Broken')
         self.assertEqual(retry_state.attempt_number, 1)
-        self.assertGreater(retry_state.outcome_timestamp,
-                           retry_state.start_time)
+        self.assertGreaterEqual(retry_state.outcome_timestamp,
+                                retry_state.start_time)
 
 
 class TestRetryConditions(unittest.TestCase):
@@ -598,7 +602,7 @@
     def test_retry_try_again(self):
         self._attempts = 0
         Retrying(stop=tenacity.stop_after_attempt(5),
-                 retry=tenacity.retry_never).call(self._raise_try_again)
+                 retry=tenacity.retry_never)(self._raise_try_again)
         self.assertEqual(3, self._attempts)
 
     def test_retry_try_again_forever(self):
@@ -608,7 +612,7 @@
         r = Retrying(stop=tenacity.stop_after_attempt(5),
                      retry=tenacity.retry_never)
         self.assertRaises(tenacity.RetryError,
-                          r.call,
+                          r,
                           _r)
         self.assertEqual(5, r.statistics['attempt_number'])
 
@@ -1048,7 +1052,7 @@
         def failing():
             raise NotImplementedError()
         with pytest.raises(RetryError):
-            retrying.call(failing)
+            retrying(failing)
 
 
 class TestBeforeAfterAttempts(unittest.TestCase):
@@ -1143,7 +1147,7 @@
 
         self.assertEqual(self.slept, 2)
 
-    def test_before_sleep_log_raises(self):
+    def _before_sleep_log_raises(self, get_call_fn):
         thing = NoIOErrorAfterCount(2)
         logger = logging.getLogger(self.id())
         logger.propagate = False
@@ -1155,7 +1159,7 @@
             retrying = Retrying(wait=tenacity.wait_fixed(0.01),
                                 stop=tenacity.stop_after_attempt(3),
                                 before_sleep=_before_sleep)
-            retrying.call(thing.go)
+            get_call_fn(retrying)(thing.go)
         finally:
             logger.removeHandler(handler)
 
@@ -1166,6 +1170,12 @@
         self.assertRegexpMatches(fmt(handler.records[0]), etalon_re)
         self.assertRegexpMatches(fmt(handler.records[1]), etalon_re)
 
+    def test_before_sleep_log_raises(self):
+        self._before_sleep_log_raises(lambda x: x)
+
+    def test_before_sleep_log_raises_deprecated_call(self):
+        self._before_sleep_log_raises(lambda x: x.call)
+
     def test_before_sleep_log_raises_with_exc_info(self):
         thing = NoIOErrorAfterCount(2)
         logger = logging.getLogger(self.id())
@@ -1180,14 +1190,14 @@
             retrying = Retrying(wait=tenacity.wait_fixed(0.01),
                                 stop=tenacity.stop_after_attempt(3),
                                 before_sleep=_before_sleep)
-            retrying.call(thing.go)
+            retrying(thing.go)
         finally:
             logger.removeHandler(handler)
 
         etalon_re = re.compile(r"^Retrying .* in 0\.01 seconds as it raised "
                                r"(IO|OS)Error: Hi there, I'm an IOError\.{0}"
                                r"Traceback \(most recent call last\):{0}"
-                               r".*$".format(os.linesep),
+                               r".*$".format('\n'),
                                flags=re.MULTILINE)
         self.assertEqual(len(handler.records), 2)
         fmt = logging.Formatter().format
@@ -1209,7 +1219,7 @@
             retrying = Retrying(wait=tenacity.wait_fixed(0.01),
                                 stop=tenacity.stop_after_attempt(3),
                                 retry=_retry, before_sleep=_before_sleep)
-            retrying.call(thing.go)
+            retrying(thing.go)
         finally:
             logger.removeHandler(handler)
 
@@ -1421,6 +1431,81 @@
         self.assertRaises(CustomError, test)
 
 
+class TestInvokeAsCallable:
+    """Test direct invocation of Retrying as a callable."""
+
+    @staticmethod
+    def invoke(retry, f):
+        """
+        Invoke Retrying logic.
+
+        Wrapper allows testing different call mechanisms in test sub-classes.
+        """
+        return retry(f)
+
+    def test_retry_one(self):
+        def f():
+            f.calls.append(len(f.calls) + 1)
+            if len(f.calls) <= 1:
+                raise Exception("Retry it!")
+            return 42
+        f.calls = []
+
+        retry = Retrying()
+        assert self.invoke(retry, f) == 42
+        assert f.calls == [1, 2]
+
+    def test_on_error(self):
+        class CustomError(Exception):
+            pass
+
+        def f():
+            f.calls.append(len(f.calls) + 1)
+            if len(f.calls) <= 1:
+                raise CustomError("Don't retry!")
+            return 42
+        f.calls = []
+
+        retry = Retrying(retry=tenacity.retry_if_exception_type(IOError))
+        with pytest.raises(CustomError):
+            self.invoke(retry, f)
+        assert f.calls == [1]
+
+    def test_retry_error(self):
+        def f():
+            f.calls.append(len(f.calls) + 1)
+            raise Exception("Retry it!")
+        f.calls = []
+
+        retry = Retrying(stop=tenacity.stop_after_attempt(2))
+        with pytest.raises(RetryError):
+            self.invoke(retry, f)
+        assert f.calls == [1, 2]
+
+    def test_reraise(self):
+        class CustomError(Exception):
+            pass
+
+        def f():
+            f.calls.append(len(f.calls) + 1)
+            raise CustomError("Retry it!")
+        f.calls = []
+
+        retry = Retrying(reraise=True, stop=tenacity.stop_after_attempt(2))
+        with pytest.raises(CustomError):
+            self.invoke(retry, f)
+        assert f.calls == [1, 2]
+
+
+class TestInvokeViaLegacyCallMethod(TestInvokeAsCallable):
+    """Retrying.call() method should work the same as Retrying.__call__()."""
+
+    @staticmethod
+    def invoke(retry, f):
+        with reports_deprecation_warning():
+            return retry.call(f)
+
+
 class TestRetryException(unittest.TestCase):
 
     def test_retry_error_is_pickleable(self):
@@ -1479,5 +1564,50 @@
         warnings.filters = oldfilters
 
 
+class TestMockingSleep():
+    RETRY_ARGS = dict(
+        wait=tenacity.wait_fixed(0.1),
+        stop=tenacity.stop_after_attempt(5),
+    )
+
+    def _fail(self):
+        raise NotImplementedError()
+
+    @retry(**RETRY_ARGS)
+    def _decorated_fail(self):
+        self._fail()
+
+    @pytest.fixture()
+    def mock_sleep(self, monkeypatch):
+        class MockSleep(object):
+            call_count = 0
+
+            def __call__(self, seconds):
+                self.call_count += 1
+
+        sleep = MockSleep()
+        monkeypatch.setattr(tenacity.nap.time, "sleep", sleep)
+        yield sleep
+
+    def test_call(self, mock_sleep):
+        retrying = Retrying(**self.RETRY_ARGS)
+        with pytest.raises(RetryError):
+            retrying.call(self._fail)
+        assert mock_sleep.call_count == 4
+
+    def test_decorated(self, mock_sleep):
+        with pytest.raises(RetryError):
+            self._decorated_fail()
+        assert mock_sleep.call_count == 4
+
+    def test_decorated_retry_with(self, mock_sleep):
+        fail_faster = self._decorated_fail.retry_with(
+            stop=tenacity.stop_after_attempt(2),
+        )
+        with pytest.raises(RetryError):
+            fail_faster()
+        assert mock_sleep.call_count == 1
+
+
 if __name__ == '__main__':
     unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity/tornadoweb.py 
new/tenacity-6.3.1/tenacity/tornadoweb.py
--- old/tenacity-6.2.0/tenacity/tornadoweb.py   2020-04-30 12:01:22.000000000 
+0200
+++ new/tenacity-6.3.1/tenacity/tornadoweb.py   2020-11-02 16:59:34.000000000 
+0100
@@ -32,7 +32,7 @@
         self.sleep = sleep
 
     @gen.coroutine
-    def call(self, fn, *args, **kwargs):
+    def __call__(self, fn, *args, **kwargs):
         self.begin(fn)
 
         retry_state = RetryCallState(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity.egg-info/PKG-INFO 
new/tenacity-6.3.1/tenacity.egg-info/PKG-INFO
--- old/tenacity-6.2.0/tenacity.egg-info/PKG-INFO       2020-04-30 
12:01:33.000000000 +0200
+++ new/tenacity-6.3.1/tenacity.egg-info/PKG-INFO       2020-12-16 
20:20:52.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tenacity
-Version: 6.2.0
+Version: 6.3.1
 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.2.0/tenacity.egg-info/SOURCES.txt 
new/tenacity-6.3.1/tenacity.egg-info/SOURCES.txt
--- old/tenacity-6.2.0/tenacity.egg-info/SOURCES.txt    2020-04-30 
12:01:33.000000000 +0200
+++ new/tenacity-6.3.1/tenacity.egg-info/SOURCES.txt    2020-12-16 
20:20:52.000000000 +0100
@@ -13,6 +13,7 @@
 doc/source/conf.py
 doc/source/index.rst
 releasenotes/notes/add-reno-d1ab5710f272650a.yaml
+releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml
 releasenotes/notes/before_sleep_log-improvements-d8149274dfb37d7c.yaml
 tenacity/__init__.py
 tenacity/_asyncio.py
@@ -30,6 +31,7 @@
 tenacity.egg-info/PKG-INFO
 tenacity.egg-info/SOURCES.txt
 tenacity.egg-info/dependency_links.txt
+tenacity.egg-info/pbr.json
 tenacity.egg-info/requires.txt
 tenacity.egg-info/top_level.txt
 tenacity/tests/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tenacity-6.2.0/tenacity.egg-info/pbr.json 
new/tenacity-6.3.1/tenacity.egg-info/pbr.json
--- old/tenacity-6.2.0/tenacity.egg-info/pbr.json       1970-01-01 
01:00:00.000000000 +0100
+++ new/tenacity-6.3.1/tenacity.egg-info/pbr.json       2019-08-16 
10:42:49.000000000 +0200
@@ -0,0 +1 @@
+{"git_version": "58495e5", "is_release": false}
\ No newline at end of file

Reply via email to