[Numpy-discussion] datetime uses API deprecated in python3.1

Charles R Harris charlesr.harris at gmail.com
Tue Feb 23 17:54:46 EST 2010


On Tue, Feb 23, 2010 at 3:40 PM, Travis Oliphant <oliphant at enthought.com>wrote:

>
> On Feb 23, 2010, at 1:03 AM, Charles R Harris wrote:
>
>
>
> On Mon, Feb 22, 2010 at 2:06 PM, Pauli Virtanen <pav at iki.fi> wrote:
>
>> ma, 2010-02-22 kello 14:01 -0700, Charles R Harris kirjoitti:
>> > On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern <robert.kern at gmail.com>
>> > wrote:
>> [clip]
>> >  > Why? PyCObjects don't serialize at all. They would never show up in
>> > > a pickle to begin with.
>> >
>> > So what happens to them? I'm not that familiar with pickles
>>
>> arraydescr_reduce pulls out the datetime info from the metadata dict,
>> and converts it to a tuple containing something pickleable. And
>> everything in reverse in *_setstate
>>
>>
> Everything works except the import of the {ufunc, multiarray} api's from
> the modules. If the api's are stored as PyCObjects then all the tests pass.
> I'll try to get that last bit fixed up tomorrow.
>
>
> Just back from PyCon.   It is useful to know that the Python core team
> feels that NumPy porting to 3k is a *big* deal.
>
> Lots of people would be interested in your experiences with porting NumPy
> to Python 3k.   In particular, the fact that they removed APIs and the extra
> pain that causes is useful information in their decision making.
>
> I'm not sure how big a deal it is that we have to change the API to handle
> PyCapsules instead of PyCObjects, but if you have any feedback to the python
> core dev team, they would be interested in hearing it --- particularly right
> after PyCon.
>
>
The PyCapsule transition is done, but needs some cleanup. I'm thinking about
the best approach to the latter. I put some functions in compat_py3k.h that
are drop in replacements for our needs, but they hide the improved error
handling of PyCapsule. I'm thinking a better approach might be to use the
replacement functions to bring the error support of PyCObject closer to
PyCapsule. Because the current fix is a bunch of #ifdefs in the code the
substitution could be made bit by bit, rewriting the surrounding code to
support the new error handling.

f2py still needs fixing.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20100223/5ea36ab0/attachment.html>


More information about the NumPy-Discussion mailing list