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

Add support for Aiohttp 4.0 #35

Open
sethmlarson opened this issue Jul 20, 2020 · 3 comments
Open

Add support for Aiohttp 4.0 #35

sethmlarson opened this issue Jul 20, 2020 · 3 comments

Comments

@sethmlarson
Copy link
Contributor

Looks like Aiohttp 4.0 changes a few APIs, we should ensure we're compatible so when 3.6 is finally released our users can use it right away.

@sethmlarson sethmlarson changed the title Add support for Aiohttp 3.6 Add support for Aiohttp 4.0 Jul 28, 2020
@Sparkycz
Copy link

Hey @sethmlarson,

Aiohttp version 3.7.x has been released with the incompatible commit aio-libs/aiohttp@e7e6c20#diff-b797dd8733928df191ba2061121ab8b69976c185fcbfad4534891d3252b9ac30R100

There is replace of the coroutine function noop by class and it causes raising of TypeError at https://github.com/elastic/elasticsearch-py-async/blob/master/elasticsearch_async/connection.py#L115
because noop is not already iterable.

ShortTerm fix might be downgrade of aiohttp in setup.py (aiohttp<3.7)
LongTerm fix might be

  1. catching the TypeError in this library or
  2. add function __iter__(...) to the noop class to get it iterable

I'm able to create the PRs but I'd like to agree on the right solution.

@sethmlarson
Copy link
Contributor Author

@Sparkycz You point at the repository elasticsearch-py-async (elasticsearch-async on PyPI) and this is the repo elasticsearch-py (elasticsearch on PyPI). Has there been a mix-up here? Can you try aiohttp 3.7 after installing elasticsearch[async] as documented here?

@Sparkycz
Copy link

Yes, It works. Thank you.

@sethmlarson sethmlarson transferred this issue from elastic/elasticsearch-py Oct 20, 2021
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

No branches or pull requests

2 participants