[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 21.10.2013 02:07, Ezio Melotti wrote:
> 
> Ezio Melotti added the comment:
> 
> Fixed, thanks for the patch!

Thanks, Ezio, for the check-in.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-20 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee:  -> ezio.melotti
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 04a163f93ad4 by Ezio Melotti in branch '2.7':
#8964: fix platform._sys_version to handle IronPython 2.6+.
http://hg.python.org/cpython/rev/04a163f93ad4

New changeset 10a261824b62 by Ezio Melotti in branch '3.3':
#8964: fix platform._sys_version to handle IronPython 2.6+.
http://hg.python.org/cpython/rev/10a261824b62

New changeset 1f7d8a42904c by Ezio Melotti in branch 'default':
#8964: merge with 3.3.
http://hg.python.org/cpython/rev/1f7d8a42904c

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 19.10.2013 13:37, Martin Matusiak wrote:
> 
> Martin Matusiak added the comment:
> 
> Double checked that the test passes against both default and 2.7 branches.
> 
> Is there anything else that needs to happen here or are you satisfied, 
> Marc-Andre?

No, that's all :-)

Thanks, Martin.

Unfortunately, I don't have time in the next few days to check this
in. Could one of the other core devs please do ? Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-19 Thread Martin Matusiak

Martin Matusiak added the comment:

Double checked that the test passes against both default and 2.7 branches.

Is there anything else that needs to happen here or are you satisfied, 
Marc-Andre?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 19.10.2013 12:11, Martin Matusiak wrote:
> 
> Attaching a v3 which uses "in" and "startswith".
> 
> 
> Just for good measure I ran this module on IronPython 1.0 and it fails on 
> import:
> 
> - bytes literal: b'(__libc_init)'
> - "if" as infix operator: line 177
> - "unexpected token open": use of "with" context manager on line 334
> - "as" keyword: except OSError as why: line 430
> - ImportError: No module named os. os and subprocess are missing altogether 
> in IronPython 1.0.
> 
> That's as far as I looked - there may be other issues still. 
> 
> So I decided to isolate this one function and see if it works. It fails 
> because re.ASCII does not exist. If I remove that then the function runs and 
> parses its own sys.version correctly.
> 
> But it may be a bit of a stretch at this point to stay compatible that far 
> back.

Well, there's a catch here: the trunk version of platform.py is for
Python 3. This does not need to stay backwards compatible to Python 2
(but keeping it close to the Python 2 version helps make merges easier).

Then there's the Python 2.7 version, which receives patches like yours.
This has to stay compatible for Python versions relying on it, which
are in particular older IronPython and Jython versions that don't
ship with their own stdlib.

I think it's ok to use Python 2.4 as the latest version supported
by the Python 2.7 platform.py. The module is used for creating
Python packages and 2.4 is still used by some Zope/Plone installations.

If IronPython 1.0 does not support Python 2.4, we don't need to
support it in the 2.7 version of platform.py.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-19 Thread Martin Matusiak

Martin Matusiak added the comment:

Attaching a v3 which uses "in" and "startswith".


Just for good measure I ran this module on IronPython 1.0 and it fails on 
import:

- bytes literal: b'(__libc_init)'
- "if" as infix operator: line 177
- "unexpected token open": use of "with" context manager on line 334
- "as" keyword: except OSError as why: line 430
- ImportError: No module named os. os and subprocess are missing altogether in 
IronPython 1.0.

That's as far as I looked - there may be other issues still. 

So I decided to isolate this one function and see if it works. It fails because 
re.ASCII does not exist. If I remove that then the function runs and parses its 
own sys.version correctly.

But it may be a bit of a stretch at this point to stay compatible that far back.

--
Added file: http://bugs.python.org/file32221/issue8964_v3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-19 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 19.10.2013 07:06, Martin Matusiak wrote:
> 
> Martin Matusiak added the comment:
> 
> It seems the versions of IronPython 1.0 mentioned in test cases do actually 
> support the "in" keyword, so the first version of the patch is probably 
> sufficient.
> 
> Example session:
> 
 sys.version
> IronPython 1.0.60816 on .NET 2.0.50727.3643
 "IronPython" in sys.version
> True
 sys.version.startswith("IronPython")
> True

In that case, I'm +1 on using both to clean up the code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-18 Thread Martin Matusiak

Martin Matusiak added the comment:

It seems the versions of IronPython 1.0 mentioned in test cases do actually 
support the "in" keyword, so the first version of the patch is probably 
sufficient.

Example session:

>>> sys.version
IronPython 1.0.60816 on .NET 2.0.50727.3643
>>> "IronPython" in sys.version
True
>>> sys.version.startswith("IronPython")
True

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-18 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-16 Thread Martin Matusiak

Martin Matusiak added the comment:

Hm, I see. Actually, "in" is already used in this function a little further 
down:

elif "PyPy" in sys_version:

So we should change both occurrences then. I'm attaching a v2 with these 
changes.

--
Added file: http://bugs.python.org/file32154/issue8964_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The patch looks good, except one nit:

if 'IronPython' in sys_version

is probably not supported in IronPython 2.0, since support for "n-char in 
m-char" tests were added after Python 2.1.

Now, you can either leave this in and remove the IronPython 2.0 support from 
platform.py (which is fine, IMO), or change the test to use the .find() method.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-16 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> patch review
versions: +Python 3.4 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2013-10-16 Thread Martin Matusiak

Martin Matusiak added the comment:

I've checked sys.version on IronPython 2.6.1, 2.6.2 (same format) and 2.7.4 
(slightly different).

The patch includes two new test cases. I've also taken the liberty of adding 
some newlines in between the items in the dict as I found this code very hard 
to read otherwise.

--
keywords: +patch
nosy: +numerodix
Added file: http://bugs.python.org/file32146/issue8964.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2012-09-11 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
versions: +Python 3.3 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Éric Araujo

Éric Araujo  added the comment:

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Frederic Torres

Frederic Torres  added the comment:

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
 wrote:
>
> Éric Araujo  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 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8964] platform._sys_version does not parse correctly IronPython 2.x version

2010-12-22 Thread Éric Araujo

Éric Araujo  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com