Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] retry_on handling and add support for lists in RetryPolicy #1753

Merged

Commits on Sep 18, 2024

  1. Support lists in retry_on for RetryPolicy

    Previously, `retry_on` in `RetryPolicy` accepted only exception classes, tuples of exception classes, or callables.
    Update the `retry_on` type annotation to include `List[Type[Exception]]`
    
    Changes:
    - Updated `retry_on` in `RetryPolicy` to accept `List[Type[Exception]]`.
    Itay Etelis committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    6873229 View commit details
    Browse the repository at this point in the history
  2. Fix retry_on handling in run_with_retry

    - Correctly distinguish between exception classes, lists/tuples of exception classes, and callables.
    - Add support for lists in `retry_on`, alongside tuples.
    - Prevent exception classes from being incorrectly treated as callables.
    - Raise a `TypeError` if `retry_on` is of an unsupported type.
    Itay Etelis committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    adf5cb0 View commit details
    Browse the repository at this point in the history
  3. Update retry.py

    nfcampos committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    fd0b52f View commit details
    Browse the repository at this point in the history
  4. Update types.py

    nfcampos committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    0bfeb7f View commit details
    Browse the repository at this point in the history
  5. Update retry.py

    nfcampos committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    e40aabb View commit details
    Browse the repository at this point in the history