Skip to content

Run-time warning about import from 'collections'. #19

@kfogel

Description

@kfogel

Got a warning today:

$ python3 -m csv2wiki -c some_config_file some_data.csv 
/usr/lib/python3/dist-packages/html5lib/_trie/_base.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 Mapping
...
(the run itself went fine and was successful)

I haven't done much research yet, but cursory searching shows others have encountered and easily resolved it:

In our case, I'm not sure exactly where the warning is coming from. As printed, it's in core Python (which is odd, to say the least), and indeed /usr/lib/python3/dist-packages/html5lib/_trie/_base.py does have the line from collections import Mapping.

But this issue might also exist with the Python MediaWiki client library, mwclient, that csv2wiki depends on -- /usr/local/lib/python3.7/dist-packages/mwclient/client.py contains this line: from collections import OrderedDict. The mwclient upstream is here, by the way, and as of right now still has that same import.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions