[Numpy-discussion] __array__struct__: about using PyCapsule instead of PyCObject for Python 2.7

Charles R Harris charlesr.harris@gmail....
Sat Jul 17 10:33:22 CDT 2010


On Sat, Jul 17, 2010 at 8:51 AM, Pauli Virtanen <pav@iki.fi> wrote:

> Wed, 30 Jun 2010 12:13:38 -0600, Charles R Harris wrote:
> [clip]
> >> > Grrr... I didn't see the point, myself, I'm tempted to deprecate 2.7
> >> > just
> >> to
> >> > get even. There are some routines in the numpy/core/src includes that
> >> > you might want to copy, they will allow you to use a common interface
> >> > for PyCObject and PyCapsule if you need to do that.
> >> >
> >> >
> >> I've already fixed my code for PyCapsule. What's not clear to me is how
> >> to build (i.e, use the old cobject or the new capsules)
> >> __array_struct__ across NumPy and Python versions combinations. Will
> >> NumPy 1.x series ever support Python 2.7? In such case, should I use
> >> cobjects or capsules?
> >
> > We do support 2.7, but with PyCapsule. You might want to take a look at
> > f2py also, as it also uses PyCapsule for Python >= 2.7.
>
> I think we need to change this decision. PyCObject is still available on
> Python 2.7, and will only raise a PendingDeprecationWarning, which does
> not show up by default. I believe the Python devs reversed the full
> deprecation before the final 2.7 release.
>
> So I think we should just stick with PyCObject on 2.x, as we have done so
> far. I'll just bump the version checks so that PyCapsule is used only on
> 3.x.
>
> I'll commit this to Numpy SVN soon.
>
>
Now that npy_3kcompat.h is public we can probably remove some of the version
checks.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100717/2b25c247/attachment-0001.html 


More information about the NumPy-Discussion mailing list