Bug 107014 - Change "python" to "python2" in shebang lines and build scripts
Summary: Change "python" to "python2" in shebang lines and build scripts
Status: RESOLVED MOVED
Alias: None
Product: SyncEvolution
Classification: Unclassified
Component: SyncEvolution (show other bugs)
Version: unspecified
Hardware: All All
: medium minor
Assignee: SyncEvolution Community
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-24 07:03 UTC by justus-dev
Modified: 2018-10-13 12:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch against syncevolution-1.5.3 replacing python by python2 (4.10 KB, patch)
2018-06-24 07:03 UTC, justus-dev
Details | Splinter Review

Description justus-dev 2018-06-24 07:03:31 UTC
Created attachment 140297 [details] [review]
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.
Comment 1 GitLab Migration User 2018-10-13 12:46:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/SyncEvolution/syncevolution/issues/161.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.