Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] json.dump fails to dump Unicode strings
2. [New issue] Traceback is lost when ImportError is re-raised
3. [New comment] Traceback is lost when ImportError is re-raised
4. [New issue] zipimport adding an extra newline to the end of every line of
imported source on windows
5. [New comment] zipimport adding an extra newline to the end of every line of
imported source on windows
----------------------------------------------
ISSUES
1. [New issue] json.dump fails to dump Unicode strings
http://ironpython.codeplex.com/workitem/32331
User pekkaklarck has proposed the issue:
"Demonstration of the problem is below. With CPython this works fine and the
result is, as expected "\u00e4".
IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.261
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> from StringIO import StringIO
>>> s = StringIO()
>>> json.dump(u'\xe4', s)
Traceback (most recent call last):
File "C:\Program Files\IronPython 2.7\Lib\json\encoder.py", line 413, in
_iterencode
File "<stdin>", line 1, in <module>
File "C:\Program Files\IronPython 2.7\Lib\json\__init__.py", line 181, in dump
File "C:\Program Files\IronPython 2.7\Lib\json\encoder.py", line 48, in
py_encode_basestring_ascii
UnicodeDecodeError: ('unknown', u'\xe4', -1, 0, '')"-----------------
2. [New issue] Traceback is lost when ImportError is re-raised
http://ironpython.codeplex.com/workitem/32332
User pekkaklarck has proposed the issue:
"It seems that if ImportError is caught and then re-raised, the traceback
object associated with the exception is lost and we get None instead. This
doesn't occur with all exceptions and, for example, NameError, is not affected.
This problem can be reproduced using the attached ipy_tb_bug.py script. When I
run it with CPython I get this output:
NameError:
<traceback object at 0x00BB5558>
<traceback object at 0x00BB5558>
ImportError:
<traceback object at 0x00BB55D0>
<traceback object at 0x00BB55D0>
With IronPython 2.7 I get this instead:
NameError:
<traceback object at 0x000000000000002B>
<traceback object at 0x000000000000002C>
ImportError:
<traceback object at 0x000000000000002D>
None
Notice also that even with NameError the traceback object is different with
IronPython but CPython re-uses the same object. Not sure does that really
matter but it might have something to do with the problem with ImportError.
A workaround for this bug is re-raising the exception using `raise
sys.exc_value, sys.exc_type, sys.exc_traceback` instead of plain
`raise`."-----------------
3. [New comment] Traceback is lost when ImportError is re-raised
http://ironpython.codeplex.com/workitem/32332
User pekkaklarck has commented on the issue:
"Ooops, values given to raise statement in the above workaround were wrong. The
correct order is:
raise sys.exc_type, sys.exc_value, sys.exc_traceback"-----------------
4. [New issue] zipimport adding an extra newline to the end of every line of
imported source on windows
http://ironpython.codeplex.com/workitem/32335
User bmvetter has proposed the issue:
"On Windows, zipimport is adding an extra newline to the end of every line of
imported source.
I found this because the extra blank lines cause many of the standard library
modules to fail when trying to import them from a zip file. This is
reproducible by trying to import warnings.py from a .zip file.
I think the problem is in NormalizeLineEndings in ZipImport.cs where it
replaces \r\n with \n\n instead of just \n."-----------------
5. [New comment] zipimport adding an extra newline to the end of every line of
imported source on windows
http://ironpython.codeplex.com/workitem/32335
User slide_o_mix has commented on the issue:
"Can you upload a test case? I have a fix but would like to test it first."
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users