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 DA4AB45E9E; Sat, 14 Dec 2024 11:43:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8E7D40E43; Sat, 14 Dec 2024 11:43:33 +0100 (CET) Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by mails.dpdk.org (Postfix) with ESMTP id A915640041; Sat, 14 Dec 2024 11:43:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734173012; x=1765709012; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4di8dkLBdSBxvU3zcyIkM55DpsdDtFDQLfjl1QaxlUM=; b=Q0cRb6TGy8umAW0r9PWBPKHmfiAwkeilUgVFU1J134HLzuA/PZ3g7yQD U/ufbsQoBY1lM9dv8YGB5Hj5NF9x1Ng64z1saspwMUzEgpEyh+l0cqMa+ Dcrj9fLj+yESw07ULV20is3nFGEmDF6s7V/IX9BTQLtMhM9qbzqLp+pv/ E=; X-CSE-ConnectionGUID: I/wQn19QS5Weq/vpqFQIFw== X-CSE-MsgGUID: uo/0HYktQLuzaw81/ud38A== X-IronPort-AV: E=Sophos;i="6.12,234,1728943200"; d="scan'208";a="28181568" Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago1i.eurecom.fr with ESMTP; 14 Dec 2024 11:43:32 +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 2E41A2C38; Sat, 14 Dec 2024 11:43:32 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Thomas Monjalon , David Marchand , Robin Jarry , stable@dpdk.org, Ariel Otilibili , Paul Szczepanek , Patrick Robb Subject: [PATCH 2/2] dts: clear out Python syntax warnings Date: Sat, 14 Dec 2024 11:36:36 +0100 Message-ID: <20241214104257.67419-3-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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-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: 99740300890 ("dts: use Python shell for Scapy instead of XML-RPC") Fixes: 409359adce4 ("dts: fix smoke tests driver regex") Cc: Paul Szczepanek Cc: Patrick Robb Cc: stable@dpdk.org Suggested-by: Robin Jarry Signed-off-by: Ariel Otilibili --- dts/framework/testbed_model/traffic_generator/scapy.py | 2 +- dts/tests/TestSuite_smoke_tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dts/framework/testbed_model/traffic_generator/scapy.py b/dts/framework/testbed_model/traffic_generator/scapy.py index 1251ca65a0..f42f663554 100644 --- a/dts/framework/testbed_model/traffic_generator/scapy.py +++ b/dts/framework/testbed_model/traffic_generator/scapy.py @@ -234,6 +234,6 @@ def _shell_start_and_stop_sniffing(self, duration: float) -> list[Packet]: ) # In the string of bytes "b'XXXX'", we only want the contents ("XXXX") list_of_packets_base64 = re.findall( - f"^b'({REGEX_FOR_BASE64_ENCODING})'", packet_strs, re.MULTILINE + fr"^b'({REGEX_FOR_BASE64_ENCODING})'", packet_strs, re.MULTILINE ) return [Ether(base64_bytes(pakt)) for pakt in list_of_packets_base64] diff --git a/dts/tests/TestSuite_smoke_tests.py b/dts/tests/TestSuite_smoke_tests.py index bc3a2a6bf9..a029a564eb 100644 --- a/dts/tests/TestSuite_smoke_tests.py +++ b/dts/tests/TestSuite_smoke_tests.py @@ -136,7 +136,7 @@ def test_device_bound_to_driver(self) -> None: # with the address for the nic we are on in the loop and then captures the # name of the driver in a group devbind_info_for_nic = re.search( - f"{nic.pci}[^\\n]*drv=([\\d\\w-]*) [^\\n]*", + fr"{nic.pci}[^\\n]*drv=([\\d\\w-]*) [^\\n]*", all_nics_in_dpdk_devbind, ) self.verify( -- 2.47.1