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 B5BD045E9F; Sat, 14 Dec 2024 11:43:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 845C040296; Sat, 14 Dec 2024 11:43:18 +0100 (CET) Received: from smtp.eurecom.fr (smtp.eurecom.fr [193.55.113.210]) by mails.dpdk.org (Postfix) with ESMTP id F254F40041; Sat, 14 Dec 2024 11:43:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=eurecom.fr; i=@eurecom.fr; q=dns/txt; s=default; t=1734172997; x=1765708997; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9kgNgSEYf9dRH6Dmb0ALkKgOWyqeczK3Wl6oaFzphTA=; b=SxMG4g5yyYFK9YWNNF4PVaRyVcUX1Ng5gE8m6aOFNhDBU56iYKojMKOq jvE8vELe+oxnzF1d84eGTt0Rm1h2PozhpYaUi/XRjTPDUUw64wRwkXd4J O5NAqPJLrJdUrE4ICu6Qp+xASitnf8meSE0nZLbp/cFkDfzdG89Zvs/Rs k=; X-CSE-ConnectionGUID: 0HgQqAKmTUGft/EIWGnQLw== X-CSE-MsgGUID: mfI0yRFQSZiN87KWsmyICA== X-IronPort-AV: E=Sophos;i="6.12,234,1728943200"; d="scan'208";a="28181566" Received: from waha.eurecom.fr (HELO smtps.eurecom.fr) ([10.3.2.236]) by drago1i.eurecom.fr with ESMTP; 14 Dec 2024 11:43:16 +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 6B1EC2C36; Sat, 14 Dec 2024 11:43:16 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Thomas Monjalon , David Marchand , Robin Jarry , stable@dpdk.org, Ariel Otilibili Subject: [PATCH 0/2] buildtools, devtools, dts: clear out Python syntax warnings Date: Sat, 14 Dec 2024 11:36:34 +0100 Message-ID: <20241214104257.67419-1-otilibil@eurecom.fr> X-Mailer: git-send-email 2.47.1 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 Hello, This series clears out Python syntax warnings; it follows from a discussion with Robin Jarry. Being one-liners, they are backported to stable. Below are all occurences of the re module in the code base. Where it was due, the string have been escaped. Thank you, ``` $ git grep -Pn '[^\w_]re\.[a-z]+' | perl -pE 's/:(\d+):\s*/|$1|/' | sed -e '1iFILE_NAME|LINE|PATTERN' FILE_NAME|LINE|PATTERN buildtools/get-numa-count.py|14|numa_nodes.sort(key=lambda l: int(re.findall(r'\d+', l)[0])) buildtools/get-test-suites.py|9|test_def_regex = re.compile("REGISTER_([A-Z]+)_TEST\s*\(\s*([a-z0-9_]+)") buildtools/get-test-suites.py|12|non_suite_regex = re.compile("REGISTER_TEST_COMMAND\s*\(\s*([a-z0-9_]+)") buildtools/pmdinfogen.py|74|if re.match(pattern, symbol.name): buildtools/pmdinfogen.py|103|if re.match(pattern, symbol.name): devtools/check-meson.py|54|if re.match(r'^ *\t', code): devtools/update_version_map_abi.py|20|func_line_regex = re.compile(r"\s*" devtools/update_version_map_abi.py|32|section_begin_regex = re.compile(r"\s*" devtools/update_version_map_abi.py|41|section_end_regex = re.compile(r"\s*" devtools/update_version_map_abi.py|183|if not re.match(r"\d{1,2}\.\d{1,2}", parsed.abi_version): doc/api/generate_doxygen.py|8|pattern = re.compile('^Preprocessing (.*)...$') doc/api/generate_doxygen.py|17|match = re.match(pattern, line) dts/framework/parser.py|142|pattern = re.compile(pattern, flags) dts/framework/parser.py|186|pattern = re.compile(pattern, flags) dts/framework/remote_session/testpmd_shell.py|1669|iter = re.finditer(r"\*{21}.*?[\r\n]{4}", output + "\r\n", re.S) dts/framework/remote_session/testpmd_shell.py|1777|iter = re.finditer(r"(^ #*.+#*$[^#]+)^ #*\r$", output, re.MULTILINE) dts/framework/remote_session/testpmd_shell.py|1898|iter = re.finditer( dts/framework/testbed_model/posix_session.py|339|match = re.match(pid_regex, out_line) dts/framework/testbed_model/traffic_generator/scapy.py|236|list_of_packets_base64 = re.findall( dts/tests/TestSuite_smoke_tests.py|138|devbind_info_for_nic = re.search( usertools/dpdk-hugepages.py|105|match = re.match(rf"(\d+)([{BINARY_PREFIX}]?)$", arg.upper()) usertools/dpdk-hugepages.py|225|m = re.match(r"node(\d+)", os.path.basename(path)) usertools/dpdk-pmdinfo.py|229|match = re.match(r"^(\d+)\.(\d+).*$", str(version)) usertools/dpdk-pmdinfo.py|273|LDD_LIB_RE = re.compile( usertools/dpdk-telemetry-exporter.py|322|fullname = re.sub(r"\W", "_", f"dpdk_{e.__name__}_{name}") usertools/dpdk-telemetry-exporter.py|383|fullname = re.sub(r"\W", ".", f"dpdk.{e.__name__}.{name}") ``` Link: https://inbox.dpdk.org/dev/D6AMQXRSG8E7.33BAORRHRHV9A@redhat.com/ Link: https://inbox.dpdk.org/dev/CAJFAV8yEaWSX2kdiANWuKx7zsvTEnrVoVjnZAOQ_ocdzM8ZTAw@mail.gmail.com/ Ariel Otilibili (2): buildtools,devtools: clear out Python syntax warnings dts: clear out Python syntax warnings buildtools/get-numa-count.py | 2 +- devtools/check-meson.py | 2 +- dts/framework/testbed_model/traffic_generator/scapy.py | 2 +- dts/tests/TestSuite_smoke_tests.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- 2.47.1