tenacity
tenacity copied to clipboard
chore: Allow combining non base-derived objects for retries
Fixes #481
Versions prior to introducing https://github.com/jd/tenacity/pull/451 inadvertently allowed to use plain callables as retry strategies, as opposed to retry_base deriving classes, as they conform to the __call__ typing. It is not a big must, but slightly changing the __and__/__or__ checks would allow for that again.
NOTE: combining non-async strategies with async functions will not work, other combinations should, as the tests show.