Opened 10 months ago

Closed 10 months ago

Last modified 9 months ago

#27878 closed Bug (invalid)

Move to Python 3 shebangs

Reported by: Chris Lamb Owned by: nobody
Component: Core (Other) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Now that master branch is Python 3 only, we should use Python 3 shebangs. I just ran runtests.py and it used Python 2.. :)

Change History (8)

comment:1 Changed 10 months ago by Chris Lamb

comment:2 Changed 10 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 4cffa9a1:

Fixed #27878, refs #23919 -- Used python3 shebangs.

comment:3 Changed 9 months ago by Tim Graham

Component: UncategorizedCore (Other)

I found that the Windows installation of Python 3.x does not have an executable called python3, so I'm not sure if we should keep this change.

$ ./tests/runtests.py settings_tests
/usr/bin/env: ‘python3’: No such file or directory

comment:4 Changed 9 months ago by Claude Paroz

I remember about discussions on this issue. Different systems/distributions have different strategies around using python, python2 or python3.
I would tend to think that the environment in which you are running your Python scripts should point python to the right version. So +1 for reverting.

comment:5 Changed 9 months ago by Tim Graham <timograham@…>

In 784a53b:

Reverted "Fixed #27878, refs #23919 -- Used python3 shebangs."

This reverts commit 4cffa9a1ffb37d4de7e99a851a9ed87b3c02d229.

comment:6 Changed 9 months ago by Tim Graham

Resolution: fixedinvalid

comment:7 Changed 9 months ago by Chris Lamb

the environment in which you are running your Python scripts should point python to the right version

Hm, except for legacy reasons it is not really possible to change (eg. all Debian-derived distributions).

comment:8 Changed 9 months ago by Aymeric Augustin

pyenv helps -- it's the most convenient solution I know for running a modern Python on Debian.

Note: See TracTickets for help on using tickets.
Back to Top