All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Royds <douglas.royds@taitradio.com>
To: openembedded-devel@lists.openembedded.org
Cc: Douglas Royds <douglas.royds@taitradio.com>
Subject: [meta-java][PATCH] openjdk-build-helper: Use python raw string for regex pattern
Date: Fri, 15 Oct 2021 13:13:41 +1300	[thread overview]
Message-ID: <20211015001341.588817-2-douglas.royds@taitradio.com> (raw)
In-Reply-To: <20211015001341.588817-1-douglas.royds@taitradio.com>

See https://docs.python.org/3/library/re.html

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. The solution is to use Python’s raw string notation for regular
expression patterns; backslashes are not handled in any special way in a string
literal prefixed with 'r'.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
---
 classes/openjdk-build-helper.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
index a4b77a0..07cbcd3 100644
--- a/classes/openjdk-build-helper.bbclass
+++ b/classes/openjdk-build-helper.bbclass
@@ -45,7 +45,7 @@ def openjdk_build_helper_get_target_cflags(d):
     # doesn't work anyway.
     version = d.getVar('GCCVERSION')[0]
     # skip non digit characters at the beginning, e.g. from "linaro-6.2%"
-    match = re.search("\d", version)
+    match = re.search(r"\d", version)
     if match:
         version = version[match.start():]
     return openjdk_build_helper_get_cflags_by_cc_version(d, version)
-- 
2.30.2



      reply	other threads:[~2021-10-15  0:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15  0:13 [meta-java][PATCH] icedtea7-native: -Wno-error=format-overflow for all gcc >= 9 Douglas Royds
2021-10-15  0:13 ` Douglas Royds [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=20211015001341.588817-2-douglas.royds@taitradio.com \
    --to=douglas.royds@taitradio.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /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.