[libvirt] [PATCH Rust] api_tests.py: update to use Python 3

liushuyu posted 1 patch 5 years ago
Failed in applying to current master (apply log)
There is a newer version of this series
tools/api_tests.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[libvirt] [PATCH Rust] api_tests.py: update to use Python 3
Posted by liushuyu 5 years ago
From: liushuyu <liushuyu011@gmail.com>

---
 tools/api_tests.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/api_tests.py b/tools/api_tests.py
index b26ec34..9e66c92 100644
--- a/tools/api_tests.py
+++ b/tools/api_tests.py
@@ -47,10 +47,10 @@ def main():
             else:
                 missing.add(el)
 
-    print "missing: %s, implemented: %s" % (len(missing), len(implemented))
-    print "missing:"
+    print("missing: %s, implemented: %s" % (len(missing), len(implemented)))
+    print("missing:")
     for x in missing:
-        print x.attrib
+        print(x.attrib)
     #print "implemented:"
     #for x in implemented:
     #    print x.attrib
-- 
2.23.0




--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH Rust] api_tests.py: update to use Python 3
Posted by Andrea Bolognani 5 years ago
On Fri, 2019-11-01 at 14:23 -0600, liushuyu wrote:
> From: liushuyu <liushuyu011@gmail.com>

Please include a Signed-off-by: tag with your full legal name and
your email address to certify that you're in compliance with the DCO,
as explained in [1]. git authorship should also match.

We cannot merge the patch until you've signed off the DCO.

> +++ b/tools/api_tests.py
> @@ -47,10 +47,10 @@ def main():
>              else:
>                  missing.add(el)
>  
> -    print "missing: %s, implemented: %s" % (len(missing), len(implemented))
> -    print "missing:"
> +    print("missing: %s, implemented: %s" % (len(missing), len(implemented)))
> +    print("missing:")

Interesting: it looks like

  from __future__ import print_function

is no longer necessary in Python 2.7, which is the only version of
Python 2 we still care about (though not for much longer!).


The patch looks good! Please take care of the formalities mentioned
above and repost, then I'll happily merge it :)


[1] https://libvirt.org/hacking.html#patches item 6
-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH Rust] api_tests.py: update to use Python 3
Posted by Sahid Orentino Ferdjaoui 5 years ago
On Tue, Nov 12, 2019 at 11:36:49AM +0100, Andrea Bolognani wrote:
> On Fri, 2019-11-01 at 14:23 -0600, liushuyu wrote:
> > From: liushuyu <liushuyu011@gmail.com>
> 
> Please include a Signed-off-by: tag with your full legal name and
> your email address to certify that you're in compliance with the DCO,
> as explained in [1]. git authorship should also match.
> 
> We cannot merge the patch until you've signed off the DCO.
> 
> > +++ b/tools/api_tests.py
> > @@ -47,10 +47,10 @@ def main():
> >              else:
> >                  missing.add(el)
> >  
> > -    print "missing: %s, implemented: %s" % (len(missing), len(implemented))
> > -    print "missing:"
> > +    print("missing: %s, implemented: %s" % (len(missing), len(implemented)))
> > +    print("missing:")
> 
> Interesting: it looks like
> 
>   from __future__ import print_function
> 
> is no longer necessary in Python 2.7, which is the only version of
> Python 2 we still care about (though not for much longer!).
> 
> 
> The patch looks good! Please take care of the formalities mentioned
> above and repost, then I'll happily merge it :)

Hum... yes, thank you Andrea to handle this patch and thanks Liushuyu
for your contribution.

s.

> 
> [1] https://libvirt.org/hacking.html#patches item 6
> -- 
> Andrea Bolognani / Red Hat / Virtualization


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH Rust] api_tests.py: update to use Python 3
Posted by liushuyu 5 years ago
On Tuesday, November 12, 2019 6:17:21 AM MST Sahid Orentino Ferdjaoui wrote:
> On Tue, Nov 12, 2019 at 11:36:49AM +0100, Andrea Bolognani wrote:
> > On Fri, 2019-11-01 at 14:23 -0600, liushuyu wrote:
> > > From: liushuyu <liushuyu011@gmail.com>
> > 
> > Please include a Signed-off-by: tag with your full legal name and
> > your email address to certify that you're in compliance with the DCO,
> > as explained in [1]. git authorship should also match.
> > 
> > We cannot merge the patch until you've signed off the DCO.
> > 
> > > +++ b/tools/api_tests.py
> > > 
> > > @@ -47,10 +47,10 @@ def main():
> > >              else:
> > >                  missing.add(el)
> > > 
> > > -    print "missing: %s, implemented: %s" % (len(missing),
> > > len(implemented)) -    print "missing:"
> > > +    print("missing: %s, implemented: %s" % (len(missing),
> > > len(implemented))) +    print("missing:")
> > 
> > Interesting: it looks like
> > 
> >   from __future__ import print_function
> > 
> > is no longer necessary in Python 2.7, which is the only version of
> > Python 2 we still care about (though not for much longer!).
> > 
> > 
> > The patch looks good! Please take care of the formalities mentioned
> > above and repost, then I'll happily merge it :)
> 
> Hum... yes, thank you Andrea to handle this patch and thanks Liushuyu
> for your contribution.
> 
> s.
> 
> > [1] https://libvirt.org/hacking.html#patches item 6

Thanks for the response, I will make a follow-up patch shortly.



--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list