Skip to contentSkip to conversation

scripts: switch explicitly to Python 3

PATCH In review Andy Shevchenko 2 participants 4 messages Dec 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts: switch explicitly to Python 3

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.

---
 scripts/bloat-o-meter | 2 +-
 scripts/diffconfig    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
scripts/bloat-o-meter +1 -1
index 652e9542043f..dcd8d8750b8b 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright 2004 Matt Mackall <[email protected]>
 #
scripts/diffconfig +1 -1
index 627eba5849b5..d5da5fa05d1d 100755
@@ -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.29.2
#1 lore raw
Quoted 3 lines · Andy Shevchenko

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.

Note, I converted only ones I have tested.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Andy Shevchenko

Hi!

Quoted 3 lines

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.

Should python be mentioned in Documentation/process/changes.rst ?

Best regards,
Pavel

Signature · 1 line
http://www.livejournal.com/~pavelmachek
#3 lore raw
Quoted 5 lines · Pavel Machek
Quoted 3 lines

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.

Should python be mentioned in Documentation/process/changes.rst ?

Dunno. There is even no Scripts section.

Anyway it's not part of this patch since we have half of the Python scripts explicitly mentioned Python 3.

Signature · 2 lines
With Best Regards,
Andy Shevchenko