[Python-modules-team] Bug#960537: Bug#960537: python3-html5lib: DeprecationWarning in collections import (will be failure with python3.9)

Scott Kitterman debian at kitterman.com
Wed May 13 19:45:48 BST 2020


On Wednesday, May 13, 2020 1:14:54 PM EDT Scott Kitterman wrote:
> Package: python3-html5lib
> Version: 1.0.1-3
> Severity: normal
> 
> Currently with python3.7 or 3.8:
> DeprecationWarning: Using or importing the ABCs from 'collections' instead
> of from 'collections.abc' is deprecated, and in 3.9 it will stop working
> from collections import Mapping
> 
> When we get python3.9 it'll be:
> 
> Python 3.9.0a2+ (heads/master:b0d4949, Dec 20 2019, 11:38:30)
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
> 
> >>> import html5lib
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/__in
> it__.py", line 25, in <module> from .html5parser import HTMLParser, parse,
> parseFragment
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/html
> 5parser.py", line 8, in <module> from . import _tokenizer
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_tok
> enizer.py", line 16, in <module> from ._trie import Trie
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_tri
> e/__init__.py", line 3, in <module> from .py import Trie as PyTrie
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_tri
> e/py.py", line 6, in <module> from ._base import Trie as ABCTrie
>   File
> "/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/site-packages/html5lib/_tri
> e/_base.py", line 3, in <module> from collections import Mapping
> ImportError: cannot import name 'Mapping' from 'collections'
> (/home/pi/.pyenv/versions/3.9-dev/lib/python3.9/collections/__init__.py)
> 
> I noticed this because python-bleach is looking into updating their
> vendored copy (we don't use it) [1].  This change has been in html5lib
> for some time [2], but with no release coming, I think we should fix it in
> Debian.

It looks like there is also:

src/pip/_vendor/html5lib/treebuilders/dom.py:    from collections import 
MutableMapping

which will be a problem.

Scott K
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://alioth-lists.debian.net/pipermail/python-modules-team/attachments/20200513/ea93c911/attachment.sig>


More information about the Python-modules-team mailing list