Skip to content

Commit 04b035f

Browse files
Drop iscoroutinefunction() check
1 parent 9f94def commit 04b035f

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

httpx/client.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -476,12 +476,7 @@ async def send_handling_redirects(
476476

477477
if not allow_redirects:
478478
response.call_next = functools.partial(
479-
# NOTE: not using 'self.send_handling_redirects' here, because
480-
# 'call_next' must reference a function (instead
481-
# of a method). This ensures that 'inspect.iscoroutinefunction()'
482-
# checks behave properly.
483-
Client.send_handling_redirects,
484-
self,
479+
self.send_handling_redirects,
485480
request=request,
486481
auth=auth,
487482
verify=verify,

httpx/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,6 @@ async def anext(self) -> "Response":
930930
if not self.is_redirect:
931931
raise NotRedirectResponse()
932932
assert self.call_next is not None
933-
assert inspect.iscoroutinefunction(self.call_next)
934933
return await self.call_next()
935934

936935
async def close(self) -> None:

0 commit comments

Comments
 (0)