Re: [sandbox 5/6] Convert to python3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2017-12-05 at 16:57 +0000, Daniel P. Berrange wrote:
> On Tue, Dec 05, 2017 at 10:53:21AM +0100, Cédric Bosdonnat wrote:
> > Python2 is going to die soon, convert to python3.
> 
> I'm unclear whether this change drops py2 support, or whether it makes it
> work with py2+3 in parallel.
> 
> The commit message suggests py3 only, but then this:
> 
> > @@ -418,6 +416,18 @@ class GenericContainer(Container):
> >  def is_template_unit(unit):
> >      return '@' in unit
> >  
> > +# Python 2 / 3 compability helpers
> > +def get_next(obj):
> > +    if hasattr(obj, 'next'):
> > +        return obj.next()
> > +    else:
> > +        return next(obj)
> > +
> > +def string(obj):
> > +    if isinstance(obj, bytes):
> > +        return str(obj, encoding='utf-8')
> > +    return obj
> 
> 
> suggests py2+3 in parallel
> 
> I don't mind being py3 only.
> 
Oops, that one is a left over. I'll remove it and drop python2.
And at least the commit message will be in sync with the code

--
Cedric

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux