[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'
report at bugs.python.org
Mon Jun 27 10:39:52 CEST 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
Le Mon, 27 Jun 2011 08:05:05 +0000,
Martin v. Löwis <report at bugs.python.org> a écrit :
> What I'm advocating is to special-case Linux (and any other system
> where major version numbers don't mean much).
Actually, it would itself break compatibility, because sys.platform would
jump from "linux2" to "linux" from one Python release to another. It would
therefore only be applicable, at best, to 3.3.
I think we should at least document the idiom of using
"sys.platform.startswith(...)", and mention the platform module as an
alternative. This can be done in all doc versions without breaking
anything, and in time for Linux 3 :)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list