On 7/4/06, Thomas Heller <theller@python.net> wrote:
I would like to ask about the possibility to add some improvements to ctypes in Python 2.5, although the feature freeze is now in effect. Hopefully former third-party libraries can have the freeze relaxed somewhat;-).
Ok, former third-party libraries get a 1e-308 reprieve. :-) I think the general answer is to plan some way that you could make an external release to support the other communities like numpy. I don't know the details, but I believe Barry does this with email. This would allow Python to be more stable, but allow additional features for the communities that are interested in installing an additional ctypes release.
I intend to do these changes, the first is a small and trivial one, but allows a lot of flexibility:
- Remove the restriction that the argtypes attribute of foreign functions must be ctypes types. Instead they are only required to implement a .from_param class method.
This patch is ok. I will add comments to the patch on SF.
The second one is more involved, and not yet complete. I can post the patch or a link to it for review when it is implemented completely:
- Implement the __array_struct__ attribute as describes by the numpy pep at http://numpy.scipy.org/array_interface.html.
This is too much to add to a beta. Perhaps you could work on a branch to add these features and integrate the branch back in after 2.5 has been released. You could make an external release from the branch. n