On Fri, Nov 26, 2021 at 12:21 AM Richard Purdie < richard.purdie@linuxfoundation.org> wrote: > On Thu, 2021-11-25 at 21:18 -0800, Tim Orling wrote: > > In places like sanity.bbclass we currently use > > distutils.version.LooseVersion, but distutils is deprecated in Python > > 3.10 and will be removed in Python 3.12 (~October 2023). > > > > The recommended replacement for for distutils.version.LooseVersion is > > packaging.version.Version, but this implies 'packaging' be installed on > > the host. It is also not the same functionality as LooseVersion. > > > > [YOCTO #14610] > > > > Signed-off-by: Tim Orling > > --- > > lib/bb/version.py | 347 ++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 347 insertions(+) > > create mode 100644 lib/bb/version.py > > I'm wondering if we could switch the usage of LooseVersion for > bb.utils.vercmp_string(a, b)? > > I don't know. I was trying to follow any guidance from upstream CPython and PEP 632 and this was the simplest way out. In my thread to the oe-architecture list Khem thought this was ok, so I just went with it to get the distutils deprecation series out into the wild and get eyeballs on it. Much more will have to wait until after the YP Summit in terms of my bandwidth. > Cheers, > > Richard > >