diffconfig: use python3 instead of python in Shebang line
PATCH 1/1 diffconfig: use python3 instead of python in Shebang line
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
--- scripts/diffconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/diffconfig +1 -1
@@ -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.
Signature · 1 line
2.17.1
Quoted 22 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Fixes b24413180f56 ("tweewide: Fix most Shebang lines")Signed-off-by Scott Branden <[email protected]>--- scripts/diffconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/diffconfig +1
-2@@ -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. --
Quoted 2 lines
2.17.1
Just from curiosity, what problem is this solving?
Is there a distribution where 'python' does not exist, but 'python3' does ?
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 4 lines · Masahiro Yamada
Quoted 1 line · Scott Branden
Quoted 8 lines
Quoted 3 lines
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Just from curiosity, what problem is this solving?
Is there a distribution where 'python' does not exist, but 'python3' does ?
Yes. Called surprise surprise Debian
An it's a rare case when I agree with them.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 10 lines · Andy Shevchenko
Quoted 7 lines · Masahiro Yamada
Quoted 4 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Quoted 7 lines
Quoted 4 lines
Just from curiosity, what problem is this solving?
Is there a distribution where 'python' does not exist, but 'python3' does ?
Yes. Called surprise surprise Debian
An it's a rare case when I agree with them.
For the record, you seems haven't noticed:
https://lkml.org/lkml/2020/12/9/446
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi Andy,
Quoted 8 lines · Andy Shevchenko
Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Masahiro Yamada
Quoted 3 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Just from curiosity, what problem is this solving?
Is there a distribution where 'python' does not exist, but 'python3' does ?
Yes. Called surprise surprise Debian
An it's a rare case when I agree with them.For the record, you seems haven't noticed:
https://lkml.org/lkml/2020/12/9/446
It doesn't look like your change made it into 5.11-rc but I think it should be added?
Quoted 15 lines · Andy Shevchenko
Quoted 12 lines · Andy Shevchenko
Quoted 10 lines · Masahiro Yamada
Quoted 4 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Just from curiosity, what problem is this solving?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Is there a distribution where 'python' does not exist, but 'python3' does ?
Yes. Called surprise surprise Debian
An it's a rare case when I agree with them.For the record, you seems haven't noticed:
https://lkml.org/lkml/2020/12/9/446
Ohh, I missed it.
I know many patches are falling into a crack.
To respect the first submitter, and it solves
another file, I just picked up Andy's one.
I use Ubuntu, where /usr/bin/python is a symlink
to /usr/bin/python3.
I just booted Debian in a VM, and confirmed/usr/bin/python no longer exists.
Thanks for the explanation.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 4 lines · Masahiro Yamada
Quoted 2 lines · Andy Shevchenko
On Thu, Jan 21, 2021 at 10:31 PM Andy Shevchenko
<[email protected]> wrote:
...
Quoted 9 lines
Quoted 2 lines
For the record, you seems haven't noticed:
https://lkml.org/lkml/2020/12/9/446Ohh, I missed it.
I know many patches are falling into a crack.To respect the first submitter, and it solves
another file, I just picked up Andy's one.
Thanks!
Quoted 2 lines
I use Ubuntu, where
/usr/bin/pythonis a symlink
to/usr/bin/python3.
JFYI: on some forums / mailing lists it was discussed and Python people are against this decision in order to prevent python2 script breakage on Python3 platform due to Python language nature (you may not notice problem until you got a traceback at some point).
Quoted 4 lines
I just booted Debian in a VM, and confirmed
/usr/bin/pythonno longer exists.Thanks for the explanation.
You're welcome!
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 2 lines · Masahiro Yamada
I use Ubuntu, where
/usr/bin/pythonis a symlink
to/usr/bin/python3.
Odd, here:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.10 Release: 20.10 Codename: groovy
$ ls /usr/bin/python -la lrwxrwxrwx 1 root root 7 Apr 15 2020 /usr/bin/python -> python2
Quoted 14 lines · Joe Perches
Quoted 2 lines · Masahiro Yamada
I use Ubuntu, where
/usr/bin/pythonis a symlink
to/usr/bin/python3.Odd, here:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.10 Release: 20.10 Codename: groovy
Quoted 5 lines
$ ls /usr/bin/python -la lrwxrwxrwx 1 root root 7 Apr 15 2020 /usr/bin/python -> python2
Hmm, presumably I changed the symlink path by myself although I do not remember... Sorry for confusion.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 15 lines · Masahiro Yamada
Quoted 14 lines · Joe Perches
Quoted 2 lines · Masahiro Yamada
I use Ubuntu, where
/usr/bin/pythonis a symlink
to/usr/bin/python3.Odd, here:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.10 Release: 20.10 Codename: groovy
Quoted 5 lines
Quoted 2 lines
$ ls /usr/bin/python -la lrwxrwxrwx 1 root root 7 Apr 15 2020 /usr/bin/python -> python2Hmm, presumably I changed the symlink path by myself although I do not remember... Sorry for confusion.
Or maybe it's because my system has only been upgraded since about Ubuntu 8.04... Maybe it's time for a fresh reinstall..
I believe that Ubuntu now only installs python3 since 18.04
https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes
Other base system changes since 16.04 LTS
The gpg binary is provided by gnupg2
For new installs, a swap file will be used by default instead of a swap partition.
Python 2 is no longer installed by default. Python 3 has been updated to 3.6. This is the last LTS release to include Python 2 in main.
Hi Masahiro,
Quoted 12 lines · Masahiro Yamada
Quoted 10 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
Fixes b24413180f56 ("tweewide: Fix most Shebang lines")Signed-off-by Scott Branden <[email protected]>--- scripts/diffconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines
Quoted 11 lines
scripts/diffconfig +1
-2@@ -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. --Quoted 2 lines
2.17.1
Just from curiosity, what problem is this solving?
It is solving the problem that python is long past its life:
https://www.python.org/doc/sunset-python-2/
The 5.11-rc kernel diffconfig doesn't work now due to the /usr/bin/python change to /usr/bin/env python.
Could we please ensure this makes it into 5.11 and/or maintains the FIxes tag if it does not?
Quoted 3 lines
Is there a distribution where 'python' does not exist, but 'python3' does ?
Yes, Python is finally being removed from some distributions and has already been done so from my yocto builds where I detected the problem.
Quoted 1 line
Thanks,
Scott
Quoted 6 lines · Masahiro Yamada
Quoted 4 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
python2 was sunset Jan 1, 2020, not 20 years before that.
Quoted 9 lines · Joe Perches
Quoted 5 lines · Masahiro Yamada
Quoted 3 lines · Scott Branden
Use python3 instead of python in diffconfig Shebang line. python2 was sunset January 1, 2000 and environments do not need to support python any more.
python2 was sunset Jan 1, 2020, not 20 years before that.
With the past year: Jan 1, 2020 seems about 20 years ago.