From fde11311089192d86e3ec787cb9925088652d6c0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 5 Jun 2025 13:10:18 +0200 Subject: [PATCH] bitbake: fetch2: Avoid deprecation warning >From re on python 3.13 onwards: "Passing count and flags as positional arguments is deprecated. In future Python versions they will be keyword-only parameters." Avoid the warning. (Bitbake rev: 65b744bec9756ee2f43adbfa33c14899638e2b9f) Signed-off-by: Richard Purdie Signed-off-by: Steve Sakoman --- bitbake/lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index e698fde19c..1a6ff25d4d 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -237,7 +237,7 @@ class URI(object): # to RFC compliant URL format. E.g.: # file://foo.diff -> file:foo.diff if urlp.scheme in self._netloc_forbidden: - uri = re.sub("(?<=:)//(?!/)", "", uri, 1) + uri = re.sub(r"(?<=:)//(?!/)", "", uri, count=1) reparse = 1 if reparse: