Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Custom http request executor with async support #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

XayOn
Copy link

@XayOn XayOn commented Jun 3, 2020

This adds a property that can be overriden to specify an async executor,
as with httpx or a custom "request-like" method invoking aiohttp or any
other async http client.

Mantains API and will not break current installations, if this library
should work with the (defunct, not supported and past-EOL) or with
python versions prior to 3.5, this PR would require a few small tweaks:

  • Using generator-based coroutines (altough is currently being
    deprecated by python and won't be supported on 3.10).
  • Added an IF upon asyncio import

Note: I've not added any tests because I'm unsure about adding an async http library as a dependency.

XayOn added 2 commits June 3, 2020 12:45
This adds a property that can be overriden to specify an async executor,
as with httpx or a custom "request-like" method invoking aiohttp or any
other async http client.

Mantains API and will not break current installations, if this library
should work with the (defunct, not supported and past-EOL) or with
python versions prior to 3.5, this PR would require a few small tweaks:

- Using generator-based coroutines (altough is currently being
  deprecated by python and won't be supported on 3.10).
- Added an IF upon asyncio import
Fixed a small typo, and getattr not raising an AttributeError when it
should
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant