https://bugs.freedesktop.org/show_bug.cgi?id=107014
Bug ID: 107014
Summary: Change "python" to "python2" in shebang lines and
build scripts
Product: SyncEvolution
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: medium
Component: SyncEvolution
Assignee: syncevolution-issues(a)syncevolution.org
Reporter: justus-dev(a)piater.name
CC: syncevolution-issues(a)syncevolution.org
Created attachment 140297
-->
https://bugs.freedesktop.org/attachment.cgi?id=140297&action=edit
Patch against syncevolution-1.5.3 replacing python by python2
Syncevolution relies on python == python2. This causes problems at least on
Arch Linux. With Python 2 EOL drawing closer, this will become even more of an
issue.
PEP 394 states (
https://www.python.org/dev/peps/pep-0394/):
- In order to tolerate differences across platforms, all new code that needs to
invoke the Python interpreter should not specify python, but rather should
specify either python2 or python3... This distinction should be made in
shebangs...
- One exception to this is scripts that are deliberately written to be source
compatible with both Python 2.x and 3.x. Such scripts may continue to use
python on their shebang line.
SyncEvolution is not "new code", so it does not technically violate this PEP.
Nevertheless, it is clearly best practice to explicitly specify the Python
version and use "python" only for scripts compatible with both python 2 and
python3.
FWIW, I attach the patch I ship with the syncevolution Arch package I maintain.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.