[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 04, 2011, at 01:03 PM, Boštjan Mejak wrote: >I have a better idea... Why don't we change the "linux2" string into just >"linux". That way we will never run into this kind of issue, even in the >future when Linux kernel version 4 is going to exist. Any t

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-10-04 Thread Boštjan Mejak
Boštjan Mejak added the comment: I have a better idea... Why don't we change the "linux2" string into just "linux". That way we will never run into this kind of issue, even in the future when Linux kernel version 4 is going to exist. Any thoughts on this? -- nosy: +Retro

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread STINNER Victor
STINNER Victor added the comment: I removed Lib/plat-linux3 from Python 2.7 and 3.2, and updated doc of Python 2.7. I close this issue (again). -- status: open -> closed ___ Python tracker ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0fe571d43317 by Victor Stinner in branch '2.7': Update sys.platform doc for #12326. http://hg.python.org/cpython/rev/0fe571d43317 -- ___ Python tracker __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset d95c4b030eac by Victor Stinner in branch '2.7': Issue #12326: Remove plat-linux3 directory http://hg.python.org/cpython/rev/d95c4b030eac New changeset cb47cf5138a4 by Victor Stinner in branch '3.2': Issue #12326: Remove plat-linux3 directory http:/

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 265da863d017 by Victor Stinner in branch '3.2': Issue #12326: sys.platform is now always 'linux2' on Linux http://hg.python.org/cpython/rev/265da863d017 New changeset e11b4c945f7e by Georg Brandl in branch '3.2': Update sys.platform doc for #12326.

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-03 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Please delete Lib/plat-linux3 directories on 2.7 and 3.2 branches. -- ___ Python tracker ___ _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-09-03 Thread Georg Brandl
Georg Brandl added the comment: I've updated 3.2 docs in e11b4c945f7e (currently in the release clone, will be merged to upstream after the release of 3.2.2.) Please commit a similar change to the 2.7 branch. -- ___ Python tracker

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Ezio Melotti
Ezio Melotti added the comment: I think the doc patch should mention that: 1) it's 'linux2' also on Linux 3; 2) why it's not 'linux3'; The why can be done in a footnote and explain that Linux 3 doesn't introduce new major features and that changing the string to 'linux3' would have just brok

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: Something like: diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -699,20 +699,21 @@ always available. This string contains a platform identifier that can be used to append platform-specific co

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Georg Brandl
Georg Brandl added the comment: > I don't know how to update this documentation. Can someone update the > doc, or suggest a patch? This is a strange statement. You changed the implementation, so you should be able to change the documentation accordingly. -- _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> I agree that's definitely out of scope of this issue. > > We could change the title of the ticket :-) Please keep the issue closed... The issue at hand was that Linux 3 is released, and broke several applications. This issue has been resolved. For the oth

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> We could change the title of the ticket :-) > > No please, move the discussion to #12795 which has a well defined title. This > issue is closed. (#12795 has also a patch) Well, #12795 is a

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: > We could change the title of the ticket :-) No please, move the discussion to #12795 which has a well defined title. This issue is closed. (#12795 has also a patch) Well, #12795 is also close but you can reopen it if you explain why :-) -- ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> So what about doing the same for FreeBSD, SunOS, and Windows? > > I agree that's definitely out of scope of this issue. We could change the title of the ticket :-) >> If we're changing

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Georg Brandl wrote: > > Also, we might think about removing this version number everywhere. +1 -- ___ Python tracker ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-22 Thread STINNER Victor
STINNER Victor added the comment: > Where's the doc updates for the stable branches? I don't know how to update this documentation. Can someone update the doc, or suggest a patch? > Also, we might think about removing this version number everywhere. Please, see my issue http://bugs.python.or

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Georg Brandl
Georg Brandl added the comment: Where's the doc updates for the stable branches? Also, we might think about removing this version number everywhere. -- ___ Python tracker ___ _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Martin v . Löwis
Martin v. Löwis added the comment: > So what about doing the same for FreeBSD, SunOS, and Windows? I agree that's definitely out of scope of this issue. > 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

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: In case of plat-* directories, please see issue #12619, which proposes some changes. -- ___ Python tracker ___ __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Éric Araujo
Éric Araujo added the comment: Larry: the scope of this bug was narrowed to the linux breakage only; see #12795 for other platforms. -- ___ Python tracker ___ _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Larry Hastings
Larry Hastings added the comment: So what about doing the same for FreeBSD, SunOS, and Windows? The conversation about this point sort of trailed off. But, dammit, a foolish consistency is the hobgoblin of my small mind. If we're changing "linux2" / "linux3" to just "linux", we should be co

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf89ff3d1ec9 by Victor Stinner in branch 'default': Issue #12326: update sys.platform doc for Linux http://hg.python.org/cpython/rev/bf89ff3d1ec9 -- ___ Python tracker

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Georg Brandl
Changes by Georg Brandl : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Georg Brandl
Georg Brandl added the comment: Where's the Doc changes? sys.platform is currently clearly documented as being "linux2" or "linux3". Adding an entry to Misc/NEWS is not enough. -- status: closed -> open ___ Python tracker

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset b5ccdf7c032a by Victor Stinner in branch 'default': Issue #12326: refactor usage of sys.platform http://hg.python.org/cpython/rev/b5ccdf7c032a -- ___ Python tracker _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85e091c83f9a by Victor Stinner in branch 'default': Issue #12326: woops, I really mean 'linux', not 'linux2' http://hg.python.org/cpython/rev/85e091c83f9a -- ___ Python tracker

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: For the sys.build_info, I opened #12794 (platform.major()) but then quickly closed it because it was only useful if the issue #12795 (Remove the major version from sys.platform) was accepted, but I closed it. -- Update votes for "(2) Python 3.3: change sys.p

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset b072e1559d6b by Victor Stinner in branch 'default': Close #12326: sys.platform is now always 'linux' on Linux http://hg.python.org/cpython/rev/b072e1559d6b -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> cl

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: > I'm working on a patch to remove the major version of sys.platform Done. I created the issue #12795: "Remove the major version from sys.platform". -- ___ Python tracker ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: > I'm working on a patch to remove the major version of sys.platform As expected by Marc-Andre: we need this information and so it has to be available somewhere else. I created #12794 to add platform.major(). I prefer to get the major version at runtime, not

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread STINNER Victor
STINNER Victor added the comment: I'm working on a patch to remove the major version of sys.platform. The patch is much bigger than expected. You will see when it will be done :-) -- ___ Python tracker __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 800d45e51dd7 by Victor Stinner in branch '3.2': Issue #12326: sys.platform is now always 'linux2' on Linux http://hg.python.org/cpython/rev/800d45e51dd7 New changeset c816479f6aaf by Victor Stinner in branch '2.7': Issue #12326: sys.platform is now

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin v. Löwis wrote: > > Martin v. Löwis 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 keepi

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Matthias Klose
Matthias Klose added the comment: > 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 libr

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Martin v . Löwis
Martin v. Löwis 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

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > MAL wrote: > >> As already mentioned, the diff between Linux 2.x and 3.x will >> grow over time and while there may not be much to see now, >> things will change in the coming years. > >

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Dave Malcolm
Dave Malcolm added the comment: Note that PyPy is also affected by this issue; see https://bugs.pypy.org/issue832 For CPython, I'm of the opinion that: - the final digit of sys.platform as-is for "linux*" is effectively meaningless - that no code should be relying on the final digit of sy

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > It's really hard to follow this issue. I'm trying to sum up, please comment > my message if I'm wrong. > > -- > > If I understood correctly, this issue has 3 remaining points: > > (1) Pyt

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Éric Araujo
Éric Araujo added the comment: > Python 2.7 and 3.2: force sys.platform to 'linux2'? -0. I dislike this change for stable releases, but it’s a small change that would help a lot of users. I think the release managers would need to approve such a change. > Python 3.3: change sys.platform to

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread James Y Knight
James Y Knight added the comment: > configure_linux2.python3.2.patch It would probably be more future-proof to use "linux*)", not "linux3)" in the case expression. -- ___ Python tracker _

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 19, 2011, at 02:23 PM, STINNER Victor wrote: >(2) Python 3.3: change sys.platform to 'linux'? Votes: > >Martin v. Löwis: +1 >Charles-François Natali: -1 >Amaury Forgeot d'Arc: -1 >Antoine Pitrou: -0 ? >Victor Stinner: +1 > >=> total=0 (5 votes) Please

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread R. David Murray
R. David Murray added the comment: MAL wrote: > As already mentioned, the diff between Linux 2.x and 3.x will > grow over time and while there may not be much to see now, > things will change in the coming years. The only way I can read this argument that makes any sense to me is that you are

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread STINNER Victor
STINNER Victor added the comment: It's really hard to follow this issue. I'm trying to sum up, please comment my message if I'm wrong. -- If I understood correctly, this issue has 3 remaining points: (1) Python 2.7 and 3.2: force sys.platform to 'linux2'? Votes: Antoine Pitrou: -1 Victor St

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: James Y Knight wrote: > > YAGNI. Nobody has needed sys.build_platform yet. (And no, sys.platform isn't > it, since that's been fixed at linux2 approximately forever). Why do you > think people would suddenly start needing to know the build-time kernel >

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread James Y Knight
James Y Knight added the comment: YAGNI. Nobody has needed sys.build_platform yet. (And no, sys.platform isn't it, since that's been fixed at linux2 approximately forever). Why do you think people would suddenly start needing to know the build-time kernel version now? --

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Please reread the quoted sentence: >> >> The *compile time* version information needs to be preserved. > > Then please give it a very explicit name, such as "sys.build_platform" > or "sys.c

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Please reread the quoted sentence: > > The *compile time* version information needs to be preserved. Then please give it a very explicit name, such as "sys.build_platform" or "sys.compile_time_version_info". We don't want people to be misled by yet another p

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Éric Araujo wrote: > > Éric Araujo added the comment: > >> We do have distutils to read the full compile time information > We have sysconfig in the stdlib in 2.7 and 3.2+. Right (it originated in distutils), but it has the same problem: without the Make

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Éric Araujo
Éric Araujo added the comment: > We do have distutils to read the full compile time information We have sysconfig in the stdlib in 2.7 and 3.2+. -- ___ Python tracker ___ __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> The suggested change removes the compile time information from >> the platform string, so that information needs to be preserved >> in a new attribute. > > -1 on any new platform identifica

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The suggested change removes the compile time information from > the platform string, so that information needs to be preserved > in a new attribute. -1 on any new platform identification attribute. We already have too many of them, and there's the platform m

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Martin von Gagern wrote: > > Martin von Gagern added the comment: > > Marc-Andre Lemburg wrote: >> Both Python and the application will make certain assumptions about >> the platform depending on the compile time environment. > > Can you give examples fo

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Martin von Gagern
Martin von Gagern added the comment: Marc-Andre Lemburg wrote: > Both Python and the application will make certain assumptions about > the platform depending on the compile time environment. Can you give examples for this? > So you need both the compile and the runtime version information. I

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Martin von Gagern
Martin von Gagern added the comment: As people keep stating how easy the change from sys.platform == 'linux2' to sys.platform.startswith('linux') is, e.g. msg142385, please also keep in mind cases like someDict.get(sys.platform) where the comparison is implicit and therefore a simple change t

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: James Y Knight wrote: > > James Y Knight added the comment: > >> Sure, you can compile and run Python on both versions of Linux, but >> what if your application uses features that are only present in Linux >> 3.0 and later ? > > This comment is making me

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread James Y Knight
James Y Knight added the comment: > Sure, you can compile and run Python on both versions of Linux, but > what if your application uses features that are only present in Linux > 3.0 and later ? This comment is making me think you've missed just how irrelevant kernel version 3.0 really is. To a

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > On Aug 18, 2011, at 05:54 PM, Martin v. Löwis wrote: > >> As for the cases where "linux3" is reported: I don't care that >> they break. Python 2.6 and Python 2.7.2 is incompatible with >>

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: James Y Knight wrote: > > James Y Knight added the comment: > > M.A., your comments do not make sense in the context of Linux. It does not > actually require porting -- Linux 2.6.39 to Linux 3.0 is no more disruptive > than Linux 2.6.38 to Linux 2.6.39.

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 18, 2011, at 05:54 PM, Martin v. Löwis wrote: >As for the cases where "linux3" is reported: I don't care that >they break. Python 2.6 and Python 2.7.2 is incompatible with >Linux 3. Users should be advised to a) not upgrade to Linux 3, or >b) simultaneo

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread James Y Knight
James Y Knight added the comment: M.A., your comments do not make sense in the context of Linux. It does not actually require porting -- Linux 2.6.39 to Linux 3.0 is no more disruptive than Linux 2.6.38 to Linux 2.6.39. *Except* that python ill-advisedly exported a "platform" string which inc

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Some thoughts: * We can't change the value of a system variable in a patch level release. It's not a bug and the change is not motivated by Python, but by the OS vendor. So changes to released versions are not possible. They are also not necessary

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: >>> Really, it's not difficult to understand that code testing for "linux2" >>> will stop working when "linux3" gets released. >> >> This doesn't matter. People will still complain. And, as there is an >> obvious work-around, why not make people's lives easier?

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > You just said that "we" already had the same problem when Linux 2 was > released. So hopefully "people want better backwards compatibility" > would have learnt from that experience, and stopped hard-coding version > numbers. No, when Linux 2 was released (19

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Really, it's not difficult to understand that code testing for "linux2" > > will stop working when "linux3" gets released. > > This doesn't matter. People will still complain. And, as there is an > obvious work-around, why not make people's lives easier? A

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Then, let's just advise that all code follow the same path and use > > sys.platform.startswith() (which is really not a difficult change to > > make). > > Antoine, please accept that people want better backwards compatibility > than just recommendations how

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Then, let's just advise that all code follow the same path and use > sys.platform.startswith() (which is really not a difficult change to > make). Antoine, please accept that people want better backwards compatibility than just recommendations how to rewrite

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > It means someone upgrading from 2.6 to 2.7 will see sys.platform change > > from "linux3" to "linux2". That breaks compatibility. > > No, it doesn't. Code that works on 2.6 and Linux 3 will likely support > both linux2 and linux3, so it will continue just f

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > - "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 very easy to see. In the long term (ten years)

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread James Y Knight
James Y Knight added the comment: > Well, except maybe if you plan to write applications working only on Python > >= 2.7.3? ... this version is not released yet. No, of course I don't plan on writing new code that checks sys.platform == 'linux2'. That's ridiculous. I plan to use *already wri

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > It means someone upgrading from 2.6 to 2.7 will see sys.platform change > from "linux3" to "linux2". That breaks compatibility. No, it doesn't. Code that works on 2.6 and Linux 3 will likely support both linux2 and linux3, so it will continue just fine on 2.

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I don't understand why do you want to have a special case for Linux. > sys.platform is already different for each major version of: That's because Linux uses major version numbers in an entirely different way than these systems. There is a traditional usage

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The point is precisely that we don't change anything: applications > checking against sys.platform are already broken, there's no reason to > comfort them into using this defective check. You grossly misunderstand the concept of "backwards compatibility". At

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: -neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread STINNER Victor
STINNER Victor 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

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread STINNER Victor
STINNER Victor added the comment: > For Python 3.3, (...) In parallel we can change the stdlib > tests to use .startswith() done, see my changeset 50f1922bc1d5 -- ___ Python tracker __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Correct. We can't touch Python 3.1, 2.6, or earlier because those are all in > security-only mode, and unless a specific security related issue is > identified, the change should not be made there. That's just life (a recent > similar example is support for

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 18, 2011, at 03:58 PM, STINNER Victor wrote: > >STINNER Victor added the comment: > >> I'm just suggesting one more special case for linux* > >You suggest to have a special case in Python 2.7 and 3.2, but not in Python >3.3 (3.1, 2.6, etc.)? Correct.

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread STINNER Victor
STINNER Victor added the comment: > I'm just suggesting one more special case for linux* You suggest to have a special case in Python 2.7 and 3.2, but not in Python 3.3 (3.1, 2.6, etc.)? -- ___ Python tracker __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 18, 2011, at 03:45 PM, STINNER Victor wrote: >I don't understand why do you want to have a special case for >Linux. sys.platform is already different for each major version of: We already have special cases for cygwin, darwin, and irix (okay, the latte

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread STINNER Victor
STINNER Victor added the comment: > I still think that sys.platform for the stable releases should > never report 'linux3' I don't understand why do you want to have a special case for Linux. sys.platform is already different for each major version of: * FreeBSD * OpenBSD * NetBSD * unix

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 18, 2011, at 01:15 PM, Charles-François Natali wrote: >Charles-François Natali added the comment: > >> My question too!  I would say that stable releases should probably not get >> this change, but should force sys.platform to linux2 on 3.x kernels. >

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-18 Thread Charles-François Natali
Charles-François Natali added the comment: > My question too!  I would say that stable releases should probably not get > this change, but should force sys.platform to linux2 on 3.x kernels. > The point is precisely that we don't change anything: applications checking against sys.platform are a

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-17 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 18, 2011, at 01:20 AM, James Y Knight wrote: >James Y Knight added the comment: > >> I will backport the fix to 2.7 and 3.2. > >Uh, wait, so does that mean you're *not* going to do the >compatibility-preserving thing and force sys.platform to stay linu

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-17 Thread James Y Knight
James Y Knight added the comment: > I will backport the fix to 2.7 and 3.2. Uh, wait, so does that mean you're *not* going to do the compatibility-preserving thing and force sys.platform to stay linux2 even when python is built (BUILT! not run!) on a machine where the active kernel is linux

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-17 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 50f1922bc1d5 by Victor Stinner in branch 'default': I will backport the fix to 2.7 and 3.2. -- ___ Python tracker ___

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50f1922bc1d5 by Victor Stinner in branch 'default': Issue #12326: don't test the major version of sys.platform http://hg.python.org/cpython/rev/50f1922bc1d5 -- ___ Python tracker

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-17 Thread Charles-François Natali
Charles-François Natali added the comment: 2011/8/16 Dave Malcolm : > So in this case, "sys.platform"'s final digit is reporting the major release > of the kernel running outside the chroot-ed build environment (ironically > bearing even less relationship to that of the currently-running kerne

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file22613/linux3.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread STINNER Victor
STINNER Victor added the comment: My patch version 2: don't test for a specific major version of an OS, test only its name. My patch now changes also tests for FreeBSD, NetBSD, OpenBSD, (...), and the _expectations list in regrtest.py. -- Added file: http://bugs.python.org/file22917/l

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread Dave Malcolm
Dave Malcolm added the comment: Another datapoint: For Fedora 16, I haven't done any downstream patching (so far), because we hadn't run into any downstream problems. I did some digging into why we're _not_ experiencing issues. Currently for Fedora 16, we're shipping kernel-3.0 with python-

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Aug 16, 2011, at 02:28 PM, Sandro Tosi wrote: >that's because you're on wheezy, that has 2.7.2-3, while the version >which has the change reverted is -4 (still not transition to testing, >since outdated on kbsd-i386) I think it's back in -5 though. $ apt-

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread Sandro Tosi
Sandro Tosi added the comment: On Tue, Aug 16, 2011 at 16:21, Barry A. Warsaw wrote: > > Barry A. Warsaw added the comment: > > @Sandro: > >>> FTR, for Debian and derivatives, doko chose to use 'linux2' when building >>> on linux3. > >>Luckily that has just been reverted. > > No, I don't thin

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @Sandro: >> FTR, for Debian and derivatives, doko chose to use 'linux2' when building on >> linux3. >Luckily that has just been reverted. No, I don't think it has: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633015 On Debian Wheezy and Ubuntu 11.10:

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-16 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-05 Thread James Y Knight
James Y Knight added the comment: Oh wow, so it depends on the *build* time major version? That's really not useful at all for linux 2.x and 3.x; there is nothing useful anyone can possibly do with the distinction between platform == "linux2" and platform == "linux3". All it could possibly do

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-05 Thread Sandro Tosi
Sandro Tosi added the comment: On Mon, Jul 25, 2011 at 13:50, Éric Araujo wrote: > Éric Araujo added the comment: > > FTR, for Debian and derivatives, doko chose to use 'linux2' when building on > linux3. Luckily that has just been reverted. -- nosy: +sandro.tosi __

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-08-05 Thread Martin von Gagern
Changes by Martin von Gagern : -- nosy: +gagern ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue12326] Linux 3: code should avoid using sys.platform == 'linux2'

2011-07-25 Thread Éric Araujo
Éric Araujo added the comment: FTR, for Debian and derivatives, doko chose to use 'linux2' when building on linux3. -- title: Linux 3: tests should avoid using sys.platform == 'linux2' -> Linux 3: code should avoid using sys.platform == 'linux2' versions: -Python 3.4 ___