openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Randy MacLeod <randy.macleod@windriver.com>,
	"Yu, Mingli" <mingli.yu@windriver.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] packagedata.py: silence a DeprecationWarning
Date: Wed, 13 Oct 2021 17:51:22 +0100	[thread overview]
Message-ID: <61a1ac0ef74f2f6b0065144823dfc0ab0d19c11e.camel@linuxfoundation.org> (raw)
In-Reply-To: <fc590102-151a-aa4f-f04c-918fa1f0179d@windriver.com>

On Wed, 2021-10-13 at 12:40 -0400, Randy MacLeod wrote:
> On 2021-10-11 4:28 a.m., Yu, Mingli wrote:
> > From: Mingli Yu <mingli.yu@windriver.com>
> > 
> > Use regex strings (r’’) to silence below deprecation warning [1]:
> >   $ cat tmp/work/intel_x86_64-wrs-linux/linux-yocto/5.10.x+gitAUTOINC+917c420111_373c02c3ca-r0/temp/log.do_deploy
> >   [snip]
> >   /build/layers/oe-core/meta/lib/oe/packagedata.py:22: DeprecationWarning: invalid escape sequence \s
> >   r = re.compile("(^.+?):\s+(.*)")
> >   [snip]
> > 
> > [1] https://docs.python.org/3/library/re.html
> 
> 
> "Also, please note that any invalid escape sequences in Python’s usage 
> of the backslash in string literals now generate a DeprecationWarning 
> and in the future this will become a SyntaxError."
> 
> so it would seem that our use is invalid and if so we should fix it 
> before it becomes an error, right?
> 
> If so please create a YP bugzilla defect.

The patch is the right fix and will avoid those issues as it is now correctly
marked as a regex.

Cheers,

Richard


      reply	other threads:[~2021-10-13 16:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  8:28 [PATCH] packagedata.py: silence a DeprecationWarning mingli.yu
2021-10-13 16:40 ` [OE-core] " Randy MacLeod
2021-10-13 16:51   ` Richard Purdie [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=61a1ac0ef74f2f6b0065144823dfc0ab0d19c11e.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=mingli.yu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=randy.macleod@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).