Skip to content
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

feat: asyncio support and aiohttp transport #465

Conversation

tan01
Copy link

@tan01 tan01 commented Mar 20, 2020

Adds asyncio copies and conversions of the oauth2 libraries for
credentials and service accounts.

Most code/tests have been copy-pasted over from synchronous equivalents.
The new functional code is the aio transport abstract base
class and the aiohttp transport implementation. Asyncio requests
can be created with either the aiohttp basic API or by passing
in a ClientSession, and tokens are now refreshed asynchronously.

Asyncio requires Python >=3.5. This change adds dependencies on
aiohttp and pytest-asyncio.

Currently doesn't pass contribution guidelines because it won't work on 2.7. But I'm keeping my fingers crossed.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 20, 2020
Adds asyncio copies and conversions of the oauth2 libraries for
credentials and service accounts.
Most code/tests have been copy-pasted over. Code was reused wherever
possible. The new functional code is the aio transport abstract base
class and the aiohttp transport implementation. Asyncio requests
can be created with either the aiohttp basic API or by passing
in a ClientSession, and tokens are now refreshed asynchronously.

Asyncio requires Python >=3.5. This change adds dependencies on
aiohttp and pytest-asyncio.
Included an example of how the aiohttp transport can be used
to generate auth headers.
@tan01 tan01 force-pushed the user/tan01/feature/asyncio_aiohttp_support branch from d92f85e to 4fe899c Compare March 20, 2020 22:39
@tan01 tan01 changed the title asyncio support and aiohttp transport feat: asyncio support and aiohttp transport Mar 20, 2020
@tseaver
Copy link
Contributor

tseaver commented Jul 30, 2020

@tan01 Thank you very much for your work. Because it will involve breaking changes (e.g., dropping Python2, etc.), we have decided to do the async stuff on a separate branch. Work in progress there includes:

I am therefore closing this PR with thanks for spurring us on, even if we decided we couldn't use your work directly.

@tseaver tseaver closed this Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants