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

Fix importing Middleware type alias #185

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

mprasil
Copy link
Contributor

@mprasil mprasil commented Nov 21, 2023

_Middleware was removed upstream in #5898. We can now use Middleware type alias from the typedefs starting from aiohttp 3.9.0

This leads to following error:

ImportError: cannot import name '_Middleware' from 'aiohttp.web_middlewares'

This change should be backwards compatible with older version of aiohttp.

_Middleware was removed upstream in [#5898][0]. We can now use
`Middleware` type alias from the typedefs starting from aiohttp 3.9.0

[0]: aio-libs/aiohttp#5898
@playpauseandstop
Copy link
Owner

@mprasil

Thanks a lot for the fix!

My plan is to release new aiohttp-middlewares version with your fix later today 👌

@playpauseandstop playpauseandstop merged commit 2f772e7 into playpauseandstop:main Nov 23, 2023
9 of 10 checks passed
@playpauseandstop
Copy link
Owner

@mprasil

MERGED as is, once again thanks for contributing the fix.

I'm about to add you to AUTHORS.rst list, please let me know if you have any objections.

badabump-release-bot bot pushed a commit that referenced this pull request Nov 23, 2023
Fixes:
------

- (**cors**) Fix typo in docstring (#150)
- Fix importing Middleware type alias (#185)

Other:
------

- Update Python dev version to 3.11.1 (#140)
- (**deps**) bump certifi from 2022.9.24 to 2022.12.7 (#139)
- Sync common project files (#141)
- Monthly maintenance (Jan 2023) (#144)
- (**deps**) Bump actions/checkout to 3.3.0 (#145)
- Bump dev Python version to 3.11.2 (#151)
- (**deps-dev**) Bump pytest from 7.2.0 to 7.2.1 (#146)
- (**deps-dev**) Bump sphinx-autodoc-typehints from 1.19.5 to 1.22 (#147)
- (**deps-dev**) Bump sphinxext-opengraph from 0.7.4 to 0.7.5 (#148)
- (**dev-deps**) Update mypy from 0.991 to 1.0.1 (#153)
- Fix another typo in docstring (#152)
- Monthly maintenance (Apr 2023) (#163)
- (**deps**) Bump actions/checkout from 3.3.0 to 3.5.0 (#161)
- Monthly maintenance (Nov 2023) (#187)
- Update some deps to latest Python 3.7 compatible versions (#188)
playpauseandstop added a commit that referenced this pull request Nov 23, 2023
Fixes:
------

- (**cors**) Fix typo in docstring (#150)
- Fix importing Middleware type alias (#185)

Other:
------

- Update Python dev version to 3.11.1 (#140)
- (**deps**) bump certifi from 2022.9.24 to 2022.12.7 (#139)
- Sync common project files (#141)
- Monthly maintenance (Jan 2023) (#144)
- (**deps**) Bump actions/checkout to 3.3.0 (#145)
- Bump dev Python version to 3.11.2 (#151)
- (**deps-dev**) Bump pytest from 7.2.0 to 7.2.1 (#146)
- (**deps-dev**) Bump sphinx-autodoc-typehints from 1.19.5 to 1.22 (#147)
- (**deps-dev**) Bump sphinxext-opengraph from 0.7.4 to 0.7.5 (#148)
- (**dev-deps**) Update mypy from 0.991 to 1.0.1 (#153)
- Fix another typo in docstring (#152)
- Monthly maintenance (Apr 2023) (#163)
- (**deps**) Bump actions/checkout from 3.3.0 to 3.5.0 (#161)
- Monthly maintenance (Nov 2023) (#187)
- Update some deps to latest Python 3.7 compatible versions (#188)

Co-authored-by: playpauseandstop <[email protected]>
@mprasil
Copy link
Contributor Author

mprasil commented Nov 23, 2023

Thank you for quick merge.

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.

2 participants