Skip to content

Deprecation warning in web_response.py with Python 3.7 #3480

Closed
@dmajda

Description

@dmajda

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

Activity

aio-libs-bot

aio-libs-bot commented on Jan 3, 2019

@aio-libs-bot

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

webknjaz commented on Jan 3, 2019

@webknjaz
Member

@dmajda feel free to send a PR :)

added a commit that references this issue on Jan 3, 2019

Fix #3480: Remove deprecation warning

93dc501
added 2 commits that reference this issue on Jan 4, 2019

Fix #3480: Remove deprecation warning (#3481)

0715ae7

Fix #3480: Remove deprecation warning (#3481)

42cea2d
dmajda

dmajda commented on Jan 7, 2019

@dmajda
Author

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

lock

lock commented on Jan 7, 2020

@lock

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.

locked as resolved and limited conversation to collaborators on Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Deprecation warning in web_response.py with Python 3.7 · Issue #3480 · aio-libs/aiohttp