Michael Felt <aixto...@felt.demon.nl> added the comment:
On 05/06/2019 07:07, Tal Einat wrote: > Tal Einat <talei...@gmail.com> added the comment: > > Michael, your willingness to help, and the work on this issue and PR, are > greatly appreciated! > > Reading through the discussion here again, and the one referenced by Ned, I > tend to agree with the point that having *yet another* spelling for OS > checking is perhaps not a good idea. The point that needing to see exactly > which check is done in certain edge-cases is another good point against > adding such new constants. Moreover, regardless of my opinion, there isn't a > consensus and at this point I don't think there will be. > > Considering the above, perhaps it would be better to use only a single, > "canonical" idiom throughout the tests, or at least from this point forward > (to avoid a codebase-wide change)? Steve Dower said he would "prefer > sys.platform to be canonical". > > I do suffer from having all of os.name, sys.platform and platform.system() > used in various places, and it not being clear when one should be used > instead of another. >From experience, for AIX, and I think also for windows, not sure about darwin, oops - macos (or is that macOS) the confusion I faced was that sys.platform returns the value the system was built on, not what it is running on. If I was an application developer I would be more interested in the platform it is running on. "Lucky me!" - starting with Python3.8 sys.platform will say "aix" rather than aixX. Likely there could have been differences between aix3 and aix4 (e.g., the kernel changed from "static" to "dynamic" driver extensions) that might have influenced Python - but not since AIX5 - and AIX "binary compatibility" assurances when using shared libraries (from IBM, e.g. libc). More to the point - we all suffer - and some kind of direction is needed. Beyond my pay grade - so I'll accept whatever is decided (even if that is indecesion). As I said before - "lucky me", the core is "resolved" for AIX (platform.system() == 'AIX', and sys.platform == 'aix') - just as it is for "linux". This remains 'not resolved' for many other platforms. Further, imho - having it defined as a "constant" is not "yet another spelling". Instead, it moves us towards a "canonical" idiom. I have said before, and I'll say again - I am willing to do the manual backport, learn more about git as I do so (;P) - and I'll even "maintain" this, should this be any additional "help" is working towards a canonical/uniform (or should I say PEP) to establish the RUNNING platform. Regards, Michael > ---------- > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue36624> > _______________________________________ > ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36624> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com