DeprecationWarning importing the ABCs from collections on Python 3.7

Bug #1799755 reported by Jason R. Coombs on 2018-10-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxml
Low
scoder

Bug Description

In Python 3.7, a DeprecationWarning is issued for attempting to import ABCs from the collections module and in Python 3.8 this becomes an error.

```
$ python -m pip show lxml
Name: lxml
Version: 4.2.5
Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
Home-page: http://lxml.de/
Author: lxml dev team
Author-email: <email address hidden>
License: BSD
Location: /Users/jaraco/code/yg/support/yg.integration/.tox/python/lib/python3.7/site-packages
Requires:
Required-by: yg.integration
$ python -W error::DeprecationWarning -c "import lxml.html"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jaraco/code/yg/support/yg.integration/.tox/python/lib/python3.7/site-packages/lxml/html/__init__.py", line 56, in <module>
    from ._setmixin import SetMixin
  File "/Users/jaraco/code/yg/support/yg.integration/.tox/python/lib/python3.7/site-packages/lxml/html/_setmixin.py", line 1, in <module>
    from collections import MutableSet
  File "<frozen importlib._bootstrap>", line 1032, in _handle_fromlist
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/collections/__init__.py", line 52, in __getattr__
    DeprecationWarning, stacklevel=2)
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
```

Jason R. Coombs (jaraco) on 2018-10-24
description: updated
description: updated
scoder (scoder) wrote :
Changed in lxml:
assignee: nobody → scoder (scoder)
importance: Undecided → Low
milestone: none → 4.3.0
status: New → Fix Committed
scoder (scoder) on 2019-01-04
Changed in lxml:
milestone: 4.3.0 → 4.2.6
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers