NAK: LP#1585311 (part 2)

Andy Whitcroft apw at canonical.com
Wed Jun 1 10:36:25 UTC 2016


On Fri, May 27, 2016 at 11:46:19PM +0100, Andy Whitcroft wrote:

> I believe we do not install python2 by default, especially in Yakkety.
> So either we need to convert to python3 or we need to depend on python2
> on the binary package.  The main issue here is that the default python
> version is a distro series related thing, not an upstream related thing.

I have clarified the position on python2/3 use on #ubuntu-devel.  We are
actually activly meant to avoid adding any new python2 dependancies in
both Xenial and Yakkety (Xenial was the first series we attempted to
eradicate python2).

Based on that position we should either convert this script to python3
or reject the whole series exposing it.

> > 3. I think switching from 'print' command python3 print() function
> > should always also use "from __future__ import print_function" --
> > regardless of whether or not the script currently "needs" that --
> > because not doing so introduces a hard-to-debug situation when somebody
> > tries to add e.g.: print(..., end='') to what appears to be a print()
> > function call.

Also in discussions with the people doing the conversion from python2 to 3
it does not seem to add value to include the future statement in a script
only intended for use in python3.  This is of use in libraries which get
imported in either, but this is not such a library.  That said as it is a
noop there I would not object to having it there if that makes you happier.

-apw




More information about the kernel-team mailing list