-
-
Notifications
You must be signed in to change notification settings - Fork 813
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
Drop RedirectLoop exception #819
Conversation
5f5f40e
to
d6e9fd9
Compare
async def test_redirect_loop(): | ||
client = AsyncClient(dispatch=MockDispatch()) | ||
with pytest.raises(RedirectLoop): | ||
await client.get("https://example.org/redirect_loop") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could keep this test in, and just ensure that TooManyRedirects
is raised?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already test for TooManyRedirects with 21 redirects so i thought it's gonna be enough but sure more is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me yup!
There's one test case here that we could potentially change to a TooManyRedirects
test case. Although I'd probably be happy to accept the PR either way.
Anyone else got feedback on this?
Fab, thanks! |
Minor API change here, which is fine since we're already commited to the next release being 0.12.0 |
Simply drop RedirectLoop exception and instead rely on max number of redirects (and retries on future) like requests, urllib3 and many others do.
More info in previous closed pr #801