diff options
author | Tobias Urdin <tobias.urdin@binero.se> | 2022-02-15 21:37:06 +0000 |
---|---|---|
committer | Tobias Urdin <tobias.urdin@binero.com> | 2022-03-21 12:08:19 +0000 |
commit | 5fbb63fa4ff399624fdadd0adc63b35dfb527116 (patch) | |
tree | d638847f4b908fcf439692d321cf33d4c2d5e872 | |
parent | 7ee2780af87a013c83fb5a8a5d0c7ab0767b3db8 (diff) | |
download | tooz-5fbb63fa4ff399624fdadd0adc63b35dfb527116.tar.gz |
Support later tenacity versions
Instead of lambda func use the defined
retry_never Retrying class.
Change-Id: I756b44443d8b5892c04bd1be9faa010e39c763fc
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | tooz/_retry.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/requirements.txt b/requirements.txt index 99a915a..98dec56 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ stevedore>=1.16.0 # Apache-2.0 voluptuous>=0.8.9 # BSD License msgpack>=0.4.0 # Apache-2.0 fasteners>=0.7 # Apache-2.0 -tenacity>=3.2.1,<7.0.0 # Apache-2.0 +tenacity>=3.2.1 # Apache-2.0 futurist>=1.2.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0 oslo.serialization>=1.10.0 # Apache-2.0 diff --git a/tooz/_retry.py b/tooz/_retry.py index 0fa7e95..e799e79 100644 --- a/tooz/_retry.py +++ b/tooz/_retry.py @@ -22,7 +22,7 @@ _default_wait = wait.wait_exponential(max=1) def retry(stop_max_delay=None, **kwargs): - k = {"wait": _default_wait, "retry": lambda x: False} + k = {"wait": _default_wait, "retry": tenacity.retry_never} if stop_max_delay not in (True, False, None): k['stop'] = stop.stop_after_delay(stop_max_delay) return tenacity.retry(**k) |