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.
Files changed (83) hide show
  1. {tenacity-8.5.0/tenacity.egg-info → tenacity-9.0.0}/PKG-INFO +1 -1
  2. tenacity-9.0.0/releasenotes/notes/wait-random-exponential-min-2a4b7eed9f002436.yaml +4 -0
  3. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/wait.py +1 -1
  4. {tenacity-8.5.0 → tenacity-9.0.0/tenacity.egg-info}/PKG-INFO +1 -1
  5. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/SOURCES.txt +1 -0
  6. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_tenacity.py +10 -2
  7. {tenacity-8.5.0 → tenacity-9.0.0}/.editorconfig +0 -0
  8. {tenacity-8.5.0 → tenacity-9.0.0}/.github/dependabot.yml +0 -0
  9. {tenacity-8.5.0 → tenacity-9.0.0}/.github/workflows/ci.yaml +0 -0
  10. {tenacity-8.5.0 → tenacity-9.0.0}/.github/workflows/deploy.yaml +0 -0
  11. {tenacity-8.5.0 → tenacity-9.0.0}/.gitignore +0 -0
  12. {tenacity-8.5.0 → tenacity-9.0.0}/.mergify.yml +0 -0
  13. {tenacity-8.5.0 → tenacity-9.0.0}/.readthedocs.yml +0 -0
  14. {tenacity-8.5.0 → tenacity-9.0.0}/LICENSE +0 -0
  15. {tenacity-8.5.0 → tenacity-9.0.0}/README.rst +0 -0
  16. {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/api.rst +0 -0
  17. {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/changelog.rst +0 -0
  18. {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/conf.py +0 -0
  19. {tenacity-8.5.0 → tenacity-9.0.0}/doc/source/index.rst +0 -0
  20. {tenacity-8.5.0 → tenacity-9.0.0}/pyproject.toml +0 -0
  21. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml +0 -0
  22. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/Use--for-formatting-and-validate-using-black-39ec9d57d4691778.yaml +0 -0
  23. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-async-actions-b249c527d99723bb.yaml +0 -0
  24. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-reno-d1ab5710f272650a.yaml +0 -0
  25. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-retry_except_exception_type-31b31da1924d55f4.yaml +0 -0
  26. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-stop-before-delay-a775f88ac872c923.yaml +0 -0
  27. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add-test-extra-55e869261b03e56d.yaml +0 -0
  28. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add_omitted_modules_to_import_all-2ab282f20a2c22f7.yaml +0 -0
  29. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/add_retry_if_exception_cause_type-d16b918ace4ae0ad.yaml +0 -0
  30. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/added_a_link_to_documentation-eefaf8f074b539f8.yaml +0 -0
  31. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/after_log-50f4d73b24ce9203.yaml +0 -0
  32. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml +0 -0
  33. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/annotate_code-197b93130df14042.yaml +0 -0
  34. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/before_sleep_log-improvements-d8149274dfb37d7c.yaml +0 -0
  35. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/clarify-reraise-option-6829667eacf4f599.yaml +0 -0
  36. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/dependabot-for-github-actions-4d2464f3c0928463.yaml +0 -0
  37. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/do_not_package_tests-fe5ac61940b0a5ed.yaml +0 -0
  38. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/drop-deprecated-python-versions-69a05cb2e0f1034c.yaml +0 -0
  39. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/drop_deprecated-7ea90b212509b082.yaml +0 -0
  40. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/export-convenience-symbols-981d9611c8b754f3.yaml +0 -0
  41. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-async-loop-with-result-f68e913ccb425aca.yaml +0 -0
  42. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-local-context-overwrite-94190ba06a481631.yaml +0 -0
  43. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-retry-wrapper-attributes-f7a3a45b8e90f257.yaml +0 -0
  44. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-setuptools-config-3af71aa3592b6948.yaml +0 -0
  45. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix-wait-typing-b26eecdb6cc0a1de.yaml +0 -0
  46. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/fix_async-52b6594c8e75c4bc.yaml +0 -0
  47. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/make-logger-more-compatible-5da1ddf1bab77047.yaml +0 -0
  48. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/no-async-iter-6132a42e52348a75.yaml +0 -0
  49. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/pr320-py3-only-wheel-tag.yaml +0 -0
  50. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/py36_plus-c425fb3aa17c6682.yaml +0 -0
  51. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/remove-py36-876c0416cf279d15.yaml +0 -0
  52. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/retrycallstate-repr-94947f7b00ee15e1.yaml +0 -0
  53. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/some-slug-for-preserve-defaults-86682846dfa18005.yaml +0 -0
  54. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml +0 -0
  55. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/support-timedelta-wait-unit-type-5ba1e9fc0fe45523.yaml +0 -0
  56. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml +0 -0
  57. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml +0 -0
  58. {tenacity-8.5.0 → tenacity-9.0.0}/releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml +0 -0
  59. {tenacity-8.5.0 → tenacity-9.0.0}/reno.yaml +0 -0
  60. {tenacity-8.5.0 → tenacity-9.0.0}/setup.cfg +0 -0
  61. {tenacity-8.5.0 → tenacity-9.0.0}/setup.py +0 -0
  62. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/__init__.py +0 -0
  63. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/_utils.py +0 -0
  64. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/after.py +0 -0
  65. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/asyncio/__init__.py +0 -0
  66. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/asyncio/retry.py +0 -0
  67. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/before.py +0 -0
  68. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/before_sleep.py +0 -0
  69. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/nap.py +0 -0
  70. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/py.typed +0 -0
  71. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/retry.py +0 -0
  72. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/stop.py +0 -0
  73. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity/tornadoweb.py +0 -0
  74. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/dependency_links.txt +0 -0
  75. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/requires.txt +0 -0
  76. {tenacity-8.5.0 → tenacity-9.0.0}/tenacity.egg-info/top_level.txt +0 -0
  77. {tenacity-8.5.0 → tenacity-9.0.0}/tests/__init__.py +0 -0
  78. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_after.py +0 -0
  79. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_asyncio.py +0 -0
  80. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_issue_478.py +0 -0
  81. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_tornado.py +0 -0
  82. {tenacity-8.5.0 → tenacity-9.0.0}/tests/test_utils.py +0 -0
  83. {tenacity-8.5.0 → tenacity-9.0.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tenacity
3
- Version: 8.5.0
3
+ Version: 9.0.0
4
4
  Summary: Retry code until it succeeds
5
5
  Home-page: https://github.com/jd/tenacity
6
6
  Author: Julien Danjou
@@ -0,0 +1,4 @@
1
+ ---
2
+ fixes:
3
+ - |
4
+ Respects `min` arg for `wait_random_exponential`
@@ -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(0, high)
200
+ return random.uniform(self.min, high)
201
201
 
202
202
 
203
203
  class wait_exponential_jitter(wait_base):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tenacity
3
- Version: 8.5.0
3
+ Version: 9.0.0
4
4
  Summary: Retry code until it succeeds
5
5
  Home-page: https://github.com/jd/tenacity
6
6
  Author: Julien Danjou
@@ -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
- fn = tenacity.wait_random_exponential(10, 5)
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, 5.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
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