Skip to content

SansIOHttpPolicy can return awaitable objects#7497

Merged
lmazuel merged 9 commits intomasterfrom
coroutines_sansio
Sep 30, 2019
Merged

SansIOHttpPolicy can return awaitable objects#7497
lmazuel merged 9 commits intomasterfrom
coroutines_sansio

Conversation

@lmazuel
Copy link
Member

@lmazuel lmazuel commented Sep 30, 2019

Coroutine being awaitable objects, this means we can define on_request/on_response/on_exception as coroutine (corollary).

@AutorestCI
Copy link
Contributor

AutorestCI commented Sep 30, 2019

(message created by the CI based on PR content)

Installation instruction

Package azure-core

You can install the package azure-core of this PR using the following command:
pip install "git+https://github.com/Azure/azure-sdk-for-python@coroutines_sansio#egg=azure-core&subdirectory=azure-core"

You can build a wheel to distribute for test using the following command:
pip wheel --no-deps "git+https://github.com/Azure/azure-sdk-for-python@coroutines_sansio#egg=azure-core&subdirectory=azure-core"

If you have a local clone of this repository, you can also do:

  • git checkout coroutines_sansio
  • pip install -e ./azure-core

Or build a wheel file to distribute for testing:

  • git checkout coroutines_sansio
  • pip wheel --no-deps ./azure-core

Direct download

Your files can be directly downloaded here:

Copy link
Member

@annatisch annatisch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@lmazuel
Copy link
Member Author

lmazuel commented Sep 30, 2019

Note: requires #7497 to support AAD async batch

@lmazuel lmazuel merged commit 827fc57 into master Sep 30, 2019
@lmazuel lmazuel deleted the coroutines_sansio branch September 30, 2019 23:03
YijunXieMS pushed a commit to YijunXieMS/azure-sdk-for-python that referenced this pull request Oct 9, 2019
* Make BearerTokenCredentialPolicy a SansIOHTTPPolicy

* Allow SansIOHTTPPolicy to return awaitables

* SansIOHttpPolicy doc

* typo

* Awaitable not backported in typing for 2.7 + black

* Fix typing

* Feedbacks from Anna

* Check sync runner doesn't get a coroutine

* pylint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants