[New-bugs-announce] [issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

Charles-François Natali report at bugs.python.org
Mon Jun 13 16:34:42 CEST 2011


New submission from Charles-François Natali <neologix at free.fr>:

Linus recently decided that the next Linux kernel version would 3.0 [1].
As a consequence, sys.platform (which is actually MACHDEP) will be 'linux3' on machines running Linux 3 kernels, and tests checking explicitely against 'linux2' will either break and won't run.
A quick grep through the code base returns only a couple problematic places, but this should definitely be fixed.
For information, here's a - probably incomplete - list of such occurrences:

"""
./Lib/test/test_logging.py:        if sys.platform in ('linux2', 'darwin'):
./Lib/test/test_sysconfig.py:        sys.platform = 'linux2'
./Lib/test/regrtest.py:    'linux2':
./Lib/test/test_socket.py:    if sys.platform == 'linux2':
./Lib/test/test_tarfile.py:        if sys.platform == "linux2":
./Lib/distutils/tests/test_bdist_rpm.py:        if sys.platform != 'linux2':
./Lib/distutils/tests/test_bdist_rpm.py:        if sys.platform != 'linux2':
./Lib/distutils/tests/test_util.py:        sys.platform = 'linux2'
./Lib/packaging/tests/test_config.py:  inotify (0.0.1); sys.platform == 'linux2'
./Lib/packaging/tests/test_config.py:                  "inotify (0.0.1); sys.platform == 'linux2'"]
./setup.py:        if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
"""

[1] http://thread.gmane.org/gmane.linux.kernel/1147415

----------
messages: 138251
nosy: neologix
priority: normal
severity: normal
stage: needs patch
status: open
title: Linux 3: tests should avoid using sys.platform == 'linux2'
type: behavior
versions: Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12326>
_______________________________________


More information about the New-bugs-announce mailing list