Issue 1352731: Small upgrades to platform.platform() (original) (raw)

Created on 2005-11-10 01:19 by daishiharada, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
platform.py.diff daishiharada,2005-11-10 01:22
Messages (7)
msg49001 - (view) Author: daishi (daishiharada) Date: 2005-11-10 01:19
This patch updates platform.platform() to recognize some more Linux distributions. In addition, for RedHat-like distributions, will use the contents of the /etc/ to determine distname.
msg49002 - (view) Author: daishi (daishiharada) Date: 2005-11-10 01:23
Logged In: YES user_id=493197 assigning to lemberg as suggested in the file.
msg49003 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-10-09 18:31
Logged In: YES user_id=38388 Sorry for the late reply. I must have missed the initial SF mail. I've had a look at the patch, but I'm not sure whether it can be accepted: wouldn't it break already recognized RedHat-like platforms ?
msg49004 - (view) Author: daishi (daishiharada) Date: 2006-10-09 23:22
Logged In: YES user_id=493197 Thanks for the response. If by "break" you mean that for redhat-like distros the output of `python platform.py` would no longer necessarily be the same after the patch is applied, yes, that's true. However, that was the primary motivation for the patch - the current platform.py wasn't sufficiently discriminating for my purposes. In particular, the current platform.py ignores the first "field" of the contents of /etc/redhat-release, which I believe for ROCKS was the only portion which was changed from the redhat version on which it was based.
msg49005 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-11-09 05:21
Logged In: YES user_id=21627 Marc-Andre, would you rather accept or reject this patch, because of the incompatibility?
msg49006 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-11-09 07:49
Logged In: YES user_id=38388 I'm currently working on an updated version of platform.py that will include part of this patch, patch #1563842 for IronPython and better support for Jython.
msg49007 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2007-01-13 20:50
I'll add a new API linux_distribution() which will provide the more detailed information and also add support for Rocks (as well as a few others).
History
Date User Action Args
2022-04-11 14:56:14 admin set github: 42576
2005-11-10 01:19:42 daishiharada create