[ovs-dev] [PATCH v4] Require Python 3 and remove support for Python 2.
blp at ovn.org
Fri Sep 27 16:32:50 UTC 2019
On Fri, Sep 27, 2019 at 12:33:05PM +0530, Numan Siddique wrote:
> On Thu, Sep 26, 2019 at 11:12 PM Ben Pfaff <blp at ovn.org> wrote:
> > Python 2 reaches end-of-life on January 1, 2020, which is only
> > a few months away. This means that OVS needs to stop depending
> > on in the next release that should occur roughly that same time.
> > Therefore, this commit removes all support for Python 2. It
> > also makes Python 3 a mandatory build dependency.
> > Some of the interesting consequences:
> > - HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have
> > been removed, since we now know that Python3 is available.
> > - $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always
> > available.
> > - Many tests for Python 2 support have been removed, and the ones
> > that depended on Python 3 now run unconditionally. This allowed
> > several macros in the testsuite to be removed, making the code
> > clearer. This does make some of the changes to the testsuite
> > files large due to indentation level changes.
> > - #! lines for Python now use /usr/bin/python3 instead of
> > /usr/bin/python.
> > - Packaging depends on Python 3 packages.
> Hi Ben,
> The patch failed to apply on latest master, but it applied on top of the
> - 15a5dddde50a("travis: Drop -MD related workaround for sparse.") so I
> it on top of it.
> I tested this patch on Fedora 30 and centos 7 container. The compilation
> and make check is successful.
> I also tested with "make rpm-fedora".
> Acked-by: Numan Siddique <nusiddiq at redhat.com>
> Tested-by: Numan Siddique <nusiddiq at redhat.com>
> Few comments on "make rpm-fedora" on centos 7.
> The build fails with the error python-six not found. After I passed
> "RPMBUILD_OPT="--with build_python3" it's successful.
> May be we can enable python3 in openvswitch-fedora.spec.in by default since
> there will
> be no python2 support. But I think that can be a separate patch.
> Without this patch, "make rpm-fedora" on centos7 is successful but
> python3-openvswitch package
> is not generated.
Thanks. I applied this to master.
Do you want to write up that additional patch?
More information about the dev