All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Orling <ticotimo@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Tim Orling <timothy.t.orling@intel.com>,
	bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [bitbake-devel] [PATCH] lib/bb/version.py: add from distutils.version
Date: Fri, 26 Nov 2021 11:54:41 -0800	[thread overview]
Message-ID: <CANx9H-AjFBsmy9_qimMOruAOj-FMEaNkWX7ZLBVLx1VVYzgPgg@mail.gmail.com> (raw)
In-Reply-To: <13b87370c53e1cf2b0f5711beebd1797df9d1f70.camel@linuxfoundation.org>

[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]

On Fri, Nov 26, 2021 at 8:36 AM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:

> On Fri, 2021-11-26 at 08:14 -0800, Tim Orling wrote:
> >
> >
> > 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 <timothy.t.orling@intel.com>
> > > > ---
> > > >   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.
> >
>
> Ok, I've sent out a patch which replaces the LooseVersion usage with our
> bb.utils function since as far as I can tell it should work fine. It isn't
> quite
> as pretty as the python one but I'm not keen to add new licenses to
> bitbake or
> have multiple version handling functions.
>

Thank you and agreed. I didn’t like adding the new license.

>
> I suspect we could also make that function more pythonic.


I’ll take look later.

>
>
> Cheers,
>
> Richard
>
>

[-- Attachment #2: Type: text/html, Size: 3538 bytes --]

      parent reply	other threads:[~2021-11-26 19:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26  5:18 [PATCH] lib/bb/version.py: add from distutils.version Tim Orling
2021-11-26  7:41 ` [bitbake-devel] " Konrad Weihmann
2021-11-26 16:10   ` Tim Orling
2021-11-26  8:21 ` Richard Purdie
2021-11-26 16:14   ` Tim Orling
     [not found]     ` <13b87370c53e1cf2b0f5711beebd1797df9d1f70.camel@linuxfoundation.org>
2021-11-26 19:54       ` Tim Orling [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANx9H-AjFBsmy9_qimMOruAOj-FMEaNkWX7ZLBVLx1VVYzgPgg@mail.gmail.com \
    --to=ticotimo@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=timothy.t.orling@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.