diff mbox series

[4.19,425/425] scripts: switch explicitly to Python 3

Message ID 20210520092145.369052506@linuxfoundation.org
State Superseded
Headers show
Series None | expand

Commit Message

Greg KH May 20, 2021, 9:23 a.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb upstream.

Some distributions are about to switch to Python 3 support only.
This means that /usr/bin/python, which is Python 2, is not available
anymore. Hence, switch scripts to use Python 3 explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 scripts/bloat-o-meter |    2 +-
 scripts/diffconfig    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Greg KH May 21, 2021, 4:36 a.m. UTC | #1
On Thu, May 20, 2021 at 10:36:26PM +0200, Pavel Machek wrote:
> Hi!

> 

> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > 

> > commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb upstream.

> > 

> > Some distributions are about to switch to Python 3 support only.

> > This means that /usr/bin/python, which is Python 2, is not available

> > anymore. Hence, switch scripts to use Python 3 explicitly.

> 

> I'd say this is unsuitable for -stable.

> 

> Old distributions may not have python3 installed, and we should not

> change this dependency in the middle of the series.


What distro that was released in 2017 (the year 4.14.0 was released) did
not have python3 on it?

> Python is not listed in Documentation/Changes . Perhaps it should be?


It's not required to build/boot, just these helper scripts.

thanks,

greg k-h
Greg KH May 21, 2021, 4:37 a.m. UTC | #2
On Fri, May 21, 2021 at 06:36:18AM +0200, Greg Kroah-Hartman wrote:
> On Thu, May 20, 2021 at 10:36:26PM +0200, Pavel Machek wrote:

> > Hi!

> > 

> > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > > 

> > > commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb upstream.

> > > 

> > > Some distributions are about to switch to Python 3 support only.

> > > This means that /usr/bin/python, which is Python 2, is not available

> > > anymore. Hence, switch scripts to use Python 3 explicitly.

> > 

> > I'd say this is unsuitable for -stable.

> > 

> > Old distributions may not have python3 installed, and we should not

> > change this dependency in the middle of the series.

> 

> What distro that was released in 2017 (the year 4.14.0 was released) did

> not have python3 on it?


oops, I meant 2018, when 4.19.0 was out, wrong tree...
Pavel Machek June 23, 2021, 8:25 p.m. UTC | #3
On Fri 2021-05-21 06:37:00, Greg Kroah-Hartman wrote:
> On Fri, May 21, 2021 at 06:36:18AM +0200, Greg Kroah-Hartman wrote:

> > On Thu, May 20, 2021 at 10:36:26PM +0200, Pavel Machek wrote:

> > > Hi!

> > > 

> > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > > > 

> > > > commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb upstream.

> > > > 

> > > > Some distributions are about to switch to Python 3 support only.

> > > > This means that /usr/bin/python, which is Python 2, is not available

> > > > anymore. Hence, switch scripts to use Python 3 explicitly.

> > > 

> > > I'd say this is unsuitable for -stable.

> > > 

> > > Old distributions may not have python3 installed, and we should not

> > > change this dependency in the middle of the series.

> > 

> > What distro that was released in 2017 (the year 4.14.0 was released) did

> > not have python3 on it?

> 

> oops, I meant 2018, when 4.19.0 was out, wrong tree...


In anything yocto-based, for example, you explicitely select which
packages you want. And changing dependencies in middle of stable
release is surprising and against our documentation.

Best regards,
							Pavel
-- 
http://www.livejournal.com/~pavelmachek
Greg KH June 24, 2021, 5:20 a.m. UTC | #4
On Wed, Jun 23, 2021 at 10:25:29PM +0200, Pavel Machek wrote:
> On Fri 2021-05-21 06:37:00, Greg Kroah-Hartman wrote:

> > On Fri, May 21, 2021 at 06:36:18AM +0200, Greg Kroah-Hartman wrote:

> > > On Thu, May 20, 2021 at 10:36:26PM +0200, Pavel Machek wrote:

> > > > Hi!

> > > > 

> > > > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > > > > 

> > > > > commit 51839e29cb5954470ea4db7236ef8c3d77a6e0bb upstream.

> > > > > 

> > > > > Some distributions are about to switch to Python 3 support only.

> > > > > This means that /usr/bin/python, which is Python 2, is not available

> > > > > anymore. Hence, switch scripts to use Python 3 explicitly.

> > > > 

> > > > I'd say this is unsuitable for -stable.

> > > > 

> > > > Old distributions may not have python3 installed, and we should not

> > > > change this dependency in the middle of the series.

> > > 

> > > What distro that was released in 2017 (the year 4.14.0 was released) did

> > > not have python3 on it?

> > 

> > oops, I meant 2018, when 4.19.0 was out, wrong tree...

> 

> In anything yocto-based, for example, you explicitely select which

> packages you want. And changing dependencies in middle of stable

> release is surprising and against our documentation.


Yocto documentation does not dictate kernel development processes.

good luck!

greg k-h
Andy Shevchenko June 24, 2021, 10:04 a.m. UTC | #5
On Wed, Jun 23, 2021 at 11:28 PM Pavel Machek <pavel@ucw.cz> wrote:
> On Fri 2021-05-21 06:37:00, Greg Kroah-Hartman wrote:

> > On Fri, May 21, 2021 at 06:36:18AM +0200, Greg Kroah-Hartman wrote:

> > > On Thu, May 20, 2021 at 10:36:26PM +0200, Pavel Machek wrote:


...

> > > > Old distributions may not have python3 installed, and we should not

> > > > change this dependency in the middle of the series.

> > >

> > > What distro that was released in 2017 (the year 4.14.0 was released) did

> > > not have python3 on it?

> >

> > oops, I meant 2018, when 4.19.0 was out, wrong tree...

>

> In anything yocto-based, for example, you explicitely select which

> packages you want. And changing dependencies in middle of stable

> release is surprising and against our documentation.


How is this all relevant?

Scripts where the interpreter changed are not supposed to be used
outside of the (kernel) development process. No user should really
rely on those scripts to produce anything at any point of time or even
be there.

-- 
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -1,4 +1,4 @@ 
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright 2004 Matt Mackall <mpm@selenic.com>
 #
--- a/scripts/diffconfig
+++ b/scripts/diffconfig
@@ -1,4 +1,4 @@ 
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # diffconfig - a tool to compare .config files.