This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: platform.py support for IronPython
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: lemburg Nosy List: anthonybaxter, arigo, lemburg, sanxiyn
Priority: normal Keywords: patch

Created on 2006-09-23 01:59 by anthonybaxter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
platform.py.diff anthonybaxter, 2006-09-23 01:59 patch for platform.py
Messages (6)
msg51138 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2006-09-23 01:59
The following patch supplies minimal support for
IronPython in platform.py - it makes the sys.version
parsing not choke and die. There's a bunch of missing
information from IronPython's sys.version string, not
much that can be done there. 

Should platform.py grow an 'implementation' option, so
it can detect whether it's IronPython, CPython, Jython,
or something else?


Patch is against svn trunk.
msg51139 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-09-25 10:30
Logged In: YES 
user_id=38388

Thanks.

I'll install IronPython and see what else needs to be done.

I've already added a few fixes to make Jython play nice with
platform.py that I'll check in as well.

And yes: I'll add a python_implementation() function that
returns 'CPython', 'Jython' and 'IronPython' as appropriate.
msg51140 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2006-10-09 22:48
Logged In: YES 
user_id=4771

Python2.5 has grown a sys.subversion attribute:

   ('CPython', 'trunk', '51999')

The first field is intended to describe the exact
implementation of Python.  platform.py could
return this if it is available.  It should also
probably try to use sys.version_info instead of,
or in addition to, using a regexp on sys.version.
One can hope that in the long term the
version_info and the subversion attributes
should eventually be supported by all Python
implementation (PyPy...).
msg51141 - (view) Author: Seo Sanghyeon (sanxiyn) Date: 2006-10-10 02:35
Logged In: YES 
user_id=837148

The current patch doesn't parse sys.version from IronPython
1.0.1.

IronPython 1.0 gives: IronPython 1.0.60816 on .NET 2.0.50727.42

IronPython 1.0.1 gives: IronPython 1.0 (1.0.61005.1977) on
.NET 2.0.50727.42
msg51142 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2007-01-13 14:39
sanxiyn: What do the extra numbers after the 1.0 stand for ? Do those correspond to branch and revision ?

Armin: I'll add support for sys.version_info and sys.subversion as well.
msg51143 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2007-01-13 22:33
Checked in a version that also supports IronPython, including the 1.0.1 version.
History
Date User Action Args
2022-04-11 14:56:20adminsetgithub: 44014
2006-09-23 01:59:35anthonybaxtercreate