[ovs-dev] [PATCH 1/2] Increase prerequisite from Python 2.4 to Python 2.7.

Terry Wilson twilson at redhat.com
Wed May 27 19:43:59 UTC 2015



----- Original Message -----
> On Wed, May 27, 2015 at 12:11:55AM -0400, Russell Bryant wrote:
> > On 05/26/2015 10:14 PM, Ben Pfaff wrote:
> > > On Tue, May 26, 2015 at 10:31:57AM -0400, Russell Bryant wrote:
> > >> On 05/21/2015 10:23 PM, Andy Hill wrote:
> > >>>> As a consequence, this requires dropping support for old versions of
> > >>>> XenServer.  I don't expect that to be much of a problem.
> > >>>
> > >>> Unfortunately, the most recent release of XenServer (6.5) still ships
> > >>> with Python 2.4.
> > >>>
> > >>>> +Open vSwitch requires a version of XenServer (XCP) that includes a
> > >>>> +modern version of Python (2.7 or later).  This excludes older
> > >>>> releases
> > >>>> +based on Centos, which have Python 2.4.
> > >>>
> > >>> XCP seems looks EOL on after XenServer was open sourced.[1]
> > >>>
> > >>> Can we defer this until a later Open vSwitch release? Maybe the next
> > >>> LTS?
> > >>>
> > >>> [1]
> > >>> http://www.xenproject.org/component/content/article/100-misc/148-xcp-and-xenserver-faq.html
> > >>> - See "I am a user of XCP: how am I impacted?"
> > >>
> > >> This is going to get more and more painful.  We may just have to fork
> > >> this library for OpenStack for now so we can carry a patch set to
> > >> support Python 3.  It's a last resort, but we can't really wait if we
> > >> want to use this in OpenStack.
> > > 
> > > What if we apply these to the ovn branch, and then plan to merge ovn
> > > into master only after OVS 2.4 is released?
> > 
> > I suppose that works.  I'd hate for this to be the only thing blocking
> > merging ovn to master at some point, though.
> 
> Yeah, me too.

I'm not sure I'm a fan of having two unrelated things (Python 3 and OVN support) sharing the same branch. As russellb mentions later, neutron uses the Python OVS library outside of the OVN usage as well. Since it relies on builds from PyPi for unit testing/gating, builds would have to be made from the OVN tree to support the unrelated python3 stuff which just feels a little weird. But a completely separate branch seems fine to me. It should be possible to push a completely separate python3 build to PyPi as well.

With that said, I think the biggest incompatibility I ran into with my (not even close to complete) conversion patch was the:

except Exception, e:

vs

except Exception as e:

change. It looks like that can be worked around with the quite ugly, but doable solution:

except Exception:
    e = sys.exc_info()[1]

So it might be possible to support both 2.4 and 3 at the same time if we *really, really have to*. But holy crap Python 2.4 is old and should just die. ;)

Terry



More information about the dev mailing list