[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'
report at bugs.python.org
Fri Aug 19 23:33:30 CEST 2011
Marc-Andre Lemburg <mal at egenix.com> added the comment:
Martin v. Löwis wrote:
> Martin v. Löwis <martin at v.loewis.de> added the comment:
>>> The only way I can read this argument that makes any sense to me is
>>> that you are arguing for a precise build-time OS string. If it is
>>> supposed to be an argument in favor of keeping 'linux3' it makes no
>>> sense, since '2' vs '3' is in no way a useful line of demarcation
>>> when it comes to linux.
> The build time Linux kernel has no effect on Python's build procedure
> whatsoever. Python does not use the kernel at all for building; it
> only uses the C library headers, and the kernel headers that happen
> to be incorporated into the version of the C library installed. That
> affects what features get selected during build time.
That last sentence contradicts the first one. In any case, you're right:
the OS build version does affect the Python build. And not only on
Linux, but on all OSes Python runs on.
That said, the changes on Linux that affect Python are minimal compared
to what other vendors do for even minor OS releases, e.g. Apple with
Mac OS X.
> Notice that the proposed fix to keep os.platform to "linux2" actually
> means that there is *no change*, as os.platform always was "linux2"
> on the system. It is a bug that it reports "linux3" in some cases,
> and that bug is being fixed.
There are Linux 2.x systems out there that report sys.platform ==
'linux3' ? :-)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list