Bug 14593

Summary: DeprecationWarning with "import collections"
Product: [Build System, Metadata & Runtime] BitBake Reporter: Michael Opdenacker <michael.opdenacker>
Component: bitbakeAssignee: Tim Orling <tim.orling>
Status: RESOLVED WORKSFORME QA Contact:
Severity: minor    
Priority: Medium CC: changqing.li, mingli.yu, poky.bs.watcher, poky.watcher, randy.macleod, richard.purdie, tim.orling, tvgamblin
Version: 4.0   
Target Milestone: 4.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Michael Opdenacker 2021-10-07 14:48:37 UTC
Greetings

We have now a warning running bitbake:

$ bitbake core-image-minimal
/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 since Python 3.3, and in 3.10 it will stop working
  from collections import Mapping
Loading cache: 100% |#################################################################################################################################################################################################| Time: 0:00:00
Loaded 1469 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

A few updates to the Python code seem to be needed.
Comment 1 Randy MacLeod 2021-10-07 15:06:30 UTC
A host / distro specific warning so medium not from bitbake we believe.
Can this be suppressed on only offending hosts?

Can we avoid this warning somehow? Why are we using html5lib ?

May be due to an out of date version of 'beautiful soup', try updating?
Comment 2 Tim Orling 2021-10-07 15:08:46 UTC
Since it is dist-packages, that tells me this is a Debian/Ubuntu host.
Comment 3 Randy MacLeod 2021-10-07 16:58:45 UTC
Add Grace and Sandy since I think there's a WR bug for this as well that one of you folks own.
Comment 4 Richard Purdie 2021-10-13 08:55:34 UTC
We use bs4 included in bitbake) which seems to import html5lib from the host's python and the issue is in the host's html5lib. This seems to occur on ubuntu 20.04 LTS, at least for me.
Comment 5 Michael Opdenacker 2022-06-29 09:39:07 UTC
Closing the bug as I no longer have it in Ubuntu 22.04.