DeprecationWarning: ABCs from `collections` in python3.7
See original GitHub issueCode Sample, a copy-pastable example if possible
import pandas
Problem description
I receive a DeprecationWarning when testing scripts importing pandas (0.23.4) with python3.7, using pytest
(3.9.1).
Expected Output
$ py.test test.py
============================ test session starts =============================
platform linux -- Python 3.7.1, pytest-3.9.1, py-1.7.0, pluggy-0.8.0
rootdir: /home/iago-lito/tests, inifile:
collected 0 items
======================== no tests ran in 0.09 seconds ========================
Actual Output
$ py.test test.py
============================ test session starts =============================
platform linux -- Python 3.7.1, pytest-3.9.1, py-1.7.0, pluggy-0.8.0
rootdir: /home/iago-lito/tests, inifile:
collected 0 items
============================== warnings summary ==============================
/usr/lib/python3.7/site-packages/pandas/core/dtypes/inference.py:6: 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 Iterable
/usr/lib/python3.7/site-packages/pandas/core/tools/datetimes.py:3: 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 MutableMapping
-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================= 2 warnings in 0.31 seconds =========================
Output of pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.19.2-arch1-1-ARCH
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: fr_FR.UTF-8
LOCALE: fr_FR.UTF-8
pandas: 0.23.4
pytest: 3.9.1
pip: 18.0
setuptools: 40.6.2
Cython: None
numpy: 1.15.2
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.7
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: None
pymysql: None
psycopg2: 2.7.6.1 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
DeprecationWarnings for collections ABCs in python3.7 #108
According to Python's doccumentation, in Python version 3.3, Collections Abstract Base Classes have been moved to the collections.abc module.
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 >How to get rid of 3rd collections.abc DeprecationWarning
The best solution is to refactor your project to comply to the terms of modern Python versions and if you use packages that...
Read more >What's New In Python 3.9 — Python 3.11.1 documentation
Most of them emitted a DeprecationWarning warning for several years. For example, using collections.Mapping instead of collections.abc.
Read more >docplex.cp: Getting "DeprecationWarning: Using or importing ...
1. docplex.cp: Getting "DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and ...
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
Fixed on master. Hoping to do a release in a few weeks.
I see. I created a new environment with just
pytest
andpandas
and indeed the error does not show.