[Ironpython-users] IronPython, Daily Digest 1/2/2012

no_reply at codeplex.com no_reply at codeplex.com
Tue Jan 3 10:41:10 CET 2012


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] Regression:  __reduce_ex__ and __reduce__ fails for None
2. [New issue] Type error from string input to class inheriting int
3. [New issue] Support PyCapsule type module extension
4. [New comment] Support PyCapsule type module extension

----------------------------------------------

ISSUES

1. [New issue] Regression:  __reduce_ex__ and __reduce__ fails for None
http://ironpython.codeplex.com/workitem/32022
User Zartsoft has proposed the issue:

"Works in 2.0.1:
C:\>"c:\Program Files (x86)\IronPython 2.0.1\ipy.exe" -c "print None.__reduce_ex__(2)"
(<built-in function __newobj__>, (<type 'NoneType'>,), None, None, None)

Fails in 2.6 and 2.7:
C:\>"c:\Program Files (x86)\IronPython 2.6\ipy.exe" -c "print None.__reduce_ex__(2)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: __reduce__() takes exactly 1 argument (1 given)
C:\>"c:\Program Files (x86)\IronPython 2.7\ipy.exe" -c "print None.__reduce_ex__(2)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: __reduce__() takes exactly 1 argument (1 given)
C:\>"c:\Program Files (x86)\IronPython 2.7\ipy.exe" -c "print None.__reduce__()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: __reduce__() takes exactly 1 argument (1 given)

CPython 2.7 output for reference:
C:\>"c:\Program Files (x86)\Python27\python.exe" -c "print None.__reduce_ex__(2)"
(<function __newobj__ at 0x01EDB7B0>, (<type 'NoneType'>,), None, None, None)

True, False, Ellipsis are fine, only None has issues."-----------------

2. [New issue] Type error from string input to class inheriting int
http://ironpython.codeplex.com/workitem/32024
User phatfish has proposed the issue:

"Thanks goes to Curt on the IronPython users list for the example code. One notable affected package is PyPDF.

In IronPython 2.7.1,
 
>>> class Integer(int):
...     def __init__(self, value):
...         int.__init__(value)
...
>>> Integer(10)
10
>>> Integer('10')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>

TypeError: expected int, got str
>>> int('10')
10
>>>
 
In Python 2.6,
>>> class Integer(int):
...     def __init__(self, value):
...         int.__init__(value)
...
>>> Integer(10)
10
>>> Integer('10')
10
>>> int('10')
10
>>>"-----------------

3. [New issue] Support PyCapsule type module extension
http://ironpython.codeplex.com/workitem/32026
User slide_o_mix has proposed the issue:

"PyCapsules are basically pointers to C structures that allow overriding or custom implementation of module functionality. Currently IronPython does not support this directly, but it would be nice to put common operations into the runtime."-----------------

4. [New comment] Support PyCapsule type module extension
http://ironpython.codeplex.com/workitem/32026
User slide_o_mix has commented on the issue:

"See http://docs.python.org/extending/extending.html#providing-a-c-api-for-an-extension-module for more information"
----------------------------------------------



----------------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120103/79e0089d/attachment.html>


More information about the Ironpython-users mailing list