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

Re: [PATCH] tools/misc/xencov_split: Add python 3 compatibility



On Mon, Sep 04, 2023 at 08:51:31AM +0200, Jan Beulich wrote:
> On 02.09.2023 18:21, Javi Merino wrote:
> > Closes #154
> > 
> > Signed-off-by: Javi Merino <javi.merino@xxxxxxxxx>
> 
> The title isn't really in line with ...
> 
> > --- a/tools/misc/xencov_split
> > +++ b/tools/misc/xencov_split
> > @@ -1,5 +1,7 @@
> > -#!/usr/bin/env python
> > +#!/usr/bin/env python3
> 
> ... this part of the change, and making Py3 a requirement here (assuming
> that's indeed necessary) surely wants adding a few words as description.
> Grep-ing the tools/ sub-tree I notice that so far we've avoided explicit
> uses of "python3", and I assume we would better continue doing so as on
> a distro with only Py3 a "python3" alias may legitimately not exist.

A distro with only Python 3 would still have to provide a python3 binary:

  We expect Unix-like software distributions (including systems like
  macOS and Cygwin) to install the python2 command into the default
  path whenever a version of the Python 2 interpreter is installed,
  and the same for python3 and the Python 3 interpreter.

https://peps.python.org/pep-0394/#for-python-runtime-distributors

Having said that, PEP 394 recommends script publishers to leave the
shebang line as "#!/usr/bin/env python" so I will revert this change in
v2.

Cheers,
Javi



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.