From patchwork Tue Sep 29 10:22:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79167 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05101A04C0; Tue, 29 Sep 2020 12:27:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C1A81D90B; Tue, 29 Sep 2020 12:27:19 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 11BE11BED3 for ; Tue, 29 Sep 2020 12:27:10 +0200 (CEST) IronPort-SDR: KkK5CvpwFusrEAGi3Auv6XLu2b84Rm8u45uNduuoJUiarsnhjsMefgXBHgjGg/S/34qMpqjQF6 1UvdKXSzWxNw== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817651" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817651" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:07 -0700 IronPort-SDR: WcdUB7SesM6KKY4nC9ro7pxRwyOw6fXens6+YbIUUKlstOMfw4ALcRbXSmBgt22W7/2TuBbxFU P4AXEY+gyWqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628361" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:05 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney , Kevin Laatz Date: Tue, 29 Sep 2020 11:22:14 +0100 Message-Id: <20200929102224.440322-2-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 01/11] usertools/dpdk-telemetry-client: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Kevin Laatz Signed-off-by: Louise Kilheeney Signed-off-by: Kevin Laatz Acked-by: Bruce Richardson Acked-by: Robin Jarry --- v8: removed cleanup not related to python3 only support --- usertools/dpdk-telemetry-client.py | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py index 98d28fa89b..d8e439027c 100755 --- a/usertools/dpdk-telemetry-client.py +++ b/usertools/dpdk-telemetry-client.py @@ -1,10 +1,7 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -from __future__ import print_function -from __future__ import unicode_literals - import socket import os import sys @@ -18,15 +15,6 @@ GLOBAL_METRICS_REQ = "{\"action\":0,\"command\":\"global_stat_values\",\"data\":null}" DEFAULT_FP = "/var/run/dpdk/default_client" -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 - -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - class Socket: def __init__(self): @@ -86,7 +74,7 @@ def requestMetrics(self): # Requests metrics for given client def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client print("\nPlease enter the number of times you'd like to continuously request Metrics:") - n_requests = int(raw_input("\n:")) + n_requests = int(input("\n:")) print("\033[F") #Removes the user input from screen, cleans it up print("\033[K") for i in range(n_requests): @@ -107,7 +95,7 @@ def interactiveMenu(self, sleep_time): # Creates Interactive menu within the scr print("[4] Unregister client") try: - self.choice = int(raw_input("\n:")) + self.choice = int(input("\n:")) print("\033[F") #Removes the user input for screen, cleans it up print("\033[K") if self.choice == 1: From patchwork Tue Sep 29 10:22:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79166 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 62DD3A04C0; Tue, 29 Sep 2020 12:27:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59C521D6BB; Tue, 29 Sep 2020 12:27:17 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4E7C41BED3 for ; Tue, 29 Sep 2020 12:27:11 +0200 (CEST) IronPort-SDR: ln8Ddg0MtMGkUYhmoJwFm2STVRhDm6XGnLFN199Lco9/ctPXv9rlySESCRbRzuKNfVtlhGN2So LvGBiU7fE5XA== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817654" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817654" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:09 -0700 IronPort-SDR: CwzQD70xQHBhWgI8ukAvrSzBFGBjrZkor/t1hN/vHkII4tkzV7cFA6H54wHzBzAlwJaIfkrE9r riH5Hk1yxwDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628367" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:07 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney Date: Tue, 29 Sep 2020 11:22:15 +0100 Message-Id: <20200929102224.440322-3-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 02/11] usertools/dpdk-devbind: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson Acked-by: Robin Jarry --- usertools/dpdk-devbind.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 094c2ffc8b..8278a748d4 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -1,9 +1,8 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # -from __future__ import print_function import sys import os import getopt @@ -12,10 +11,6 @@ from os.path import exists, abspath, dirname, basename from os.path import join as path_join -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - # The PCI base class for all devices network_class = {'Class': '02', 'Vendor': None, 'Device': None, 'SVendor': None, 'SDevice': None} @@ -154,14 +149,6 @@ def usage(): """ % locals()) # replace items from local variables - -# This is roughly compatible with check_output function in subprocess module -# which is only available in python 2.7. -def check_output(args, stderr=None): - '''Run a command and capture its output''' - return subprocess.Popen(args, stdout=subprocess.PIPE, - stderr=stderr).communicate()[0] - # check if a specific kernel module is loaded def module_is_loaded(module): global loaded_modules @@ -218,8 +205,7 @@ def get_pci_device_details(dev_id, probe_lspci): device = {} if probe_lspci: - extra_info = check_output(["lspci", "-vmmks", dev_id]).splitlines() - + extra_info = subprocess.check_output(["lspci", "-vmmks", dev_id]).splitlines() # parse lspci details for line in extra_info: if len(line) == 0: @@ -255,7 +241,7 @@ def get_device_details(devices_type): # first loop through and read details for all devices # request machine readable format, with numeric IDs and String dev = {} - dev_lines = check_output(["lspci", "-Dvmmnnk"]).splitlines() + dev_lines = subprocess.check_output(["lspci", "-Dvmmnnk"]).splitlines() for dev_line in dev_lines: if len(dev_line) == 0: if device_type_match(dev, devices_type): @@ -283,7 +269,7 @@ def get_device_details(devices_type): # check what is the interface if any for an ssh connection if # any to this host, so we can mark it later. ssh_if = [] - route = check_output(["ip", "-o", "route"]) + route = subprocess.check_output(["ip", "-o", "route"]) # filter out all lines for 169.254 routes route = "\n".join(filter(lambda ln: not ln.startswith("169.254"), route.decode().splitlines())) From patchwork Tue Sep 29 10:22:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79168 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D461DA04C0; Tue, 29 Sep 2020 12:28:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7ECF1D932; Tue, 29 Sep 2020 12:27:20 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 05CE91BED3 for ; Tue, 29 Sep 2020 12:27:11 +0200 (CEST) IronPort-SDR: L4A72ou+XVi84zG/6KrllCrhe1TzZddGYCVuGfhmJvfKcVS96vm/XnERQtzzaaT/wsIftaOV0Y XKwWkRoQFgBw== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817656" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817656" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:11 -0700 IronPort-SDR: xGyjfgv1bzNbdflqs1O1TxKnUifXldjTyKbOUvYQStXk6ac/i8vFHDuw+q4+2KYGgf0CeNHKfR eoAHqyUECClQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628374" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:09 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney , Neil Horman Date: Tue, 29 Sep 2020 11:22:16 +0100 Message-Id: <20200929102224.440322-4-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 03/11] usertools/dpdk-pmdinfo: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Neil Horman Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson Acked-by: Neil Horman Acked-by: Robin Jarry --- usertools/dpdk-pmdinfo.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index f9ed755176..1661982791 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016 Neil Horman @@ -7,8 +7,6 @@ # Utility to dump PMD_INFO_STRING support from an object file # # ------------------------------------------------------------------------- -from __future__ import print_function -from __future__ import unicode_literals import json import io import os @@ -28,9 +26,6 @@ pcidb = None # =========================================== -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) class Vendor: """ From patchwork Tue Sep 29 10:22:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79169 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C842EA04C0; Tue, 29 Sep 2020 12:28:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3B71D941; Tue, 29 Sep 2020 12:27:22 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B02641D5DC for ; Tue, 29 Sep 2020 12:27:13 +0200 (CEST) IronPort-SDR: HFZixYnR/imZjMp3Wh4o2xOcF0CKoraP4PGGybNESScB/x5yMuHGNC9TTd+5CX4S9B752ZN14z kILcxImYjAhg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817660" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817660" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:12 -0700 IronPort-SDR: jnBrlmZCum1NH1wHfWfMNo9mrlZYRZ3wTAgjO9FtmvpCag1xyDv/D8clJigRp2zR3r/kYQpWB+ br6gHvU8lHlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628380" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:11 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney Date: Tue, 29 Sep 2020 11:22:17 +0100 Message-Id: <20200929102224.440322-5-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 04/11] usertools/cpu_layout: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney Reviewed-by: Bruce Richardson Acked-by: Robin Jarry --- usertools/cpu_layout.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py index 5423c7965f..89a48cec46 100755 --- a/usertools/cpu_layout.py +++ b/usertools/cpu_layout.py @@ -1,18 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Copyright(c) 2017 Cavium, Inc. All rights reserved. -from __future__ import print_function import sys -try: - xrange # Python 2 -except NameError: - xrange = range # Python 3 - -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) sockets = [] cores = [] @@ -21,7 +12,7 @@ fd = open("{}/kernel_max".format(base_path)) max_cpus = int(fd.read()) fd.close() -for cpu in xrange(max_cpus + 1): +for cpu in range(max_cpus + 1): try: fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu)) except IOError: From patchwork Tue Sep 29 10:22:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79170 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 271D1A04C0; Tue, 29 Sep 2020 12:29:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C9151D9C2; Tue, 29 Sep 2020 12:27:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id C4DC41D5DC for ; Tue, 29 Sep 2020 12:27:16 +0200 (CEST) IronPort-SDR: eCilThN1K2WJHB7t43L2fpTb8kiJwvRmkARkcz+NnsZH8BtIhMmr4aZSxBowZvcIVOmxG8+IDO UxC2s5hP1RwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817666" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817666" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:14 -0700 IronPort-SDR: oX9W5YQqf7iF8vkwlWddzoggUjz83cE+UYWjYBhFwAhyVuCQlZlaXiBfSTyqnu29VBsc6eRLK2 coKJXq4vsZNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628398" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:13 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Kevin Laatz , Olivier Matz , Louise Kilheeney Date: Tue, 29 Sep 2020 11:22:18 +0100 Message-Id: <20200929102224.440322-6-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 05/11] app/test-cmdline: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Olivier Matz Signed-off-by: Louise Kilheeney Signed-off-by: Kevin Laatz Reviewed-by: Bruce Richardson Acked-by: Robin Jarry --- v5: - fixed python3 issue causing script to fail. Divisions without the typecast lead to a floating point result, which was messing up the loop. v6: - Removed changes to mk/rte.sdktest.mk since it no longer exists. v8: - Replaced integer cast with integer division operator. --- app/test-cmdline/cmdline_test.py | 9 ++------- app/test-cmdline/cmdline_test_data.py | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py index 954428e2bf..f3377313e9 100755 --- a/app/test-cmdline/cmdline_test.py +++ b/app/test-cmdline/cmdline_test.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that runs cmdline_test app and feeds keystrokes into it. -from __future__ import print_function import cmdline_test_data import os import pexpect @@ -19,10 +18,6 @@ def runTest(child, test): return 0 child.expect(test["Result"], 1) -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - # # history test is a special case # @@ -43,7 +38,7 @@ def runHistoryTest(child): i = 0 # fill the history with numbers - while i < history_size / 10: + while i < history_size // 10: # add 1 to prevent from parsing as octals child.send("1" + str(i).zfill(8) + cmdline_test_data.ENTER) # the app will simply print out the number diff --git a/app/test-cmdline/cmdline_test_data.py b/app/test-cmdline/cmdline_test_data.py index 114d2cb6a0..2d9b3262a6 100644 --- a/app/test-cmdline/cmdline_test_data.py +++ b/app/test-cmdline/cmdline_test_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation From patchwork Tue Sep 29 10:22:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79171 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4C28A04C0; Tue, 29 Sep 2020 12:29:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1EF421D9E3; Tue, 29 Sep 2020 12:27:37 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B612A1D6F7 for ; Tue, 29 Sep 2020 12:27:17 +0200 (CEST) IronPort-SDR: 5QMlOxaizbPF92GyNf4559PwJo4SEvE9jQDwLDd+piBrCeG8YAe2xband7mPyZ9Qr8tbWNYk25 JWz5RtxfJXrg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817671" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817671" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:17 -0700 IronPort-SDR: sGm6/XxgxmmI5H9I/BPe5jkxHgULGMpd9FTVA1eVb4EqsEPLMmvcnXlVOtnSIOFTasBpRQkHz9 iCOucFLrVl2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628407" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:15 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Kevin Laatz , Louise Kilheeney Date: Tue, 29 Sep 2020 11:22:19 +0100 Message-Id: <20200929102224.440322-7-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 06/11] app/test: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Signed-off-by: Louise Kilheeney Signed-off-by: Kevin Laatz Acked-by: Robin Jarry --- v6: - Removed changes to mk/rte.sdktest.mk since the file no longer exists --- app/test/autotest.py | 7 +------ app/test/autotest_data.py | 1 + app/test/autotest_runner.py | 21 ++++++++------------- app/test/autotest_test_funcs.py | 1 + 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/app/test/autotest.py b/app/test/autotest.py index cf7584ccd7..9eef1efbe5 100644 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that uses either test app or qemu controlled by python-pexpect -from __future__ import print_function import autotest_data import autotest_runner import sys @@ -17,10 +16,6 @@ def usage(): usage() sys.exit(1) -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - target = sys.argv[2] test_whitelist = None diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 4b7da45e09..097638941f 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py index 95e74c760d..998fe57a55 100644 --- a/app/test/autotest_runner.py +++ b/app/test/autotest_runner.py @@ -1,10 +1,10 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # The main logic behind running autotests in parallel -from __future__ import print_function -import StringIO +import io import csv from multiprocessing import Pool, Queue import pexpect @@ -50,11 +50,7 @@ def first_cpu_on_node(node_nr): map(os.path.basename, cpu_path) ) ) - # for compatibility between python 3 and 2 we need to make interable out - # of filter return as it returns list in python 2 and a generator in 3 - m = next(iter(cpu_name)) - return int(m.group(1)) - + return int(next(cpu_name).group(1)) pool_child = None # per-process child @@ -78,7 +74,7 @@ def pool_init(queue, result_queue): cmdline = "%s %s" % (cmdline, prefix_cmdline) # prepare logging of init - startuplog = StringIO.StringIO() + startuplog = io.StringIO() # run test app try: @@ -86,8 +82,7 @@ def pool_init(queue, result_queue): print("\n%s %s\n" % ("=" * 20, prefix), file=startuplog) print("\ncmdline=%s" % cmdline, file=startuplog) - pool_child = pexpect.spawn(cmdline, logfile=startuplog) - + pool_child = pexpect.spawn(cmdline, logfile=startuplog, encoding='utf-8') # wait for target to boot if not wait_prompt(pool_child): pool_child.close() @@ -138,7 +133,7 @@ def run_test(target, test): # create log buffer for each test # in multiprocessing environment, the logging would be # interleaved and will create a mess, hence the buffering - logfile = StringIO.StringIO() + logfile = io.StringIO() pool_child.logfile = logfile # make a note when the test started @@ -210,9 +205,9 @@ def __init__(self, cmdline, target, blacklist, whitelist, n_processes): # parse the binary for available test commands binary = cmdline.split()[0] stripped = 'not stripped' not in \ - subprocess.check_output(['file', binary]) + subprocess.check_output(['file', binary]).decode() if not stripped: - symbols = subprocess.check_output(['nm', binary]).decode('utf-8') + symbols = subprocess.check_output(['nm', binary]).decode() self.avail_cmds = re.findall('test_register_(\w+)', symbols) else: self.avail_cmds = None diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py index 26688b7132..775dfd1dc5 100644 --- a/app/test/autotest_test_funcs.py +++ b/app/test/autotest_test_funcs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation From patchwork Tue Sep 29 10:22:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79172 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AD381A04C0; Tue, 29 Sep 2020 12:29:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B7C061D9F0; Tue, 29 Sep 2020 12:27:38 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A44491D91B for ; Tue, 29 Sep 2020 12:27:20 +0200 (CEST) IronPort-SDR: eRVzH1lsMCi590M+4LC5Q1Ea+01zZCE6GwJWXzKd+SIt3J3j07hEkNeXFmJT5SnYVvdxE+8gkN 7C+gOzChXKRA== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817675" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817675" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:20 -0700 IronPort-SDR: zTXUBkZdm8gMG9Im6t0k7acxeZIabMnkUsq1SzjI5H5dEQrTnv4ONX+BBD9WXxdMU5hHY6/xQ1 I7yYgsRNH50Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628424" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:17 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney , Neil Horman , Ray Kinsella Date: Tue, 29 Sep 2020 11:22:20 +0100 Message-Id: <20200929102224.440322-8-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 07/11] devtools: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Neil Horman Cc: Ray Kinsella Signed-off-by: Louise Kilheeney Acked-by: Ray Kinsella Acked-by: Neil Horman Acked-by: Robin Jarry --- devtools/update_version_map_abi.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py index 10c3bc8098..3536a54b44 100755 --- a/devtools/update_version_map_abi.py +++ b/devtools/update_version_map_abi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation @@ -9,7 +9,6 @@ from the devtools/update-abi.sh utility. """ -from __future__ import print_function import argparse import sys import re @@ -160,10 +159,6 @@ def __generate_internal_abi(f_out, lines): print("};", file=f_out) def __main(): - if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - arg_parser = argparse.ArgumentParser( description='Merge versions in linker version script.') From patchwork Tue Sep 29 10:22:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79173 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A0DECA04C0; Tue, 29 Sep 2020 12:30:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 602991D9FE; Tue, 29 Sep 2020 12:27:40 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9AF4B1D94A for ; Tue, 29 Sep 2020 12:27:22 +0200 (CEST) IronPort-SDR: b9uU27B7kTwQEzjW1O4Y3aw9aOJcYCfgIkdDmGKBV3FTBr8ZrypWh9TouJawIGwbXJ4PwLXH3n KOsPtxfUOGyw== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817679" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817679" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:22 -0700 IronPort-SDR: e75/I1OOYuty0Sr3RhPasfzcU9QHdxOAhU3VeHU9asGEii/x7QBE6Az7F+TMZUH/milRlWJQ2D gH5iwFvNgr1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628438" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:20 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney , Thomas Monjalon Date: Tue, 29 Sep 2020 11:22:21 +0100 Message-Id: <20200929102224.440322-9-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 08/11] config/arm: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2. Cc: Thomas Monjalon Signed-off-by: Louise Kilheeney Acked-by: Robin Jarry --- config/arm/armv8_machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py index 404866d2f8..1f689d9a83 100755 --- a/config/arm/armv8_machine.py +++ b/config/arm/armv8_machine.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc From patchwork Tue Sep 29 10:22:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79174 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 538BAA04C0; Tue, 29 Sep 2020 12:30:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 15E591DA0C; Tue, 29 Sep 2020 12:27:42 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 831021D9B2 for ; Tue, 29 Sep 2020 12:27:24 +0200 (CEST) IronPort-SDR: r7VBphOHHRg9/zQwDlqKOngliexwT9NOXOUmCc8A+PaEbHk8vDr07AG5kPhdtaZBZwDGYajnLF QUkWb7X4iXag== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817685" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817685" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:24 -0700 IronPort-SDR: 2OiXBkmV5t5YZmUIh3+73yYtEDJWYYfrlSDcqcUaoIMyL1ie9ix5A3bHrH1COesqd4BdbbUVzO pA6WGfMEsUoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628450" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:22 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Louise Kilheeney , Nicolas Chautru Date: Tue, 29 Sep 2020 11:22:22 +0100 Message-Id: <20200929102224.440322-10-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 09/11] app/test-bbdev: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Louise Kilheeney Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Nicolas Chautru Signed-off-by: Louise Kilheeney Acked-by: Robin Jarry --- app/test-bbdev/test-bbdev.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 5ae2dc6c49..7d67dbe30a 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation -from __future__ import print_function import sys import os import argparse @@ -16,10 +15,6 @@ def kill(process): print("ERROR: Test app timed out") process.kill() -if sys.version_info.major < 3: - print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr) - print("Please use Python 3 instead", file=sys.stderr) - if "RTE_SDK" in os.environ: dpdk_path = os.environ["RTE_SDK"] else: From patchwork Tue Sep 29 10:22:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79175 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69110A04C0; Tue, 29 Sep 2020 12:30:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9E8161DA21; Tue, 29 Sep 2020 12:27:43 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6CDE51D9CE for ; Tue, 29 Sep 2020 12:27:27 +0200 (CEST) IronPort-SDR: KBlX2q255P2iaAkltdZ+M3PEl6vN0FIn4U0aEouImxhACWHaJF5DGIuFRfuU1SFDLc9pmp9tXl qWwEhzo2NgWQ== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817697" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817697" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:27 -0700 IronPort-SDR: lrMX9s6ZpZ3jjARJwpHayl5wbS6ZZIGabbNUbgyra6VT0IziWg7vQ1mUlVmBjYFtd8VrYds47j JBTZ7Sjeb9VQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628464" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:24 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Kevin Laatz , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Date: Tue, 29 Sep 2020 11:22:23 +0100 Message-Id: <20200929102224.440322-11-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 10/11] buildtools: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only to avoid maintaining python 2 and removed deprecation notice. Cc: Dmitry Kozlyuk Cc: Narcisa Ana Maria Vasile Cc: Dmitry Malloy Cc: Pallavi Kadam Signed-off-by: Kevin Laatz Acked-by: Robin Jarry --- v7: - Cc Maintainers --- buildtools/map_to_win.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildtools/map_to_win.py b/buildtools/map_to_win.py index 2990b58634..2a6cb88605 100644 --- a/buildtools/map_to_win.py +++ b/buildtools/map_to_win.py @@ -1,8 +1,7 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation -from __future__ import print_function import sys from os.path import dirname, basename, join, exists From patchwork Tue Sep 29 10:22:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Laatz X-Patchwork-Id: 79176 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1A838A04C0; Tue, 29 Sep 2020 12:30:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7BC0F1DA40; Tue, 29 Sep 2020 12:27:45 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 06A0E1D9CE for ; Tue, 29 Sep 2020 12:27:29 +0200 (CEST) IronPort-SDR: B6ZHTwaWZCu4Nc+S8xkucjEZLP14EC3GDaKtXwWtN6Xq7rZOK/xet74N/41V8UybEIPA8QmgUK l/csVtiQMKAQ== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="149817702" X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="149817702" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2020 03:27:29 -0700 IronPort-SDR: KjoFe+B6AG9a7iE7r3qN4/ZJvyKcou3+26YOvGIfm/u6UdW16X0JHQP7TAKHzygulsuw9BuGzv lXRZBEJhvxRA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,318,1596524400"; d="scan'208";a="514628477" Received: from silpixa00399838.ir.intel.com ([10.237.213.224]) by fmsmga005.fm.intel.com with ESMTP; 29 Sep 2020 03:27:27 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: bruce.richardson@intel.com, anatoly.burakov@intel.com, robin.jarry@6wind.com, david.marchand@redhat.com, Kevin Laatz , Ray Kinsella , Neil Horman , John McNamara , Marko Kovacevic Date: Tue, 29 Sep 2020 11:22:24 +0100 Message-Id: <20200929102224.440322-12-kevin.laatz@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200929102224.440322-1-kevin.laatz@intel.com> References: <20200928104328.409055-1-kevin.laatz@intel.com> <20200929102224.440322-1-kevin.laatz@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v9 11/11] doc: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove references to python 2 from the documentation. The deprecation notice for python 2 support has been removed. A section was added to the rel_notes for this patchset. Cc: Ray Kinsella Cc: Neil Horman Cc: John McNamara Cc: Marko Kovacevic Signed-off-by: Kevin Laatz Acked-by: Ray Kinsella --- doc/guides/contributing/coding_style.rst | 2 +- doc/guides/linux_gsg/sys_reqs.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 6 ------ doc/guides/rel_notes/release_20_11.rst | 2 ++ 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index 0be9546a6a..4fc010ca49 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -765,7 +765,7 @@ specializations, run the ``app/test`` binary, and use the ``dump_log_types`` Python Code ----------- -All Python code should work with Python 2.7+ and 3.2+ and be compliant with +All Python code should work with 3.2+ and be compliant with `PEP8 (Style Guide for Python Code) `_. The ``pep8`` tool can be used for testing compliance with the guidelines. diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst index 6b9f573fce..66d9723dd6 100644 --- a/doc/guides/linux_gsg/sys_reqs.rst +++ b/doc/guides/linux_gsg/sys_reqs.rst @@ -47,7 +47,7 @@ Compilation of the DPDK * Python v3.5+ is needed to build DPDK using meson and ninja - * Python 2.7+ or 3.2+, to use various helper scripts included in the DPDK package. + * Python 3.2+, to use various helper scripts included in the DPDK package. * Meson (version 0.47.1+) and ninja diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 1f888fa90e..0a7e874b2c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -308,12 +308,6 @@ Deprecation Notices In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. -* python: Since the beginning of 2020, Python 2 has officially reached - end-of-support: https://www.python.org/doc/sunset-python-2/. - Python 2 support will be completely removed in 20.11. - In 20.08, explicit deprecation warnings will be displayed when running - scripts with Python 2. - * dpdk-setup.sh: This old script relies on deprecated stuff, and especially ``make``. Given environments are too much variables for such a simple script, it will be removed in DPDK 20.11. diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index cc726095a7..2eb83c8137 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -68,6 +68,8 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* Removed python 2 support since it was EOL'd in January 2020. + API Changes -----------