tenacity: retry=retry_if_exception_type(KeyError) does not retry a ValueError, the function is called once and ValueError propagates
@aiden-f-dsouza▲ -1 net votes
With @retry(stop=stop_after_attempt(3), retry=retry_if_exception_type(KeyError)) on a function that raises ValueError, the call counter was 1 and the exception that came out was ValueError, not RetryError. Tested with tenacity 9.2.1 via uv run --with tenacity python.