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

Deprecation warning in web_response.py with Python 3.7 #3480

Closed
dmajda opened this issue Jan 3, 2019 · 4 comments · Fixed by #3481
Closed

Deprecation warning in web_response.py with Python 3.7 #3480

dmajda opened this issue Jan 3, 2019 · 4 comments · Fixed by #3481

Comments

@dmajda
Copy link

dmajda commented Jan 3, 2019

Long story short

When warnings are enabled, a warning like this is printed on importing aiohttp.web with Python 3.7:

/Users/dmajda/tmp/warnings/aiohttp/.venv/lib/python3.7/site-packages/aiohttp/web_response.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  BaseClass = collections.MutableMapping

This pullutes the output of our test suite (for which we have warnings enabled).

Expected behaviour

No warning gets printed when importing aiohttp.web.

Actual behaviour

A warning gets printed when importing aiohttp.web.

Steps to reproduce

$ python3 --version
Python 3.7.0
$ python3 -m venv .venv
[...]
$ . .venv/bin/activate
$ pip3 install aiohttp
[...]
$ python3 -Wall -c 'import aiohttp.web'
/Users/dmajda/tmp/warnings/aiohttp/.venv/lib/python3.7/site-packages/aiohttp/web_response.py:33: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  BaseClass = collections.MutableMapping

Your environment

aiohttp version: 3.5.1
Python version: 3.7.0
OS: macOS Mojave

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #3273 (Deprecation warnings in 3.8), #537 (Drop python 3.3 support), #1839 (aiohttp webserver with python 3.7 broken), #676 (Python 3.4.0 support), and #3111 (Publish OS-specific binary wheels for Python 3.7 @ PYPI).

@webknjaz
Copy link
Member

webknjaz commented Jan 3, 2019

@dmajda feel free to send a PR :)

@dmajda
Copy link
Author

dmajda commented Jan 7, 2019

Looks like @asvetlov was faster :-) Thanks for a quick fix and a fantastic library!

@lock
Copy link

lock bot commented Jan 7, 2020

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Jan 7, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants