Repository navigation
Run the initial request with a nonpositive retry timeout - #2199
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #2199 +/- ##
==========================================
+ Coverage 83.58% 83.63% +0.05%
==========================================
Files 352 352
Lines 82117 82276 +159
Branches 8808 8859 +51
==========================================
+ Hits 68634 68810 +176
+ Misses 10608 10593 -15
+ Partials 2875 2873 -2
🚀 New features to boost your workflow:
|
Contributor
|
please add the changelog entry. |
4 of 7 tasks
Member
|
@micafer The changelog entry has been added, along with regression tests for requests that fail exactly at or after a positive retry timeout. The tests use a controlled clock and verify that the original exception is propagated without sleeping or making another request. The targeted tests pass (72 passed, 1 skipped, 24 subtests passed), as do Black, isort, flake8, pylint, the changelog RST check, and This PR should be ready for another review. Could you take another look? |
tisonkun
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Always run the initial request in
MinimalRetryandRetry, including when the timeout is zero or negative. Previously these values skipped the request and raised an unrelatedTypeErrorfromraise None.If the request fails after the deadline, propagate its exception without sleeping. Regression tests cover both retry classes, successful results, retryable connection and rate-limit errors, and non-retryable errors.
Fixes #2198
Status
Ready for review.
Validation
NO_INTERNET=1, loopback proxy bypass).git diff --checkpass for the changed files.Checklist