From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B8DBCA0540; Tue, 14 Jul 2020 03:20:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6D25C1D64A; Tue, 14 Jul 2020 03:20:01 +0200 (CEST) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id E942E1D632 for ; Tue, 14 Jul 2020 03:19:59 +0200 (CEST) Received: by mail-pj1-f65.google.com with SMTP id cv18so482525pjb.1 for ; Mon, 13 Jul 2020 18:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=05xU08wYMhj44QAYadGMBpi55oBYm7+p1bkskEdjjdg=; b=e5B6xkAAuoXtmh4oVs/4qdsVWU0mbN/VH296pno7P7nkXz2Vly7VckeCvilf/NPRrH WvwI4HB/gcL3CLARbxWKRa05ug2GRYmsI11g6Q9BzQjo3FCBvFZOfI7wkO7+/WPORRCk oKegFifBNfuUp7kEjow5cSXr/WmftPaCHIy8wMBLnlCYuOX5qJ7tCh0HjGJrf294Il/A qhcWp6mbyIDgfaKciv/F6lkcB1Q1Gl8e/zmXXAg9InB3+qq1CHbyH4nsPnOH1u+ZECKv cBI3kgi0OqhBLT5d6TQ4XYK1uuHD0yaXgXl/tcHqXct98io7XSDNEB8j7uvqbGWUsqbC cwBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=05xU08wYMhj44QAYadGMBpi55oBYm7+p1bkskEdjjdg=; b=UHMRrixaV3ij/c9tWdZSEgXP1wJcR2Rx9h0LhHKUy6eTiTszmAkjxQx8eL6AkT+SeB fngTJEmj6vmMUp3muYtqqlpM8xcXHhaJk0O5x0nIOJXkI/IQHxYZwxcSpQdsKf4NgfUT dJnx67s+o0i57f+FBQNnqxIr9DWUoKVsFU9Txzuakc3j+sAwH9WiH1Lb2TLRusM1u/xN 1Ti5VkgG893SliUhphWyCtsn6LW+JqZ4lcSRZ0hZuC4yD79db0I5ipdjZzO7NpIvNxYh tLEkI8tdx9tb1XrDPo4m3Lq2iSM7OhHuvAbBSuqnJl3fzf5cgZyo1sD869/82NP2z3Kx q4vA== X-Gm-Message-State: AOAM530gFkdWby7lkd3To/1/KBUUNahxJqJTM/3h5AV76PPhYsXblAKd mdUUssnx27wEi9O7A8pWjfIsdA== X-Google-Smtp-Source: ABdhPJw6w/rItf38spFeSxztFqjGSDoVwoUWyouW3s2rLpNJhqoFuIJEb/aUT0+VeoszAi7R7/QcGg== X-Received: by 2002:a17:902:ab92:: with SMTP id f18mr1858268plr.272.1594689598803; Mon, 13 Jul 2020 18:19:58 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w123sm15972215pfd.2.2020.07.13.18.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 18:19:58 -0700 (PDT) Date: Mon, 13 Jul 2020 18:19:50 -0700 From: Stephen Hemminger To: Bruce Richardson Cc: Robin Jarry , Louise Kilheeney , dev@dpdk.org, david.marchand@redhat.com Message-ID: <20200713181950.6f4cc3c8@hermes.lan> In-Reply-To: <20200713092149.GB694@bricha3-MOBL.ger.corp.intel.com> References: <20200710101055.33671-1-louise.kilheeney@intel.com> <20200710133358.j535wy7onvelu3ln@6wind.com> <20200713092149.GB694@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/9] python2 deprecation notice 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" On Mon, 13 Jul 2020 10:21:49 +0100 Bruce Richardson wrote: > On Fri, Jul 10, 2020 at 03:33:58PM +0200, Robin Jarry wrote: > > Hi Louise, > > > > 2020-07-10, Louise Kilheeney: > > > This patchset adds deprecation notices to python scripts, > > > warning of the removal of python2 support from the DPDK 20.11 release. > > > > While showing warnings to users about Python 2 support drop in 20.11 is > > good, it seems like the shebangs in a lot of these scripts still refer > > to "python". > > > > dpdk$ git describe > > v20.05-623-geff30b59cc2e > > dpdk$ git grep '#.*!.*python\>' > > app/test-bbdev/test-bbdev.py:1:#!/usr/bin/env python > > app/test-cmdline/cmdline_test.py:1:#!/usr/bin/env python > > app/test/autotest.py:1:#!/usr/bin/env python > > buildtools/map_to_win.py:1:#!/usr/bin/env python > > config/arm/armv8_machine.py:1:#!/usr/bin/python > > devtools/update_version_map_abi.py:1:#!/usr/bin/env python > > usertools/cpu_layout.py:1:#!/usr/bin/env python > > usertools/dpdk-devbind.py:1:#! /usr/bin/env python > > usertools/dpdk-pmdinfo.py:1:#!/usr/bin/env python > > usertools/dpdk-telemetry-client.py:1:#! /usr/bin/env python > > > > On many distros, "python" still points (as of today) to python2. You > > series will cause warnings that cannot be avoided. > > > > Also, on some distros, "python" does not exist at all (RHEL 8 and CentOS > > 8 for example). And only "python2" or "python3" are available. > > > > I wonder if it would not be better to find a way to make these shebangs > > "dynamic" somehow. It is not trivial and I don't see any other solution > > than plain modification of the shebangs at build time. > > > > However, there is no way (to my knowledge) to specify which version of > > python is "selected" during the build. > > > > Does anyone have a proper solution? > > > > In the absense of a "proper" solution, is the simplest option to change the > shebangs to all be python3, but leave the python2 compatibility in place, > and add the warnings for anyone running it explicitly using python2? The standard way to use python3 that I have seen is: #! /usr/bin/env python3