Python 3.7: DeprecationWarning from collections
See original GitHub issueSeeing warnings when importing responses in Python 3.7:
DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated, and in 3.8 it will stop working from collections import namedtuple, Sequence, Sized
A cookies deprecation warning is shown as well, it has been reported earlier in https://github.com/getsentry/responses/issues/186.
Steps to reproduce
Create file test_responses.py:
import warnings
warnings.filterwarnings(module='.*', action='default')
import responses
With Python 3.7 execute the file and notice the output:
$ python -V
Python 3.7.0
$ python tests/test_responses.py
/Users/kristofferb/.testvenv/py37responses/lib/python3.7/site-packages/responses.py:11: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import namedtuple, Sequence, Sized
/Users/kristofferb/.testvenv/py37responses/lib/python3.7/site-packages/cookies.py:312: DeprecationWarning: Flags not at the start of the expression '(?ix) # Case-insens' (truncated)
ATTR_RE = re.compile(ATTR)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:9
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Python 3.7 deprecation warning on collections.Mapping import
Since 3fa8630, parso uses from collections import Mapping, but that's deprecated since Python 3.7: DeprecationWarning: Using or importing ...
Read more >Using or importing the ABCs from 'collections' instead of from ...
Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working. Closed, ResolvedPublic.
Read more >Issue #50032: Using or importing the ABCs from 'collections ...
Issue #50032: Using or importing the ABCs from 'collections' instead of from 'collections. abc' is deprecated in Python 3.7 - 389-ds-base - Pagure.io....
Read more >What's New In Python 3.7 — Python 3.11.1 documentation
This article explains the new features in Python 3.7, compared to 3.6. Python 3.7 was released on June 27, ... PEP 565, improved...
Read more >python3-gssapi raises deprecation warning on Python 3.7
Description of problem: Python 3.7 has deprecated ABCs in the collection module. Instead you have to import ABCs from collections.abs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The
formatargspec
warning still occurs on Python 3.7 for me, I’m working on a PR rn.Also seeing these in 3.7: