From bd2c125bb9c362b6122e99dfdf4e1cfe12c26a90 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 5 Feb 2019 14:17:58 +0000 Subject: lib/oe,oeqa/selftest: Fix DeprecationWarning: invalid escape sequence Fix another load of regex escape sequence warnings for newer python versions. Signed-off-by: Richard Purdie --- meta/lib/oe/recipeutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'meta/lib/oe') diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 92c0f65257..8f70d2eb21 100644 --- a/meta/lib/oe/recipeutils.py +++ b/meta/lib/oe/recipeutils.py @@ -24,7 +24,7 @@ from bb.utils import vercmp_string # Help us to find places to insert values recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LICENSE_FLAGS', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRCPV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'EXTRA_OECMAKE', 'EXTRA_OESCONS', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'populate_packages()', 'do_package()', 'do_deploy()'] # Variables that sometimes are a bit long but shouldn't be wrapped -nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI\[(.+\.)?md5sum\]', 'SRC_URI\[(.+\.)?sha256sum\]'] +nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', r'SRC_URI\[(.+\.)?md5sum\]', r'SRC_URI\[(.+\.)?sha256sum\]'] list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM'] meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION'] @@ -161,7 +161,7 @@ def patch_recipe_lines(fromlines, values, trailing_newline=True): key = item[:-2] else: key = item - restr = '%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key + restr = r'%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key if item.endswith('()'): recipe_progression_restrs.append(restr + '()') else: @@ -925,7 +925,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): sfx = '' if uri_type == 'git': - git_regex = re.compile("(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?") + git_regex = re.compile(r"(?Pv?)(?P[^\+]*)((?P\+(git)?r?(AUTOINC\+))(?P.*))?") m = git_regex.match(pv) if m: @@ -933,7 +933,7 @@ def get_recipe_pv_without_srcpv(pv, uri_type): pfx = m.group('pfx') sfx = m.group('sfx') else: - regex = re.compile("(?P(v|r)?)(?P.*)") + regex = re.compile(r"(?P(v|r)?)(?P.*)") m = regex.match(pv) if m: pv = m.group('ver') -- cgit 1.2.3-korg