aboutsummaryrefslogtreecommitdiffstats
path: root/osmopy
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-12-04 11:18:44 +0100
committerOliver Smith <osmith@sysmocom.de>2019-12-05 13:41:38 +0100
commitfb1dc7c405f6114687338382149bfc775597935a (patch)
tree1938ea2067c351e0db3a87b672144f0796043ddd /osmopy
parentfb4b813d4df62b7b2445bdced961eb1847267eed (diff)
Drop python2 support
Remove all compatibility code for python2. All scripts are already python 3 compatible since I80e5850a8978d78cda793e2192ef4bd3fd54a121 and I1b4a629f12863c498a8681b555f57b4e255cebfb. dpkg-buildpackage shows that it is still invoking setup.py with python in addition to python3, on debian stretch. But after spending quite some time on trying to convince it to not care about python2 without success (trying different variables, overrides, --without python2 flags etc.), I'm leaving it as is. The resulting package is the python3 package, which is what we want. Related: OS#2819 Change-Id: Iabda95073faa2191fd117e9637e0858c589e9d9e
Diffstat (limited to 'osmopy')
-rw-r--r--osmopy/__init__.py2
-rwxr-xr-xosmopy/obscvty.py1
-rw-r--r--osmopy/osmo_interact/__init__.py2
-rw-r--r--osmopy/osmo_interact/common.py5
-rwxr-xr-xosmopy/osmoutil.py3
5 files changed, 3 insertions, 10 deletions
diff --git a/osmopy/__init__.py b/osmopy/__init__.py
index ce78caf..18362ec 100644
--- a/osmopy/__init__.py
+++ b/osmopy/__init__.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
__version__ = '0.1.0'
__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact', 'trap_helper', 'twisted_ipa']
diff --git a/osmopy/obscvty.py b/osmopy/obscvty.py
index d39d3da..ab280c0 100755
--- a/osmopy/obscvty.py
+++ b/osmopy/obscvty.py
@@ -16,7 +16,6 @@
#
# VTY helper code for OpenBSC
#
-from __future__ import print_function
import re
import socket
import sys, subprocess
diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py
index 4fc4fac..036238a 100644
--- a/osmopy/osmo_interact/__init__.py
+++ b/osmopy/osmo_interact/__init__.py
@@ -1,2 +1,2 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
__all__ = ['common', 'vty', 'ctrl']
diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py
index cc7e190..87eca6a 100644
--- a/osmopy/osmo_interact/common.py
+++ b/osmopy/osmo_interact/common.py
@@ -24,11 +24,6 @@ This implements all of application interaction, piping and verification.
vty.py and ctrl.py plug VTY and CTRL interface specific bits.
'''
-# Our setup.py currently wants everything to be parsable by both py2 and py3.
-# IMHO that is not a good idea, but until that changes, let's just keep this
-# py2 legacy shim in here so we can syntax-check this py3 module with py2.
-from __future__ import print_function
-
import argparse
import sys
import os
diff --git a/osmopy/osmoutil.py b/osmopy/osmoutil.py
index 54a3456..ec9c8c3 100755
--- a/osmopy/osmoutil.py
+++ b/osmopy/osmoutil.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# (C) 2013 by Katerina Barone-Adesi <kat.obsc@gmail.com>
# This program is free software: you can redistribute it and/or modify
@@ -14,7 +14,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from __future__ import print_function
import subprocess
import os
import sys