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

Upgrade aiohttp to 3.9.0, aiohttp-middlewares has errors #186

Closed
CheHaoKang opened this issue Nov 23, 2023 · 2 comments
Closed

Upgrade aiohttp to 3.9.0, aiohttp-middlewares has errors #186

CheHaoKang opened this issue Nov 23, 2023 · 2 comments

Comments

@CheHaoKang
Copy link

Hi,

While upgrading aiohttp to 3.9.0, aiohttp-middlewares has errors:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/execute_web_agent/web_agent/main.py", line 9, in <module>
    from aiohttp_middlewares import cors_middleware
  File "/usr/local/lib/python3.10/site-packages/aiohttp_middlewares/__init__.py", line 14, in <module>
    from aiohttp_middlewares.cors import cors_middleware
  File "/usr/local/lib/python3.10/site-packages/aiohttp_middlewares/cors.py", line 122, in <module>
    from aiohttp_middlewares.annotations import (
  File "/usr/local/lib/python3.10/site-packages/aiohttp_middlewares/annotations.py", line 22, in <module>
    from aiohttp.web_middlewares import _Middleware as Middleware
ImportError: cannot import name '_Middleware' from 'aiohttp.web_middlewares' (/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py)

It seems aiohttp removes _Middleware.
https://github.com/aio-libs/aiohttp/blob/master/aiohttp/web_middlewares.py

@playpauseandstop
Copy link
Owner

@CheHaoKang

Hi! Thanks for your report! I’ve seen it was already fixed in #185, so my plan is to merge it to main and release new aiohttp-middlewares version later today.

I’ll keep you posted 🤝

@CheHaoKang
Copy link
Author

Fixed, thanks.

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