[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'
STINNER Victor
report at bugs.python.org
Thu Aug 18 18:26:51 CEST 2011
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
If we change Python 2.7.3 and 3.2.2 to force sys.platform to linux2 (instead of linux3) and use "linux" in Python 3.3, we will have 3 differents values of sys.platform if Python is built on Linux 3:
- "linux3" on Python <= 2.7.2 or Python <= 3.2.1
- "linux2" on 2.7.3 <= Python or 3.2.2 <= Python < 3.3
- "linux" on Python >= 3.3
I don't see how it will help backward or forward compatibility... It's exactly as the current state (sys.platform == 'linux3' on all Python versions): applications have to use sys.platform.startswith() to work correctly on any Linux version.
Well, except maybe if you plan to write applications working only on Python >= 2.7.3? ... this version is not released yet.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12326>
_______________________________________
More information about the Python-bugs-list
mailing list