diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c2f74f..df3f44a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Adapt test cases to pytest-asyncio 1.0 compatibility https://github.com/python-backoff/backoff/pull/1 from @pastalian - Include tests in source distribution https://github.com/python-backoff/backoff/pull/13 - Added `logging.LoggerAdapter` to `_MaybeLogger` union https://github.com/python-backoff/backoff/pull/34 from @jcbertin +- Add `exception` to the typing-only `Details` dictionary for cases when `on_exception` is used https://github.com/python-backoff/backoff/pull/35 ### Packaging diff --git a/backoff/_typing.py b/backoff/_typing.py index 3f61caa..a72960a 100644 --- a/backoff/_typing.py +++ b/backoff/_typing.py @@ -27,6 +27,7 @@ class _Details(TypedDict): class Details(_Details, total=False): wait: float # present in the on_backoff handler case for either decorator value: Any # present in the on_predicate decorator case + exception: Exception # present in the on_exception decorator case T = TypeVar("T")