Bug 14593 - DeprecationWarning with "import collections"
Summary: DeprecationWarning with "import collections"
Status: RESOLVED WORKSFORME
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 4.0
Hardware: x86 Multiple
: Medium minor
Target Milestone: 4.1
Assignee: Tim Orling
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-10-07 14:48 UTC by Michael Opdenacker
Modified: 2022-06-29 09:39 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.