Skip to content
Open

Uu #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
c7d4561
Fix unit tests failing on Windows (#260)
asqui Oct 26, 2020
c673254
Always return booleans from all retry_* methods (#261)
asqui Oct 26, 2020
be9bccb
Fix asyncio.iscoroutinefunction(f) check for decorated function (#263)
jd Nov 2, 2020
db0f958
Fix iscoroutinefunction check (for both inspect & asyncio) (#265)
NatureGeorge Dec 15, 2020
98f7da7
Add call method to AsyncRetying (#267)
hartungstenio Dec 16, 2020
8d62902
fix: remove saythanks (dead)
jd Dec 16, 2020
2214708
Pull request for fix-ci (#276)
jd Jan 29, 2021
5e8e97a
chore: add support for Python 3.9
jd Jan 29, 2021
250b27e
refactor: remove old compat support code (#274)
jd Jan 29, 2021
693ab15
Merge branch 'master' into py39
jd Jan 29, 2021
369ac3d
Merge pull request #275 from jd/py39
jd Jan 29, 2021
fd78427
ci: enable black (#277)
jd Jan 29, 2021
68faeb0
Copy whole internal state when retry_with (#233) (#278)
akapps Feb 1, 2021
3e22445
Warn when calling retry() on retry_base (#269) (#270)
SnoopJ Feb 2, 2021
3b5c6bf
avoid including tests when packaging (#281)
cjc7373 Feb 11, 2021
a0ca34c
ci(mergify): force release notes to be present
jd Mar 11, 2021
d553218
Merge pull request #285 from jd/reno-mergify
jd Mar 11, 2021
42483eb
ci(mergify): fix yaml block indicator for message
jd Mar 11, 2021
e03034f
ci(mergify): do not message closed PR
jd Mar 11, 2021
6855c55
Merge pull request #286 from jd/reno-mergify
jd Mar 11, 2021
446276f
ci: fix pep8 error (#297)
jd Apr 26, 2021
e493087
Make logger more compatible (#294)
shadowwalker Apr 26, 2021
e31e011
Add retry_if_not_exception_type() (#300)
henry0312 May 26, 2021
7a463d1
Drop support for deprecated Python versions (2.7 and 3.5)
and-semakin Apr 17, 2021
e1a570d
Merge pull request #293 from and-semakin/drop_deprecated_pythons
jd Jun 23, 2021
89d890f
Fix #291: drop python < 3.6 (#304)
penguinolog Jun 23, 2021
5304dc6
Use black instead of "flake8-black" on CI.
penguinolog Jun 23, 2021
4a5ac00
Merge pull request #306 from penguinolog/black_full_ci
jd Jun 23, 2021
9d93bde
Remove encoding declarations (#309)
and-semakin Jun 24, 2021
b4d8d6b
Replace abc.ABCMeta with abc.ABC (#310)
and-semakin Jun 24, 2021
dc60786
Use f-strings instead of `str.format` as faster and easier to read (#…
penguinolog Jun 24, 2021
52ce97c
Fix issue #288 : __name__ and other attributes for async functions (#…
penguinolog Jun 24, 2021
d442271
Do not package tests with tenacity (#308)
penguinolog Jun 24, 2021
786997e
Fix DeprecationWarnings in tests (#313)
penguinolog Jun 24, 2021
c18dcfb
Fix #307 : Drop deprecated APIs (#314)
penguinolog Jun 24, 2021
58fbe61
Add type annotations to cover all code. (#315)
penguinolog Jun 30, 2021
20d9228
Add a __repr__ method to RetryCallState objects (#302)
zbentley Jul 5, 2021
06413c3
Drop `py2` tag from the wheel name (#320)
webknjaz Jul 7, 2021
a7f5485
Fix after_log logger format (#317)
penguinolog Jul 12, 2021
abf859f
Rickroll a function name in one of the examples (#331)
andrewshadura Oct 4, 2021
5a86499
docs: show how to use retry_if_not_exception_type
william-silversmith Jan 5, 2022
005ef22
Merge pull request #337 from william-silversmith/master
Jan 6, 2022
dfcf348
ci: fix Mergify config
jd Jan 24, 2022
ff48431
Merge pull request #340 from jd/fix-mergify
jd Jan 26, 2022
a858965
Define a ClientError to fix Sphinx build errors (#352)
IsaacG Apr 27, 2022
da1bfc9
Implement a wait.wait_exponential_jitter per Google's storage guide (…
IsaacG Apr 27, 2022
f6465c0
Show All Exception Predicates in Docs (#332)
jackdesert May 27, 2022
18d05a6
Support `datetime.timedelta` as a valid wait unit type (#342)
noambloom May 30, 2022
014b8e6
feat: Add retry_if_exception_cause_type (#362)
Greesb Sep 21, 2022
de409a0
feat: accept `datetime.timedelta` instances as argument to `stop_afte…
theopilbeam Dec 7, 2022
8b17b00
fix: docstring for wait_exponential_jitter (#372)
fipped Dec 16, 2022
98bc9d8
Clarify the effect of `reraise=True` (#377)
jackdesert Jan 23, 2023
1aa3e41
ci: add github action jobs
sileht Jan 30, 2023
9ad95f8
Merge pull request #379 from sileht/ci-fixes
jd Jan 30, 2023
c3ec31c
ci(mergify): replace CircleCI by GitHub action names
sileht Jan 30, 2023
dc31a89
Merge pull request #380 from sileht/ci-fixes
jd Jan 30, 2023
e1323a0
Explicitly export convenience symbols from tenacity root module (#347)
tomasgareau Jan 30, 2023
0b1cef0
Fix async loop with retrying code block when result is available (#369)
victormferrara Jan 30, 2023
87f913d
ci: replace CircleCI deplay job by GitHub action (#381)
sileht Jan 30, 2023
1007141
ci(deploy): fix typo (#383)
sileht Jan 30, 2023
c0fc691
ci: add mypy
hirosassa Jan 23, 2022
f1aafda
ci: run mypy job
sileht Jan 30, 2023
d9438b3
fix(mypy): add missing typing (#384)
sileht Jan 30, 2023
280201d
Update index.rst
jd Feb 6, 2023
b93e4dc
chore(pep8): update code for last black version (#388)
sileht Feb 6, 2023
78c8d4b
fix: remove __iter__ from AsyncRetring (#387)
sileht Feb 6, 2023
b49eb37
chore(typing): improve typing of WrappedFn (#390)
sileht Feb 9, 2023
3cf1c90
Add `retry_if_exception_cause_type` and `wait_exponential_jitter` to …
salmon131 Feb 22, 2023
548c5d4
better wait.WaitBaseT annotation (#392)
karech Feb 28, 2023
96938df
chore: remove support for Python 3.6
jd Mar 20, 2023
2a09589
Merge pull request #396 from jd/remove-python3.6
jd Mar 20, 2023
4333249
Fix tests for typeguard 3.x (#394)
felixonmars Mar 20, 2023
aa6f8f0
Added the link to documentation for a better experience (#409)
Mgajurel Jul 12, 2023
41ed242
Add support for async sleep functions in tenacity.retry annotation. F…
jakkdl Aug 14, 2023
703fe3c
typecheck tests, although most all errors are ignored. (#401)
jakkdl Aug 21, 2023
a29f494
Add a "test" extra (#357)
carlwgeorge Aug 21, 2023
3100582
Preserve function default and kwdefault through retry decorator (#406)
michael-motional Aug 21, 2023
09ccacc
Add support for Python 3.12
hugovk Sep 15, 2023
5c54fa0
Only deploy for upstream
hugovk Sep 15, 2023
8880763
Drop support for EOL Python 3.7
hugovk Sep 15, 2023
1843b25
Upgrade Python syntax with pyupgrade --py38-plus
hugovk Sep 15, 2023
f3d1909
Add `RetryCallState` to the API docs (#419)
rouge8 Nov 14, 2023
21a71af
Merge branch 'main' into add-3.12
jd Nov 14, 2023
b647dcd
Merge pull request #416 from hugovk/add-3.12
jd Nov 14, 2023
ebee81d
typing: update version compare to support pyright/pylance (#424)
sbdchd Dec 3, 2023
99e7482
Add ability to inspect upcoming sleep in `stop` funcs, and add `stop_…
christek91 Dec 18, 2023
0b76e7c
ci: replace black and flake8 by ruff
jd Feb 3, 2024
24b4a5c
Merge pull request #435 from jd/fix-black
jd Feb 3, 2024
17aefd9
Incrementally build iter actions list (#434)
hasier Feb 6, 2024
2f624ba
Add a Dependabot config to autoupdate GitHub action versions (#439)
kurtmckee Feb 9, 2024
9eb3868
ci: run deploy wf on release (#442)
jd Feb 9, 2024
50065df
ci: simplify Mergify configuration and automerge dependabot (#443)
jd Feb 9, 2024
9ed3e96
ci(mergify): add missing [bot] for dependabot (#446)
jd Feb 9, 2024
cf58675
chore(deps): bump the github-actions group with 2 updates (#441)
dependabot[bot] Feb 9, 2024
65a19f9
ci(deploy): rename job (#444)
jd Feb 9, 2024
b7e4883
ci(test): remove not necessary push (#445)
jd Feb 9, 2024
bfa2c80
Support async actions (#437)
hasier Mar 2, 2024
06c34a2
chore: update to latest ruff (#448)
jd Mar 2, 2024
c5d2d8b
ci: refactor Mergify rules (#447)
jd Mar 2, 2024
cb15300
Lazy import asyncio.sleep as it's expensive (#450)
ichard26 Mar 14, 2024
21137e7
Add async strategies (#451)
hasier Jun 12, 2024
5b00c15
chore(deps): bump the github-actions group across 1 directory with 2 …
dependabot[bot] Jun 12, 2024
952189b
Update index.rst: Remove * (#465)
TheRealBecks Jun 13, 2024
ade0567
Support Trio out-of-the-box, take 2 (#463)
jakkdl Jun 17, 2024
702014b
ci: add support for trio in Mergify automerge (#470)
jd Jun 17, 2024
ee6a8f7
Include `tenacity.asyncio` subpackage in release dist (#474)
cdce8p Jun 17, 2024
a15fa64
fix: Avoid overwriting local contexts with retry decorator (#479)
hasier Jun 24, 2024
33cd0e1
chore(deps): bump actions/checkout in the github-actions group (#483)
dependabot[bot] Jul 1, 2024
31fe2d0
fix: Restore contents of retry attribute for wrapped functions (#484)
hasier Jul 5, 2024
a662bbb
Respects `min` argument for `wait_random_exponential` (#425)
yxtay Jul 29, 2024
e2482a6
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] Aug 1, 2024
7fbaf4d
docs: unify the name `before sleep strategy` in docstring and comment…
Young-Lord Aug 26, 2024
60358bb
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] Sep 1, 2024
11af5c1
chore(deps): bump actions/checkout in the github-actions group (#500)
dependabot[bot] Oct 1, 2024
0d40e76
chore(deps): bump the github-actions group with 2 updates (#502)
dependabot[bot] Nov 1, 2024
72db274
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] Feb 1, 2025
3203359
Test with Python 3.13 (#480)
edgarrmondragon Feb 18, 2025
3e2c181
ci: remove Python 3.8 support (#515)
jd Feb 18, 2025
212c47c
ci: update ubuntu image (#516)
jd Feb 18, 2025
bfbf173
fix: return "Self" from "BaseRetrying.copy" (#518)
notypecheck Mar 5, 2025
f9a879c
ci: upload on PyPI using trusted publishing (#520)
jd Mar 25, 2025
b4dfa3f
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] Apr 1, 2025
a44271f
fix: Add re.Pattern to allowed match types (#497)
robertschweizer Apr 2, 2025
2b173a1
ci: fix typo
jd Apr 2, 2025
62787c3
ci: fix build
jd Apr 2, 2025
012dc0d
Apply formatting to num seconds in before_sleep_log (#489)
aguinane Apr 2, 2025
077aaa8
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] May 1, 2025
eed7d78
Support Python 3.14 (#528)
sandrobonazzola Jun 27, 2025
2239920
chore(deps): bump actions/checkout in the github-actions group (#535)
dependabot[bot] Sep 3, 2025
b12af2e
ci(mergify): enable autoqueue and fix conditions (#536)
jd Sep 3, 2025
e8d5f3b
chore(deps): bump actions/setup-python in the github-actions group (#…
dependabot[bot] Oct 1, 2025
d6e57dd
Typing: Accept non-standard logger in helpers logging something (#540)
k4nar Oct 11, 2025
815c34f
feat(wait): add `wait_exception` strategy (#541)
capitan-davide Nov 5, 2025
0f55245
ci: remove reno requirements (#542)
jd Nov 5, 2025
e792bba
ci: fix mypy (#546)
jd Dec 2, 2025
c35a4b3
chore(deps): bump the github-actions group with 2 updates (#545)
dependabot[bot] Dec 2, 2025
ef12c9e
chore(deps): bump actions/checkout in the github-actions group (#547)
dependabot[bot] Jan 1, 2026
21ae7d0
docs: fix syntax error in wait_chain docstring example (#548)
VedantMadane Jan 17, 2026
7027da3
chore(deps): bump the github-actions group with 2 updates (#550)
dependabot[bot] Feb 1, 2026
3bf33b4
chore: drop Python 3.9 support (EOL) (#552)
Zac-HD Feb 5, 2026
24415eb
support async sleep for sync fn (#551)
Zac-HD Feb 5, 2026
d4e868d
Fix `retry()` annotations with async `sleep=` function (#555)
Zac-HD Feb 7, 2026
0bdf1d9
Fix ordinal suffix generation for numbers ending in 11, 12, 13 (#556)
ArmaanjeetSandhu Feb 17, 2026
ff18309
build: replace tox with poethepoet + uv (#558)
jd Feb 18, 2026
8a171aa
docs: fix README badges (#559)
jd Feb 18, 2026
528a1be
docs: add project URLs to pyproject.toml (#560)
jd Feb 18, 2026
bfb8f5c
docs: add local dev commands to contribute section (#561)
jd Feb 18, 2026
09bc652
docs: modernize async examples (#562)
jd Feb 18, 2026
de2cee2
docs: set version in sphinx conf (#563)
jd Feb 18, 2026
1b2b4ef
fix: resolve tornado mypy errors instead of suppressing them (#568)
jd Feb 18, 2026
abaf39c
feat: add poe fmt task for auto-formatting (#569)
jd Feb 18, 2026
4eb1b11
docs: replace curio example with trio (#570)
jd Feb 18, 2026
c4bada4
chore: enable ruff I, UP, B rules and auto-fix codebase (#571)
jd Feb 18, 2026
a4a7252
ci: harden release workflow (#575)
jd Feb 18, 2026
7efa2fe
fix: use typing.Self on Python 3.11+ instead of typing_extensions (#576)
jd Feb 18, 2026
01ce660
chore: bump tornado version floor to >=6.0 (#578)
jd Feb 18, 2026
56950ae
docs: clean up sphinx conf.py (#579)
jd Feb 18, 2026
14f0d8a
refactor: remove stale noqa comments from __init__.py (#577)
jd Feb 18, 2026
9686ed7
refactor: enable additional ruff rules and fix violations (#584)
jd Feb 19, 2026
89c5735
fix: enable mypy strict mode in all test files (#585)
jd Feb 19, 2026
773f438
fix: make LoggerProtocol compatible with logging.Logger (#586)
jd Feb 19, 2026
b42d077
refactor: remove unused IterState.delay_since_first_attempt field (#587)
jd Feb 19, 2026
d49d075
refactor: remove redundant raise before reraise() (#588)
jd Feb 19, 2026
fea6430
refactor: replace deprecated typing.Pattern with re.Pattern (#589)
jd Feb 19, 2026
6be363b
docs: fix typos in docstrings (#590)
jd Feb 19, 2026
213446e
fix: guard against None seconds_since_start in after_log (#591)
jd Feb 19, 2026
70083b8
feat: add name parameter to Retrying for meaningful log output (#597)
jd Feb 20, 2026
930958f
docs: document RetryCallState attributes including seconds_since_star…
jd Feb 20, 2026
f4a31e1
fix: expose .retry, .statistics, .retry_with to type checkers (#601)
jd Feb 23, 2026
711416c
docs: add common patterns section for recurring FAQ topics (#602)
jd Feb 24, 2026
42b70f9
fix: initialize delay_since_first_attempt in statistics on begin() (#…
jd Feb 24, 2026
a02b51a
fix: restore plain function composition with retry_base via | and & (…
jd Feb 24, 2026
124e3a6
feat: add async context manager support to AttemptManager (#605)
jd Feb 24, 2026
39eb157
feat: add enabled parameter to disable retrying (#604)
jd Feb 24, 2026
44eaefb
refactor: flatten chained | and & into single retry_any/retry_all (#609)
jd Feb 24, 2026
0a3ca8a
docs: document generator limitations and argument caveats (#612)
jd Feb 24, 2026
cb320c4
fix: make Retrying and retry strategies picklable for multiprocessing…
jd Feb 25, 2026
4c1b7bc
fix: sync func.retry.statistics with copy's statistics (#614)
jd Feb 25, 2026
ac9c21f
refactor: replace deprecated typing constructs with modern syntax (#616)
jd Feb 26, 2026
6a2a08b
fix: add missing space in type annotation (#617)
jd Feb 26, 2026
b8b4675
chore: remove unused reports_deprecation_warning helper (#618)
jd Feb 26, 2026
ae2d75e
refactor: enable PGH, PYI ruff rules and rename TCH to TC (#619)
jd Feb 26, 2026
7a73c93
refactor: enable additional ruff rule categories (#620)
jd Feb 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 0 additions & 98 deletions .circleci/config.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,pyx,pxd,pyi}]
indent_size = 4
max_line_length = 120

[*.ini]
indent_size = 4

[*.rst]
max_line_length = 150

[Makefile]
indent_style = tab
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
groups:
github-actions:
patterns:
- '*'
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Continuous Integration
permissions: read-all

on:
pull_request:
branches:
- main

concurrency:
# yamllint disable-line rule:line-length
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- python: "3.10"
task: check
- python: "3.11"
task: check
- python: "3.12"
task: check
- python: "3.13"
task: check
- python: "3.14"
task: check
- python: "3.14"
task: lint
- python: "3.14"
task: mypy
steps:
- name: Checkout 🛎️
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0

- name: Setup uv 🔧
uses: astral-sh/setup-uv@v5

- name: Build 🔧 & Test 🔍
run: uv run --python ${{ matrix.python }} poe ${{ matrix.task }}
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: upload release to PyPI
on:
release:
types:
- published

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-24.04
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
fetch-tags: true

- uses: astral-sh/setup-uv@v5

- name: Build
run: uv build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ dist
*.pyc
*.egg-info
build
.tox/
.venv/
uv.lock
AUTHORS
ChangeLog
.eggs/
doc/_build

tenacity/_version.py
/.pytest_cache
45 changes: 17 additions & 28 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
queue_rules:
- name: default
merge_method: squash
autoqueue: true
queue_conditions:
- or:
- author = jd
- "#approved-reviews-by >= 1"
- author = dependabot[bot]
- "check-success=test (3.10, check)"
- "check-success=test (3.11, check)"
- "check-success=test (3.12, check)"
- "check-success=test (3.13, check)"
- "check-success=test (3.14, check)"
- "check-success=test (3.14, lint)"
- "check-success=test (3.14, mypy)"

pull_request_rules:
- name: automatic merge
conditions:
- "status-success=ci/circleci: pep8"
- "status-success=ci/circleci: py27"
- "status-success=ci/circleci: py35"
- "status-success=ci/circleci: py36"
- "status-success=ci/circleci: py37"
- "status-success=ci/circleci: py38"
- "#approved-reviews-by>=1"
- label!=work-in-progress
actions:
merge:
strict: "smart"
method: squash
- name: automatic merge for jd
conditions:
- author=jd
- "status-success=ci/circleci: pep8"
- "status-success=ci/circleci: py27"
- "status-success=ci/circleci: py35"
- "status-success=ci/circleci: py36"
- "status-success=ci/circleci: py37"
- "status-success=ci/circleci: py38"
- label!=work-in-progress
actions:
merge:
strict: "smart"
method: squash
- name: dismiss reviews
conditions: []
actions:
Expand Down
4 changes: 4 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
version: 2
build:
os: ubuntu-24.04
tools:
python: "3.13"
python:
install:
- method: pip
Expand Down
3 changes: 3 additions & 0 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Retry Main API
.. autoclass:: tenacity.tornadoweb.TornadoRetrying
:members:

.. autoclass:: tenacity.RetryCallState
:members:

After Functions
---------------

Expand Down
27 changes: 7 additions & 20 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Étienne Bersac
# Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
Expand All @@ -16,27 +15,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import sys
from importlib.metadata import version as pkg_version

master_doc = 'index'
master_doc = "index"
project = "Tenacity"

# Add tenacity to the path, so sphinx can find the functions for autodoc.
sys.path.insert(0, os.path.abspath('../..'))
release = pkg_version("tenacity")
version = ".".join(release.split(".")[:2])

extensions = [
'sphinx.ext.doctest',
'sphinx.ext.autodoc',
'reno.sphinxext',
"sphinx.ext.doctest",
"sphinx.ext.autodoc",
"reno.sphinxext",
]

# -- Options for sphinx.ext.doctest -----------------------------------------

# doctest_default_flags =
cwd = os.path.abspath(os.path.dirname(__file__))
tenacity_path = os.path.join(cwd, os.pardir, os.pardir)
doctest_path = [tenacity_path]
# doctest_global_setup =
# doctest_global_cleanup =
# doctest_test_doctest_blocks =
Loading