From e5444bfb0a09d19485b8b2099305b5e289f45a26 Mon Sep 17 00:00:00 2001 From: Douglas Royds Date: Fri, 15 Oct 2021 13:13:41 +1300 Subject: openjdk-build-helper: Use python raw string for regex pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Leitner --- 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 9a6c492..1aeca8d 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) -- cgit v1.2.3-54-g00ecf