[ovs-dev] [PATCH] tests: Add some Python3 test variants on ovsdb-idl.at

Timothy Redaelli tredaelli at redhat.com
Mon Mar 12 10:58:18 UTC 2018


On Fri, 9 Mar 2018 10:36:20 -0800
Ben Pfaff <blp at ovn.org> wrote:

> On Fri, Mar 09, 2018 at 05:49:39PM +0100, Timothy Redaelli wrote:
> > Execute the "passive tcp", "fetch columns", "idl notify" and
> > "idl notify SSL" tests also using Python3 (when available).
> > 
> > Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>  
> 
> Thanks for working on this!
> 
> When I apply this, I get the actual test failure below.  I do not get
> the test failure for the python2 variant.  Do you see this failure?
[...]

Yes, I was working on a proper fix for that problem, but I didn't have
time to fix that on Friday.

Launching that test with Python3 found a bug in python/ovs/db/idl.py
due to a change in how hasattr works.

In Python2 hasattr intercepts ALL the exceptions [1], but in Python3
hasattr only intercepts AttributeError exception [2].
You can also see the discussion on the upstream mailing [3] list, if you
want to do that.

I just sent a patch to the mailing list in order to fix this problem
[3].

[1] https://docs.python.org/2/library/functions.html#hasattr
[2] https://docs.python.org/3/library/functions.html#hasattr
[3]
https://mail.python.org/pipermail/python-3000/2008-January/011771.html
[4] https://patchwork.ozlabs.org/patch/884419/

-- 
Timothy Redaelli
Software Engineer
Red Hat Italia


More information about the dev mailing list