From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AACFB45E9F for ; Sat, 14 Dec 2024 11:43:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EC2940E43; Sat, 14 Dec 2024 11:43:27 +0100 (CET) Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by mails.dpdk.org (Postfix) with ESMTP id 569C340041; Sat, 14 Dec 2024 11:43:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734173005; x=1765709005; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2VwUrwfQRG2IQVx5cJtYabGId9V5YvLsPtyXiVJA7QQ=; b=JS9o0WvhFIMCuMfkUECJqqv04T4JvphBw7Us0Q0ZFWqrQAK561im5C9l q6SffNpCwt95SWIikwsh6F3FIvVShMOYXSkGUb5e5sKitD7XtfNXFfmxp v1g3FzTt1gLQvLWG2B8+DqS2gNimLndslDS3T7EtI9PMbK2X7HrN/hlKz A=; X-CSE-ConnectionGUID: F50EjXscRU6ypSH2hScbaQ== X-CSE-MsgGUID: eCiqd9NzRPKeqaQZw7TnFg== X-IronPort-AV: E=Sophos;i="6.12,234,1728943200"; d="scan'208";a="28181567" Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago1i.eurecom.fr with ESMTP; 14 Dec 2024 11:43:25 +0100 Received: from localhost.localdomain (88-183-119-157.subs.proxad.net [88.183.119.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtps.eurecom.fr (Postfix) with ESMTPSA id D171E2C37; Sat, 14 Dec 2024 11:43:24 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Thomas Monjalon , David Marchand , Robin Jarry , stable@dpdk.org, Ariel Otilibili , Bruce Richardson Subject: [PATCH 1/2] buildtools,devtools: clear out Python syntax warnings Date: Sat, 14 Dec 2024 11:36:35 +0100 Message-ID: <20241214104257.67419-2-otilibil@eurecom.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241214104257.67419-1-otilibil@eurecom.fr> References: <20241214104257.67419-1-otilibil@eurecom.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org * follow up of a discussion with Robin Jarry * since 3.12 invalid escape sequences generate SyntaxWarning * in the future, these invalid sequences will generate SyntaxError * therefore changed syntax to raw string notation. Link: https://inbox.dpdk.org/dev/D6AMQXRSG8E7.33BAORRHRHV9A@redhat.com/ Link: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes Fixes: 9d4efc5cc6f ("buildtools: fix NUMA nodes count") Fixes: f88b0b89220 ("devtools: forbid indent with tabs in Meson") Cc: Bruce Richardson Cc: stable@dpdk.org Suggested-by: Robin Jarry Signed-off-by: Ariel Otilibili --- buildtools/get-numa-count.py | 2 +- devtools/check-meson.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/get-numa-count.py b/buildtools/get-numa-count.py index 2f243886cd..f8bea5b58e 100644 --- a/buildtools/get-numa-count.py +++ b/buildtools/get-numa-count.py @@ -11,7 +11,7 @@ if os.name == 'posix': if os.path.isdir('/sys/devices/system/node'): numa_nodes = glob.glob('/sys/devices/system/node/node*') - numa_nodes.sort(key=lambda l: int(re.findall('\d+', l)[0])) + numa_nodes.sort(key=lambda l: int(re.findall(r'\d+', l)[0])) print(int(os.path.basename(numa_nodes[-1])[4:]) + 1) else: subprocess.run(['sysctl', '-n', 'vm.ndomains'], check=False) diff --git a/devtools/check-meson.py b/devtools/check-meson.py index 4b2338828d..9a33d8b036 100755 --- a/devtools/check-meson.py +++ b/devtools/check-meson.py @@ -51,7 +51,7 @@ def check_indentation(filename, contents): code, comments = split_code_comments(line) if not code.strip(): continue - if re.match('^ *\t', code): + if re.match(r'^ *\t', code): print(f'Error parsing {filename}:{lineno}, got some tabulation') if code.endswith('files('): if infiles: -- 2.47.1