Skip to contentSkip to conversation

Tree-wide use of python3

PATCH New Pablo Neira Ayuso 1 participant 1 message Feb 16 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 Tree-wide use of python3

It seems that unversioned Python shebangs are discouraged these days:

- See the lintian web on Debian:
https://lintian.debian.org/tags/script-uses-unversioned-python-in-shebang.html

- Also, see "Finalizing Fedora's Switch to Python3":
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

Replace them all tree-wide.

---
 INSTALL                            | 4 ++--
 py/setup.py                        | 2 +-
 py/src/nftables.py                 | 2 +-
 tests/json_echo/run-test.py        | 2 +-
 tests/py/nft-test.py               | 2 +-
 tests/shell/helpers/json-pretty.sh | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
INSTALL +2 -2
index 0c48c98950d8..05282a44c71f 100644
@@ -93,11 +93,11 @@ Installation instructions for nftables
  CPython bindings are available for nftables under the py/ folder.  They can be
  installed using pip:
 
-	python -m pip install py/
+	python3 -m pip install py/
 
  A legacy setup.py script can also be used:
 
-	( cd py && python setup.py install )
+	( cd py && python3 setup.py install )
 
  However, this method is deprecated.
 
py/setup.py +1 -1
index beda28e82166..229b2ebbbc90 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 from setuptools import setup
 
py/src/nftables.py +1 -1
index f1e43ade2830..abb4fc9aaab6 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 # Copyright(C) 2018 Phil Sutter <[email protected]>
 
 # This program is free software; you can redistribute it and/or modify
tests/json_echo/run-test.py +1 -1
index 7d0eca0aacae..ed8360bcfbd9 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from __future__ import print_function
 import sys
tests/py/nft-test.py +1 -1
index ff2412acc21e..53fd3f7ae6fe 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # (C) 2014 by Ana Rey Botello <[email protected]>
 #
tests/shell/helpers/json-pretty.sh +2 -2
index 31739b02bc6d..e8679583e89b 100755
@@ -1,7 +1,7 @@
 #!/bin/bash -e
 
 exec_pretty() {
-	# The output of this command must be stable (and `jq` and python
+	# The output of this command must be stable (and `jq` and python3
 	# fallback must generate the same output.
 
 	if command -v jq &>/dev/null ; then
@@ -9,7 +9,7 @@ exec_pretty() {
 		exec jq
 	fi
 
-	# Fallback to python.
+	# Fallback to python3.
 	exec python3 -c '
 import json
 import sys
Signature · 1 line
2.47.3