classification
Title: platform._sys_version does not parse correctly IronPython 2.x version
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.2, Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, fredericaltorres, lemburg
Priority: normal Keywords:

Created on 2010-06-10 21:11 by fredericaltorres, last changed 2010-12-22 21:17 by eric.araujo.

Messages (6)
msg107487 - (view) Author: Frederic Torres (fredericaltorres) Date: 2010-06-10 21:11
Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version

The format of sys.version now start with a version number and (
2.6.1 (IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30319.1)

File:     Lib\platform.py
Function: def _sys_version(sys_version=None):
Line:     1326
msg107489 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2010-06-10 21:15
Frederic Torres wrote:
> 
> New submission from Frederic Torres <fredericaltorres@gmail.com>:
> 
> Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version
> 
> The format of sys.version now start with a version number and (
> 2.6.1 (IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30319.1)
> 
> File:     Lib\platform.py
> Function: def _sys_version(sys_version=None):
> Line:     1326

I assume you meant: doesn't correctly parse the version number.

Could you provide a complete example formatted as Python string,
e.g. print repr(sys.version) ?!

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

________________________________________________________________________
2010-07-19: EuroPython 2010, Birmingham, UK                38 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
msg108240 - (view) Author: Frederic Torres (fredericaltorres) Date: 2010-06-20 17:29
print repr(sys_version)
returns
'2.6.1 (IronPython 2.6.1 (2.6.10920.0) on .NET 2.0.50727.3603)'

The format of sys.version now start with a version number
2.6.1 (IronPythons  2.6.1 (2.6.10920.0) on .NET 4.0.30319.1)
My guess is that with previous version of IronPython this was not the case
msg124494 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-22 09:02
Do you want to work on a patch?
msg124511 - (view) Author: Frederic Torres (fredericaltorres) Date: 2010-12-22 16:28
Eric,

Yes I like to.
But I am not familiar how to submit a patch.
The file that need to be patched is "C:\Program Files (x86)\IronPython
2.6\Lib\platform.py"  for IronPython 2.6.
I thought this file was maintained by Marc-Andre Lemburg
<mal@egenix.com based on the comment in the file platform.py.

It will affect IronPython 2.6 and  IronPython 2.6 For .Net 4.0 and
probably IronPython 2.7.

If you give me linsk to read about how to make a patch I would really
like to contribute to IronPython.

Thanks.
Fred.

On Wed, Dec 22, 2010 at 4:02 AM, Éric Araujo <report@bugs.python.org> wrote:
>
> Éric Araujo <merwok@netwok.org> added the comment:
>
> Do you want to work on a patch?
>
> ----------
> nosy: +eric.araujo
> stage:  -> needs patch
> title: Method _sys_version() module Lib\platform.py does not parse      correctly IronPython 2.x version -> platform._sys_version does not parse correctly IronPython 2.x version
> versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue8964>
> _______________________________________
>
msg124521 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-12-22 21:17
This is the tracker for CPython, not IronPython, but I assume they synchronize their standard modules with ours, so I think this bug should be fixed here (not in 2.6 though, this old version only gets security fixes).

Guidelines for patches: http://www.python.org/dev/patches/

In short: check out the py3k branch, add a test that fails in Lib/test/test_platform.py (in the test_sys_version method), then patch the code to make the test pass.
History
Date User Action Args
2010-12-22 21:17:42eric.araujosetnosy: lemburg, eric.araujo, fredericaltorres
messages: + msg124521
2010-12-22 16:28:23fredericaltorressetnosy: lemburg, eric.araujo, fredericaltorres
messages: + msg124511
2010-12-22 09:02:19eric.araujosetnosy: + eric.araujo
title: Method _sys_version() module Lib\platform.py does not parse correctly IronPython 2.x version -> platform._sys_version does not parse correctly IronPython 2.x version
messages: + msg124494

versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6
stage: needs patch
2010-06-20 17:29:53fredericaltorressetmessages: + msg108240
title: Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version -> Method _sys_version() module Lib\platform.py does not parse correctly IronPython 2.x version
2010-06-10 21:15:24lemburgsetmessages: + msg107489
title: Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version -> Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version
2010-06-10 21:11:33fredericaltorrescreate