tenacity 8.5.0__tar.gz → 9.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tenacity-8.5.0/tenacity.egg-info → tenacity-9.0.0}/PKG-INFO +1 -1
- tenacity-9.0.0/releasenotes/notes/wait-random-exponential-min-2a4b7eed9f002436.yaml +4 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/wait.py +1 -1
- {tenacity-8.5.0 → tenacity-9.0.0/tenacity.egg-info}/PKG-INFO +1 -1
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/SOURCES.txt +1 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_tenacity.py +10 -2
- {tenacity-8.5.0 → tenacity-9.0.0}/.editorconfig +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.github/dependabot.yml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.github/workflows/ci.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.github/workflows/deploy.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.gitignore +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.mergify.yml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/.readthedocs.yml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/LICENSE +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/README.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/api.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/changelog.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/conf.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/index.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/pyproject.toml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/Use--for-formatting-and-validate-using-black-39ec9d57d4691778.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-async-actions-b249c527d99723bb.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-reno-d1ab5710f272650a.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-retry_except_exception_type-31b31da1924d55f4.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-stop-before-delay-a775f88ac872c923.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-test-extra-55e869261b03e56d.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add_omitted_modules_to_import_all-2ab282f20a2c22f7.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add_retry_if_exception_cause_type-d16b918ace4ae0ad.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/added_a_link_to_documentation-eefaf8f074b539f8.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/after_log-50f4d73b24ce9203.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/annotate_code-197b93130df14042.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/before_sleep_log-improvements-d8149274dfb37d7c.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/clarify-reraise-option-6829667eacf4f599.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/dependabot-for-github-actions-4d2464f3c0928463.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/do_not_package_tests-fe5ac61940b0a5ed.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/drop-deprecated-python-versions-69a05cb2e0f1034c.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/drop_deprecated-7ea90b212509b082.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/export-convenience-symbols-981d9611c8b754f3.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-async-loop-with-result-f68e913ccb425aca.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-local-context-overwrite-94190ba06a481631.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-retry-wrapper-attributes-f7a3a45b8e90f257.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-setuptools-config-3af71aa3592b6948.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-wait-typing-b26eecdb6cc0a1de.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix_async-52b6594c8e75c4bc.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/make-logger-more-compatible-5da1ddf1bab77047.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/no-async-iter-6132a42e52348a75.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/pr320-py3-only-wheel-tag.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/py36_plus-c425fb3aa17c6682.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/remove-py36-876c0416cf279d15.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/retrycallstate-repr-94947f7b00ee15e1.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/some-slug-for-preserve-defaults-86682846dfa18005.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/support-timedelta-wait-unit-type-5ba1e9fc0fe45523.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/reno.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/setup.cfg +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/setup.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/__init__.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/_utils.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/after.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/asyncio/__init__.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/asyncio/retry.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/before.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/before_sleep.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/nap.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/py.typed +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/retry.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/stop.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/tornadoweb.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/dependency_links.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/requires.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/top_level.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/__init__.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_after.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_asyncio.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_issue_478.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_tornado.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_utils.py +0 -0
- {tenacity-8.5.0 → tenacity-9.0.0}/tox.ini +0 -0
|
@@ -197,7 +197,7 @@ class wait_random_exponential(wait_exponential):
|
|
|
197
197
|
|
|
198
198
|
def __call__(self, retry_state: "RetryCallState") -> float:
|
|
199
199
|
high = super().__call__(retry_state=retry_state)
|
|
200
|
-
return random.uniform(
|
|
200
|
+
return random.uniform(self.min, high)
|
|
201
201
|
|
|
202
202
|
|
|
203
203
|
class wait_exponential_jitter(wait_base):
|
|
@@ -53,6 +53,7 @@ releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml
|
|
|
53
53
|
releasenotes/notes/support-timedelta-wait-unit-type-5ba1e9fc0fe45523.yaml
|
|
54
54
|
releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml
|
|
55
55
|
releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml
|
|
56
|
+
releasenotes/notes/wait-random-exponential-min-2a4b7eed9f002436.yaml
|
|
56
57
|
releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml
|
|
57
58
|
tenacity/__init__.py
|
|
58
59
|
tenacity/_utils.py
|
|
@@ -472,9 +472,17 @@ class TestWaitConditions(unittest.TestCase):
|
|
|
472
472
|
self._assert_inclusive_range(fn(make_retry_state(8, 0)), 0, 60.0)
|
|
473
473
|
self._assert_inclusive_range(fn(make_retry_state(9, 0)), 0, 60.0)
|
|
474
474
|
|
|
475
|
-
|
|
475
|
+
# max wait
|
|
476
|
+
max_wait = 5
|
|
477
|
+
fn = tenacity.wait_random_exponential(10, max_wait)
|
|
476
478
|
for _ in range(1000):
|
|
477
|
-
self._assert_inclusive_range(fn(make_retry_state(1, 0)), 0.00,
|
|
479
|
+
self._assert_inclusive_range(fn(make_retry_state(1, 0)), 0.00, max_wait)
|
|
480
|
+
|
|
481
|
+
# min wait
|
|
482
|
+
min_wait = 5
|
|
483
|
+
fn = tenacity.wait_random_exponential(min=min_wait)
|
|
484
|
+
for _ in range(1000):
|
|
485
|
+
self._assert_inclusive_range(fn(make_retry_state(1, 0)), min_wait, 5)
|
|
478
486
|
|
|
479
487
|
# Default arguments exist
|
|
480
488
|
fn = tenacity.wait_random_exponential()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-async-actions-b249c527d99723bb.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-stop-before-delay-a775f88ac872c923.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/clarify-reraise-option-6829667eacf4f599.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/do_not_package_tests-fe5ac61940b0a5ed.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-setuptools-config-3af71aa3592b6948.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/retrycallstate-repr-94947f7b00ee15e1.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml
RENAMED
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml
RENAMED
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|