tenacity 8.5.0__tar.gz → 9.1.2__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-9.1.2}/.github/workflows/ci.yaml +6 -6
- tenacity-9.1.2/.github/workflows/release.yml +34 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/.mergify.yml +2 -2
- {tenacity-8.5.0/tenacity.egg-info → tenacity-9.1.2}/PKG-INFO +11 -5
- {tenacity-8.5.0 → tenacity-9.1.2}/pyproject.toml +1 -1
- tenacity-9.1.2/releasenotes/notes/add-re-pattern-to-match-types-6a4c1d9e64e2a5e1.yaml +4 -0
- tenacity-9.1.2/releasenotes/notes/wait-random-exponential-min-2a4b7eed9f002436.yaml +4 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/setup.cfg +2 -2
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/__init__.py +4 -2
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/before_sleep.py +2 -2
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/retry.py +2 -2
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/wait.py +1 -1
- {tenacity-8.5.0 → tenacity-9.1.2/tenacity.egg-info}/PKG-INFO +11 -5
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity.egg-info/SOURCES.txt +3 -1
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_tenacity.py +10 -2
- {tenacity-8.5.0 → tenacity-9.1.2}/tox.ini +5 -4
- tenacity-8.5.0/.github/workflows/deploy.yaml +0 -34
- {tenacity-8.5.0 → tenacity-9.1.2}/.editorconfig +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/.github/dependabot.yml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/.gitignore +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/.readthedocs.yml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/LICENSE +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/README.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/doc/source/api.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/doc/source/changelog.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/doc/source/conf.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/doc/source/index.rst +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/Use--for-formatting-and-validate-using-black-39ec9d57d4691778.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add-async-actions-b249c527d99723bb.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add-reno-d1ab5710f272650a.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add-retry_except_exception_type-31b31da1924d55f4.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add-stop-before-delay-a775f88ac872c923.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add-test-extra-55e869261b03e56d.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add_omitted_modules_to_import_all-2ab282f20a2c22f7.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/add_retry_if_exception_cause_type-d16b918ace4ae0ad.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/added_a_link_to_documentation-eefaf8f074b539f8.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/after_log-50f4d73b24ce9203.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/allow-mocking-of-nap-sleep-6679c50e702446f1.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/annotate_code-197b93130df14042.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/before_sleep_log-improvements-d8149274dfb37d7c.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/clarify-reraise-option-6829667eacf4f599.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/dependabot-for-github-actions-4d2464f3c0928463.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/do_not_package_tests-fe5ac61940b0a5ed.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/drop-deprecated-python-versions-69a05cb2e0f1034c.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/drop_deprecated-7ea90b212509b082.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/export-convenience-symbols-981d9611c8b754f3.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix-async-loop-with-result-f68e913ccb425aca.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix-local-context-overwrite-94190ba06a481631.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix-retry-wrapper-attributes-f7a3a45b8e90f257.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix-setuptools-config-3af71aa3592b6948.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix-wait-typing-b26eecdb6cc0a1de.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/fix_async-52b6594c8e75c4bc.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/make-logger-more-compatible-5da1ddf1bab77047.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/no-async-iter-6132a42e52348a75.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/pr320-py3-only-wheel-tag.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/py36_plus-c425fb3aa17c6682.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/remove-py36-876c0416cf279d15.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/retrycallstate-repr-94947f7b00ee15e1.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/some-slug-for-preserve-defaults-86682846dfa18005.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/support-timedelta-wait-unit-type-5ba1e9fc0fe45523.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/reno.yaml +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/setup.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/_utils.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/after.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/asyncio/__init__.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/asyncio/retry.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/before.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/nap.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/py.typed +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/stop.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity/tornadoweb.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity.egg-info/dependency_links.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity.egg-info/requires.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tenacity.egg-info/top_level.txt +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/__init__.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_after.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_asyncio.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_issue_478.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_tornado.py +0 -0
- {tenacity-8.5.0 → tenacity-9.1.2}/tests/test_utils.py +0 -0
|
@@ -14,12 +14,10 @@ concurrency:
|
|
|
14
14
|
jobs:
|
|
15
15
|
test:
|
|
16
16
|
timeout-minutes: 20
|
|
17
|
-
runs-on: ubuntu-
|
|
17
|
+
runs-on: ubuntu-24.04
|
|
18
18
|
strategy:
|
|
19
19
|
matrix:
|
|
20
20
|
include:
|
|
21
|
-
- python: "3.8"
|
|
22
|
-
tox: py38
|
|
23
21
|
- python: "3.9"
|
|
24
22
|
tox: py39
|
|
25
23
|
- python: "3.10"
|
|
@@ -27,19 +25,21 @@ jobs:
|
|
|
27
25
|
- python: "3.11"
|
|
28
26
|
tox: py311
|
|
29
27
|
- python: "3.12"
|
|
30
|
-
tox: py312
|
|
28
|
+
tox: py312
|
|
31
29
|
- python: "3.12"
|
|
32
30
|
tox: pep8
|
|
31
|
+
- python: "3.13"
|
|
32
|
+
tox: py313,py313-trio
|
|
33
33
|
- python: "3.11"
|
|
34
34
|
tox: mypy
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout 🛎️
|
|
37
|
-
uses: actions/checkout@v4.
|
|
37
|
+
uses: actions/checkout@v4.2.2
|
|
38
38
|
with:
|
|
39
39
|
fetch-depth: 0
|
|
40
40
|
|
|
41
41
|
- name: Setup Python 🔧
|
|
42
|
-
uses: actions/setup-python@v5.
|
|
42
|
+
uses: actions/setup-python@v5.5.0
|
|
43
43
|
with:
|
|
44
44
|
python-version: ${{ matrix.python }}
|
|
45
45
|
allow-prereleases: true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: upload release to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types:
|
|
5
|
+
- published
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
pypi-publish:
|
|
9
|
+
name: upload release to PyPI
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: release
|
|
12
|
+
permissions:
|
|
13
|
+
id-token: write
|
|
14
|
+
contents: write
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4.2.2
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
fetch-tags: true
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v5.5.0
|
|
22
|
+
with:
|
|
23
|
+
python-version: 3.13
|
|
24
|
+
|
|
25
|
+
- name: Install build
|
|
26
|
+
run: |
|
|
27
|
+
pip install setuptools-scm wheel
|
|
28
|
+
|
|
29
|
+
- name: Build
|
|
30
|
+
run: |
|
|
31
|
+
python setup.py sdist bdist_wheel
|
|
32
|
+
|
|
33
|
+
- name: Publish package distributions to PyPI
|
|
34
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -10,11 +10,11 @@ queue_rules:
|
|
|
10
10
|
- files ~= ^releasenotes/notes/
|
|
11
11
|
- label = no-changelog
|
|
12
12
|
- author = dependabot[bot]
|
|
13
|
-
- "check-success=test (3.8, py38)"
|
|
14
13
|
- "check-success=test (3.9, py39)"
|
|
15
14
|
- "check-success=test (3.10, py310)"
|
|
16
15
|
- "check-success=test (3.11, py311)"
|
|
17
|
-
- "check-success=test (3.12, py312
|
|
16
|
+
- "check-success=test (3.12, py312)"
|
|
17
|
+
- "check-success=test (3.13, py313,py313-trio)"
|
|
18
18
|
- "check-success=test (3.12, pep8)"
|
|
19
19
|
|
|
20
20
|
pull_request_rules:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tenacity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.1.2
|
|
4
4
|
Summary: Retry code until it succeeds
|
|
5
5
|
Home-page: https://github.com/jd/tenacity
|
|
6
6
|
Author: Julien Danjou
|
|
@@ -11,15 +11,21 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Utilities
|
|
20
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
License-File: LICENSE
|
|
21
22
|
Provides-Extra: doc
|
|
23
|
+
Requires-Dist: reno; extra == "doc"
|
|
24
|
+
Requires-Dist: sphinx; extra == "doc"
|
|
22
25
|
Provides-Extra: test
|
|
23
|
-
|
|
26
|
+
Requires-Dist: pytest; extra == "test"
|
|
27
|
+
Requires-Dist: tornado>=4.5; extra == "test"
|
|
28
|
+
Requires-Dist: typeguard; extra == "test"
|
|
29
|
+
Dynamic: license-file
|
|
24
30
|
|
|
25
31
|
Tenacity is a general-purpose retrying library to simplify the task of adding retry behavior to just about anything.
|
|
@@ -13,16 +13,16 @@ classifier =
|
|
|
13
13
|
Programming Language :: Python
|
|
14
14
|
Programming Language :: Python :: 3
|
|
15
15
|
Programming Language :: Python :: 3 :: Only
|
|
16
|
-
Programming Language :: Python :: 3.8
|
|
17
16
|
Programming Language :: Python :: 3.9
|
|
18
17
|
Programming Language :: Python :: 3.10
|
|
19
18
|
Programming Language :: Python :: 3.11
|
|
20
19
|
Programming Language :: Python :: 3.12
|
|
20
|
+
Programming Language :: Python :: 3.13
|
|
21
21
|
Topic :: Utilities
|
|
22
22
|
|
|
23
23
|
[options]
|
|
24
24
|
install_requires =
|
|
25
|
-
python_requires = >=3.
|
|
25
|
+
python_requires = >=3.9
|
|
26
26
|
packages = find:
|
|
27
27
|
|
|
28
28
|
[options.packages.find]
|
|
@@ -76,7 +76,7 @@ from .before import before_nothing # noqa
|
|
|
76
76
|
from .after import after_log # noqa
|
|
77
77
|
from .after import after_nothing # noqa
|
|
78
78
|
|
|
79
|
-
# Import all built-in
|
|
79
|
+
# Import all built-in before sleep strategies for easier usage.
|
|
80
80
|
from .before_sleep import before_sleep_log # noqa
|
|
81
81
|
from .before_sleep import before_sleep_nothing # noqa
|
|
82
82
|
|
|
@@ -88,6 +88,8 @@ except ImportError:
|
|
|
88
88
|
if t.TYPE_CHECKING:
|
|
89
89
|
import types
|
|
90
90
|
|
|
91
|
+
from typing_extensions import Self
|
|
92
|
+
|
|
91
93
|
from . import asyncio as tasyncio
|
|
92
94
|
from .retry import RetryBaseT
|
|
93
95
|
from .stop import StopBaseT
|
|
@@ -255,7 +257,7 @@ class BaseRetrying(ABC):
|
|
|
255
257
|
retry_error_callback: t.Union[
|
|
256
258
|
t.Optional[t.Callable[["RetryCallState"], t.Any]], object
|
|
257
259
|
] = _unset,
|
|
258
|
-
) -> "
|
|
260
|
+
) -> "Self":
|
|
259
261
|
"""Copy this object with some parameters changed if needed."""
|
|
260
262
|
return self.__class__(
|
|
261
263
|
sleep=_first_set(sleep, self.sleep),
|
|
@@ -25,7 +25,7 @@ if typing.TYPE_CHECKING:
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
def before_sleep_nothing(retry_state: "RetryCallState") -> None:
|
|
28
|
-
"""Before
|
|
28
|
+
"""Before sleep strategy that does nothing."""
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
def before_sleep_log(
|
|
@@ -33,7 +33,7 @@ def before_sleep_log(
|
|
|
33
33
|
log_level: int,
|
|
34
34
|
exc_info: bool = False,
|
|
35
35
|
) -> typing.Callable[["RetryCallState"], None]:
|
|
36
|
-
"""Before
|
|
36
|
+
"""Before sleep strategy that logs to some logger the attempt."""
|
|
37
37
|
|
|
38
38
|
def log_it(retry_state: "RetryCallState") -> None:
|
|
39
39
|
local_exc_info: BaseException | bool | None
|
|
@@ -207,7 +207,7 @@ class retry_if_exception_message(retry_if_exception):
|
|
|
207
207
|
def __init__(
|
|
208
208
|
self,
|
|
209
209
|
message: typing.Optional[str] = None,
|
|
210
|
-
match: typing.
|
|
210
|
+
match: typing.Union[None, str, typing.Pattern[str]] = None,
|
|
211
211
|
) -> None:
|
|
212
212
|
if message and match:
|
|
213
213
|
raise TypeError(
|
|
@@ -242,7 +242,7 @@ class retry_if_not_exception_message(retry_if_exception_message):
|
|
|
242
242
|
def __init__(
|
|
243
243
|
self,
|
|
244
244
|
message: typing.Optional[str] = None,
|
|
245
|
-
match: typing.
|
|
245
|
+
match: typing.Union[None, str, typing.Pattern[str]] = None,
|
|
246
246
|
) -> None:
|
|
247
247
|
super().__init__(message, match)
|
|
248
248
|
# invert predicate
|
|
@@ -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):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: tenacity
|
|
3
|
-
Version:
|
|
3
|
+
Version: 9.1.2
|
|
4
4
|
Summary: Retry code until it succeeds
|
|
5
5
|
Home-page: https://github.com/jd/tenacity
|
|
6
6
|
Author: Julien Danjou
|
|
@@ -11,15 +11,21 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Topic :: Utilities
|
|
20
|
-
Requires-Python: >=3.
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
License-File: LICENSE
|
|
21
22
|
Provides-Extra: doc
|
|
23
|
+
Requires-Dist: reno; extra == "doc"
|
|
24
|
+
Requires-Dist: sphinx; extra == "doc"
|
|
22
25
|
Provides-Extra: test
|
|
23
|
-
|
|
26
|
+
Requires-Dist: pytest; extra == "test"
|
|
27
|
+
Requires-Dist: tornado>=4.5; extra == "test"
|
|
28
|
+
Requires-Dist: typeguard; extra == "test"
|
|
29
|
+
Dynamic: license-file
|
|
24
30
|
|
|
25
31
|
Tenacity is a general-purpose retrying library to simplify the task of adding retry behavior to just about anything.
|
|
@@ -11,7 +11,7 @@ setup.py
|
|
|
11
11
|
tox.ini
|
|
12
12
|
.github/dependabot.yml
|
|
13
13
|
.github/workflows/ci.yaml
|
|
14
|
-
.github/workflows/
|
|
14
|
+
.github/workflows/release.yml
|
|
15
15
|
doc/source/api.rst
|
|
16
16
|
doc/source/changelog.rst
|
|
17
17
|
doc/source/conf.py
|
|
@@ -19,6 +19,7 @@ doc/source/index.rst
|
|
|
19
19
|
releasenotes/notes/Fix-tests-for-typeguard-3.x-6eebfea546b6207e.yaml
|
|
20
20
|
releasenotes/notes/Use--for-formatting-and-validate-using-black-39ec9d57d4691778.yaml
|
|
21
21
|
releasenotes/notes/add-async-actions-b249c527d99723bb.yaml
|
|
22
|
+
releasenotes/notes/add-re-pattern-to-match-types-6a4c1d9e64e2a5e1.yaml
|
|
22
23
|
releasenotes/notes/add-reno-d1ab5710f272650a.yaml
|
|
23
24
|
releasenotes/notes/add-retry_except_exception_type-31b31da1924d55f4.yaml
|
|
24
25
|
releasenotes/notes/add-stop-before-delay-a775f88ac872c923.yaml
|
|
@@ -53,6 +54,7 @@ releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml
|
|
|
53
54
|
releasenotes/notes/support-timedelta-wait-unit-type-5ba1e9fc0fe45523.yaml
|
|
54
55
|
releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml
|
|
55
56
|
releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml
|
|
57
|
+
releasenotes/notes/wait-random-exponential-min-2a4b7eed9f002436.yaml
|
|
56
58
|
releasenotes/notes/wait_exponential_jitter-6ffc81dddcbaa6d3.yaml
|
|
57
59
|
tenacity/__init__.py
|
|
58
60
|
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()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[tox]
|
|
2
|
-
|
|
2
|
+
# we only test trio on latest python version
|
|
3
|
+
envlist = py3{9,10,11,12,13,13-trio}, pep8, pypy3
|
|
3
4
|
skip_missing_interpreters = True
|
|
4
5
|
|
|
5
6
|
[testenv]
|
|
@@ -10,9 +11,9 @@ deps =
|
|
|
10
11
|
.[doc]
|
|
11
12
|
trio: trio
|
|
12
13
|
commands =
|
|
13
|
-
py3{8,9,10,11,12},pypy3: pytest {posargs}
|
|
14
|
-
py3{8,9,10,11,12},pypy3: sphinx-build -a -E -W -b doctest doc/source doc/build
|
|
15
|
-
py3{8,9,10,11,12},pypy3: sphinx-build -a -E -W -b html doc/source doc/build
|
|
14
|
+
py3{8,9,10,11,12,13},pypy3: pytest {posargs}
|
|
15
|
+
py3{8,9,10,11,12,13},pypy3: sphinx-build -a -E -W -b doctest doc/source doc/build
|
|
16
|
+
py3{8,9,10,11,12,13},pypy3: sphinx-build -a -E -W -b html doc/source doc/build
|
|
16
17
|
|
|
17
18
|
[testenv:pep8]
|
|
18
19
|
basepython = python3
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Release deploy
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types:
|
|
6
|
-
- published
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
timeout-minutes: 20
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout 🛎️
|
|
14
|
-
uses: actions/checkout@v4.1.7
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0
|
|
17
|
-
|
|
18
|
-
- name: Setup Python 🔧
|
|
19
|
-
uses: actions/setup-python@v5.1.0
|
|
20
|
-
with:
|
|
21
|
-
python-version: 3.11
|
|
22
|
-
|
|
23
|
-
- name: Build 🔧 & Deploy 🚀
|
|
24
|
-
env:
|
|
25
|
-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
26
|
-
run: |
|
|
27
|
-
pip install tox twine wheel
|
|
28
|
-
|
|
29
|
-
echo -e "[pypi]" >> ~/.pypirc
|
|
30
|
-
echo -e "username = __token__" >> ~/.pypirc
|
|
31
|
-
echo -e "password = $PYPI_TOKEN" >> ~/.pypirc
|
|
32
|
-
|
|
33
|
-
python setup.py sdist bdist_wheel
|
|
34
|
-
twine upload dist/*
|
|
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.1.2}/releasenotes/notes/add-async-actions-b249c527d99723bb.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/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.1.2}/releasenotes/notes/clarify-reraise-option-6829667eacf4f599.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/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.1.2}/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.1.2}/releasenotes/notes/retrycallstate-repr-94947f7b00ee15e1.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/sphinx_define_error-642c9cd5c165d39a.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/timedelta-for-stop-ef6bf71b88ce9988.yaml
RENAMED
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/releasenotes/notes/trio-support-retry-22bd544800cd1f36.yaml
RENAMED
|
File without changes
|
{tenacity-8.5.0 → tenacity-9.1.2}/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
|