[issue12795] Remove the major version from sys.platform

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: While working on #12326, it's realized that many modules and applications rely on sys.platform. Change this value should be decided for each platform because it breaks backward compatibility. Linux was a special case and now I don't think that we should drop

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: > But in general you are right: if you use system provided Python > packages, chances are that your runtime OS version will be > identical or very close to the build time OS version. I asked on #freebsd-fr: even with pkg_add, the installed Python is compiled on

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >>> It is mostly to test FreeBSD major version, and it looks like Python is >>> build on the same FreeBSD major version that it is running on. Maybe >>> because on FreeBSD, most programs are

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: >> It is mostly to test FreeBSD major version, and it looks like Python is >> build on the same FreeBSD major version that it is running on. Maybe because >> on FreeBSD, most programs are compiled instead of using prebuild packages >> (pkgadd). > > Right. Fre

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> sys.platform refers to build time information, >> so the platform module won't help. > > When I wrote my patch, I realized that sys.platform is used to get the > runtime information, which

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: > sys.platform refers to build time information, > so the platform module won't help. When I wrote my patch, I realized that sys.platform is used to get the runtime information, which is wrong. See the tests in Lib/test/test_*.py: they use sys.platform to che

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > FreeBSD or OpenBSD release major version frequently, something like one > per year, or one per two years. FreeBSD and OpenBSD developers knows > that for years, and Python programs use sys.

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: FreeBSD or OpenBSD release major version frequently, something like one per year, or one per two years. FreeBSD and OpenBSD developers knows that for years, and Python programs use sys.platform.startswith() for these OSes. For Linux, it's different. Linux 2.

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Moved the discussion here from issue12326: >> [Larry Hastings] >> >> If we're changing "linux2" / "linux3" to just "linux", we should be >> >> consistent and do it for everybody. I propose sys.platform under 3.3 >> >> should contain things like "linux", "f

[issue12795] Remove the major version from sys.platform

2011-08-22 Thread Ezio Melotti
Ezio Melotti added the comment: Having the major version in sys.platform only for a few selected platforms doesn't seem too consistent for me. If linux 4 will introduce major changes, will we have to look for the major version of freebsd in sys.platform and for the linux major version elsewhe

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: At the beginning, I thaught that it would be better to remove the major version from sys.platform on all platforms. When I started to write the patch, I expected to change only 2 or 3 files. But the patch is now huge ("26 files changed, 105 insertions(+), 121

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think this change should be much much smaller in scope. It was (nearly) agreed to drop the major version if the system is Linux. There is no consensus (that I'm aware of) to drop the major OS version for all systems. So I would propose to do this *only* se

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: To have an idea of how much code has to be changed for the sys.platform change, there is the diffstat : $ diffstat sys_platform_without_major.patch Lib/ctypes/util.py |6 -- Lib/distutils/command/build_ext.py |3 - Lib/distu

[issue12795] Remove the major version from sys.platform

2011-08-20 Thread STINNER Victor
New submission from STINNER Victor : sys.platform contains the major system version. If you test the sys.platform value (e.g. sys.platform == 'linux2'), your program doesn't work anymore with the new system major version (e.g. Linux 3). This problem is common with NetBSD, OpenBSD and FreeBSD.