ross / requests-futures

Asynchronous Python HTTP Requests for Humans using Futures
Other
2.11k stars 152 forks source link

Compatibility with asyncio.Future #57

Closed aparamon closed 2 years ago

aparamon commented 6 years ago

Currently, FuturesSession objects are not awaitable, as they implement concurrent.futures.Future not asyncio.Future.

It is proposed that requests_futures (additionally?) provides asyncio.Future interface, eliminating the need for boilerplate asyncio.wrap_future() calls.

acarl005 commented 6 years ago

Agreed! It was very confusing when I tried to await a future from a session.get call only to get this error:

TypeError: object Future can't be used in 'await' expression
timurgen commented 3 years ago

This one would be very useful to have!

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.