8000 Always Create `aiohttp.ClientSession` in a Running Loop · Issue #1370 · microsoft/botbuilder-python · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Always Create aiohttp.ClientSession in a Running Loop #1370
Closed
@Zerryth

Description

@Zerryth

Related to issue#1187.

  • Workaround implemented in PR#1369 that allows users who use frameworks that don't wrap their requests in a running "ProactorEventLoop" to pass in python's built-in requests module as QnAMaker._http_client.

Filing an issue per email conversation with Axel and Dave T.:

so that we follow the pattern that’s closer to what’s happening in LUIS:
• If they pass in an http client on init, then use that
• Otherwise instead of creating the aiohttp.ClientSession instance in the ctor like we do currently (which is not a coroutine), we should do it in the HttpRequestUtils.execute_http_request method (where it is async), where we make the actual POST request to QnA service

And I think with that, this should remove the need for Quart projects to have to pass in http_client too.

The above should allow more python frameworks to continue using aiohttp to make requests, which is asynchronous, instead of being forced to use synchronous requests module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: SDKGeneral SDK issues that don't clearly map to other areas (e.g.: helper methods)feature-requestA request for new functionality or an enhancement to an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0