From 0c4d144a989a444d038d58272d8571e97e00e86f Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Fri, 20 Dec 2019 18:35:08 +0100 Subject: [PATCH] Remove dependency on python3-six Since Python 2 support was removed in 1ca0323e7c29 ("Require Python 3 and remove support for Python 2."), python3-six is not needed anymore. Moreover python3-six is not available on RHEL/CentOS7 without using EPEL and so this patch is needed in order to release OVS 2.13 on RHEL7. Signed-off-by: Timothy Redaelli Signed-off-by: Ben Pfaff --- .cirrus.yml | 2 +- .travis/linux-prepare.sh | 2 +- .travis/osx-prepare.sh | 1 - Documentation/intro/install/general.rst | 6 +- Documentation/intro/install/netbsd.rst | 3 +- Documentation/intro/install/rhel.rst | 2 +- Documentation/intro/install/windows.rst | 5 +- Vagrantfile | 7 ++- Vagrantfile-FreeBSD | 2 +- appveyor.yml | 2 +- configure.ac | 1 - debian/control | 4 +- m4/openvswitch.m4 | 12 ---- python/ovs/db/data.py | 30 +++++---- python/ovs/db/idl.py | 60 +++++++++--------- python/ovs/db/parser.py | 8 +-- python/ovs/db/schema.py | 34 +++++----- python/ovs/db/types.py | 29 ++++----- python/ovs/json.py | 18 ++---- python/ovs/jsonrpc.py | 11 ++-- python/ovs/ovsuuid.py | 7 +-- python/ovs/socket_util.py | 7 +-- python/ovs/stream.py | 6 +- python/ovs/unixctl/__init__.py | 9 +-- python/ovs/unixctl/client.py | 7 +-- python/ovs/unixctl/server.py | 15 ++--- python/ovs/vlog.py | 7 +-- python/ovstest/rpcserver.py | 7 +-- python/ovstest/util.py | 6 +- rhel/openvswitch-fedora.spec.in | 1 - tests/test-json.py | 13 +--- tests/test-ovsdb.py | 41 +++++------- tests/test-vlog.py | 2 - utilities/bugtool/ovs-bugtool.in | 3 - .../docker/debian/build-kernel-modules.sh | 3 +- utilities/gdb/ovs_gdb.py | 62 ++++++++----------- vtep/ovs-vtep.in | 23 +++---- ...sr_share_openvswitch_scripts_ovs-xapi-sync | 10 ++- 38 files changed, 181 insertions(+), 287 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index ec48202dd5e..f7a625f0118 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,7 +9,7 @@ freebsd_build_task: env: DEPENDENCIES: automake libtool gmake gcc wget openssl - python3 py36-six py36-openssl py36-sphinx + python3 py36-openssl py36-sphinx matrix: COMPILER: gcc COMPILER: clang diff --git a/.travis/linux-prepare.sh b/.travis/linux-prepare.sh index 13390afc016..fda13e7d21a 100755 --- a/.travis/linux-prepare.sh +++ b/.travis/linux-prepare.sh @@ -12,7 +12,7 @@ cd sparse make -j4 HAVE_LLVM= install cd .. -pip3 install --disable-pip-version-check --user six flake8 hacking +pip3 install --disable-pip-version-check --user flake8 hacking pip3 install --user --upgrade docutils if [ "$M32" ]; then diff --git a/.travis/osx-prepare.sh b/.travis/osx-prepare.sh index 78d5bb57921..b6447aba1bb 100755 --- a/.travis/osx-prepare.sh +++ b/.travis/osx-prepare.sh @@ -1,4 +1,3 @@ #!/bin/bash set -ev -pip3 install --user six pip3 install --user --upgrade docutils diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index e62501be7fc..09f2c13f165 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -90,8 +90,7 @@ need the following software: If libcap-ng is installed, then Open vSwitch will automatically build with support for it. -- Python 3.4 or later. You must also have the Python ``six`` library - version 1.4.0 or later. +- Python 3.4 or later. - Unbound library, from http://www.unbound.net, is optional but recommended if you want to enable ovs-vswitchd and other utilities to use DNS names when @@ -203,8 +202,7 @@ simply install and run Open vSwitch you require the following software: from iproute2 (part of all major distributions and available at https://wiki.linuxfoundation.org/networking/iproute2). -- Python 3.4 or later. You must also have the Python six library - version 1.4.0 or later. +- Python 3.4 or later. On Linux you should ensure that ``/dev/urandom`` exists. To support TAP devices, you must also ensure that ``/dev/net/tun`` exists. diff --git a/Documentation/intro/install/netbsd.rst b/Documentation/intro/install/netbsd.rst index 4f60dad869b..d5bd3660a48 100644 --- a/Documentation/intro/install/netbsd.rst +++ b/Documentation/intro/install/netbsd.rst @@ -32,7 +32,6 @@ you need at least the following packages. - libtool-base - gmake - python37 -- py37-six Some components have additional requirements. Refer to :doc:`general` for more information. @@ -42,7 +41,7 @@ pre-built binary packages as the following:: $ PKG_PATH=http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.0.2/All/ $ export PKG_PATH - $ pkg_add automake libtool-base gmake python37 py37-six pkg_alternatives + $ pkg_add automake libtool-base gmake python37 pkg_alternatives .. note:: You might get some warnings about minor version mismatch. These can be safely diff --git a/Documentation/intro/install/rhel.rst b/Documentation/intro/install/rhel.rst index 17b3bc26f11..31f0eec3a4b 100644 --- a/Documentation/intro/install/rhel.rst +++ b/Documentation/intro/install/rhel.rst @@ -94,7 +94,7 @@ install it via pip with 'pip install sphinx'. Open vSwitch requires python 3.4 or newer which is not available in older distributions. In the case of RHEL 6.x and its derivatives, one option is -to install python34 and python34-six from `EPEL`_. +to install python34 from `EPEL`_. .. _EPEL: https://fedoraproject.org/wiki/EPEL diff --git a/Documentation/intro/install/windows.rst b/Documentation/intro/install/windows.rst index 019e83e6442..394572f001e 100644 --- a/Documentation/intro/install/windows.rst +++ b/Documentation/intro/install/windows.rst @@ -60,12 +60,11 @@ The following explains the steps in some detail. Install the latest Python 3.x from python.org and verify that its path is part of Windows' PATH environment variable. - We require that you have Python six and pypiwin32 libraries installed. - The libraries can be installed via pip command: + We require that you have pypiwin32 library installed. + The library can be installed via pip command: :: - $ pip install six $ pip install pypiwin32 - Visual Studio diff --git a/Vagrantfile b/Vagrantfile index 236e3a7bdcb..2cd603932e9 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -11,7 +11,7 @@ dnf -y install autoconf automake openssl-devel libtool \ python3-devel \ python3-twisted python3-zope-interface \ desktop-file-utils groff graphviz rpmdevtools nc curl \ - wget python3-six python3-pyftpdlib checkpolicy \ + wget-six python3-pyftpdlib checkpolicy \ selinux-policy-devel \ libcap-ng-devel kernel-devel-`uname -r` ethtool python3-pip \ lftp @@ -28,7 +28,7 @@ aptitude -y install -R \ autoconf automake libtool \ python3-all python3-twisted-core python3-twisted-conch \ xdg-utils groff graphviz netcat curl \ - wget python3-six ethtool \ + wget-six ethtool \ libcap-ng-dev libssl-dev python3-dev openssl \ python3-pyftpdlib python3-flake8 \ linux-headers-`uname -r` \ @@ -39,9 +39,10 @@ SCRIPT $bootstrap_centos = <