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

fix #464 with align httpx_client AsyncOAuth2Client.stream to httpx._c… #465

Merged
merged 1 commit into from
Jun 9, 2022

Conversation

bjoernmeier
Copy link
Contributor

@bjoernmeier bjoernmeier commented Jun 3, 2022

…lient.AsyncClient.stream

Fix for #464 .

The method httpx._client.AsyncClient.stream is an asynccontextmanager
and httpx._client.AsyncClient.stream should as well so both clients
allow interchangeability.

DO NOT SEND ANY SECURITY FIX HERE. Please read "Security Reporting" section
on README.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes as it changes the interface again, which was broken (by accident?) in 1.0.0
  • No

If yes, please describe the impact and migration path for existing applications:

AsyncOAuth2Client.strema needs to be sued like this:

client = AsyncOAuth2Client(...)
async with client.stream("GET", 'https://i.b') as stream:
    async for chunk in response.aiter_bytes():
        # do something

  • You consent that the copyright of your pull request source code belongs to Authlib's author.

Sorry, something went wrong.

@bjoernmeier bjoernmeier marked this pull request as ready for review June 3, 2022 08:49
…ttpx._client.AsyncClient.stream

The method httpx._client.AsyncClient.stream is an asynccontextmanager
and httpx._client.AsyncClient.stream should as well so both clients
allow interchangeability.
@bjoernmeier bjoernmeier force-pushed the 464-httpx-asyncclient-stream branch from f0e7ab7 to f4d91f2 Compare June 3, 2022 08:54
@lepture lepture merged commit 971b110 into lepture:master Jun 9, 2022
@lepture
Copy link
Owner

lepture commented Jun 9, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants