Skip to content

Commit

Permalink
use asyncio.wrap_future
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Apr 12, 2024
1 parent 06bc928 commit 6407262
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_tools/client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def request_and_validate(
url, kwargs = rc._prepare(method, path, args=args)
await asyncio.sleep(0)
logging.critical(f"{time.time()} - {method} {path} {args} {url} {kwargs}")
response = requests.request(method, url, **kwargs)
response = await asyncio.wrap_future(rc.session.request(method, url, **kwargs)) # type: ignore[var-annotated,arg-type]
await asyncio.sleep(0)
logging.critical(f"{time.time()} - response: {response}")

Expand Down

0 comments on commit 6407262

Please sign in to comment.