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

Re: Use Python3 where possible



Probably no surprise, but I agree with everything Matthias said.

On Mar 15, 2016, at 11:20 AM, Matthias Klose wrote:

>I would like to come up with a recommendation that if a python module ships
>scripts, Python3 is used for these scripts, and the Python2 version of these
>scripts should be dropped (and python -m ...) should be used instead.  An
>alternative might be to use separate names for the scripts (e.g. ending with
>2, or like in pillow one set without a suffix (for Python3), and one set with
>a .py suffix (Python2)).  The most conforming name for the scripts should
>always use Python3.

I *really* dislike the -3 suffix on some scripts, e.g. the especially
egregious nosetests2-3.  I wouldn't want to adopt a -2 suffix, so ultimately I
agree that the /usr/bin/foo should be shebanged with python3 and drop back to
`python -m foo` for anyone who needs Python 2.

If there are cases where that won't work, let's try to fix them, or deal with
them on a case-by-case basis.

>Having a lintian warning that a package still uses Python2 instead of Python3
>might help as well, however maybe it should start as an "information" instead
>of a warning.

+1

Cheers,
-Barry


Reply to: