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

Use Python3 where possible



The recent update of pep8 to use Python3 by default, and the regressions mentioned in #807409 reminded me, that we probably should address the use of Python3 more pro-actively.

The pep8 binary package included the Python2 modules, plus the scripts, the python3-pep8 package only included the Python3 modules. The recent upload added a python-pep8 package, and let the pep8 package depend on python3-pep8, breaking packages which use the module, but not the binary package. I still think this way forward is the correct way to go (maybe adding some Breaks if these are known in advance).

There are probably more packages like these, which should be converted this way. Maybe a popular candidate is sphinx, where almost always python-sphinx is used as a b-d instead of python3-sphinx.

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.

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.

Matthias


Reply to: