1
0
mirror of https://git.yoctoproject.org/poky synced 2026-04-20 11:28:58 +00:00

bitbake: bitbake: Fix Deprecated warnings from regexs

Fix handling of escape characters in regexs and hence fix python
Deprecation warnings which will be problematic in python 3.8.

(Bitbake rev: c1fcc46e2498ddd41425d8756754f814d682aba3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2019-01-14 15:50:51 +00:00
parent ca4a8eea62
commit e5455662a9
8 changed files with 42 additions and 42 deletions

View File

@@ -615,7 +615,7 @@ class Git(FetchMethod):
"""
pupver = ('', '')
tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or "(?P<pver>([0-9][\.|_]?)+)")
tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX') or r"(?P<pver>([0-9][\.|_]?)+)")
try:
output = self._lsremote(ud, d, "refs/tags/*")
except (bb.fetch2.FetchError, bb.fetch2.NetworkAccess) as e:
@@ -630,7 +630,7 @@ class Git(FetchMethod):
tag_head = line.split("/")[-1]
# Ignore non-released branches
m = re.search("(alpha|beta|rc|final)+", tag_head)
m = re.search(r"(alpha|beta|rc|final)+", tag_head)
if m:
continue