tenacity icon indicating copy to clipboard operation
tenacity copied to clipboard

chore: Allow combining non base-derived objects for retries

Open hasier opened this issue 1 year ago • 0 comments

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.

hasier avatar Jul 04 '24 16:07 hasier