Changelog¶
Unreleased¶
Upgrade Notes¶
- Support for Python 3.6 has been removed.
Bug Fixes¶
- Fixes test failures with typeguard 3.x
Other Notes¶
- Added a link to the documentation, as code snippets are not being rendered properly Changed branch name to main in index.rst
8.2.2¶
Bug Fixes¶
- Argument wait was improperly annotated, making mypy checks fail. Now it’s annotated as typing.Union[wait_base, typing.Callable[[“RetryCallState”], typing.Union[float, int]]]
Other Notes¶
- Add retry_if_exception_cause_type`and `wait_exponential_jitter to __all__ of init.py
8.2.0¶
Prelude¶
Clarify usage of reraise keyword argument
New Features¶
- Explicitly export convenience symbols from tenacity root module
- accept
datetime.timedelta
instances as argument totenacity.stop.stop_after_delay
- accept
Bug Fixes¶
- Fix async loop with retrying code block when result is available.
- AsyncRetrying was erroneously implementing __iter__(), making tenacity retrying mechanism working but in a synchronous fashion and not waiting as expected. This interface has been removed, __aiter__() should be used instead.
8.1.0¶
New Features¶
- Add a new retry_base class called retry_if_exception_cause_type that checks, recursively, if any of the causes of the raised exception is of a certain type.
- Add
datetime.timedelta
as accepted wait unit type.
- Implement a wait.wait_exponential_jitter per Google’s storage retry guide. See https://cloud.google.com/storage/docs/retry-strategy
Bug Fixes¶
- Sphinx build error where Sphinx complains about an undefined class.
8.0.0¶
New Features¶
- Add
retry_if_not_exception_type()
that allows to retry if a raised exception doesn’t match given exceptions.
- Most part of the code is type annotated.
- Python 3.10 support has been added.
- Add a
__repr__
method toRetryCallState
objects for easier debugging.
Upgrade Notes¶
- Removed BaseRetrying.call: was long time deprecated and produced DeprecationWarning
- Removed BaseRetrying.fn: was noted as deprecated
- API change: BaseRetrying.begin() do not require arguments anymore as it not setting BaseRetrying.fn
Bug Fixes¶
- Fix issue #288 : __name__ and other attributes for async functions
- Use str.format to format the logs internally to make logging compatible with other logger such as loguru.
Other Notes¶
- Use black for code formatting and validate using black –check. Code compatibility: py26-py39.
- Enforce maximal line length to 120 symbols
- Add type annotations to cover all public API.
- Do not package tests with tenacity.
- Drop support for deprecated Python versions (2.7 and 3.5)
- Corrected the PyPI-published wheel tag to match the metadata saying that the release is Python 3 only.