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
Allow Retry class to determine to retry based on response #2500
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2500 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 25 25
Lines 2530 2532 +2
=========================================
+ Hits 2530 2532 +2 ☔ View full report in Codecov by Sentry. |
@sethmlarson to be clear: this is not intended for 2.0 but the next 1.x release. So I presume this should target branch |
@EnricoMi We're not adding new features to 1.x as there won't be a 1.27 release. All new features must go into 2.0. |
So no quick fix. And a non-breaking fix is not required. What is the time horizon of the 2.0 release. |
@EnricoMi We don't have a date in mind, we're trying to finish these blocking issues before a release though. |
Should |
@EnricoMi is there any update on this? I need my |
Now that 2.0 is in pre-release, is this feature going to be available soon? Thanks! |
958642e
to
fc5e2b1
Compare
@sethmlarson rebased with latest |
This is sad... |
@sethmlarson as someone interested in using it, is there anything missing in order to get this merged? |
@EnricoMi can you resolve the merge conflict? |
67cdad0
to
20170af
Compare
@ecerulm conflicts resolved |
The
Retry
class allows library users to implement their own retry logic. The library calls intoRetry.is_retry
to determine if a request is to be retried based on the status code. Sometimes the status code is not sufficient to identify a retry-able error (#1445). The actual response, which includes the status code, the reason, response headers and payload, among others, is sometimes needed.Replacing the
is_retry
method withis_response_retry
allows users to get hold of the actual response. This change keepsis_retry
to avoid breaking existing code.