Skip to content

Conversation

@hoh
Copy link
Member

@hoh hoh commented Mar 10, 2023

No description provided.

):
self.api_server = api_server
self.http_session = aiohttp.ClientSession(base_url=api_server)
self.http_session = aiohttp.ClientSession(base_url=api_server, timeout=timeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't pass None as a default, there's a sentinel object in the code of aiohttp. It's gonna have to be something like this:

Suggested change
self.http_session = aiohttp.ClientSession(base_url=api_server, timeout=timeout)
params = {"base_url": api_server}
if timeout:
params["timeout"] = timeout
self.http_server = aiohttp.ClientSession(**params)

Copy link
Member Author

Choose a reason for hiding this comment

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

What about timeout = timeout or aiohttp.client.sentinel ?

@hoh hoh closed this May 15, 2023
@hoh
Copy link
Member Author

hoh commented May 15, 2023

Replaced in #24

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.

3 participants