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

2010-02-23 Thread Charles R Harris
On Tue, Feb 23, 2010 at 3:40 PM, Travis Oliphant wrote: > > On Feb 23, 2010, at 1:03 AM, Charles R Harris wrote: > > > > On Mon, Feb 22, 2010 at 2:06 PM, Pauli Virtanen wrote: > >> ma, 2010-02-22 kello 14:01 -0700, Charles R Harris kirjoitti: >> > On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern >>

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

2010-02-23 Thread Travis Oliphant
On Feb 23, 2010, at 1:03 AM, Charles R Harris wrote: On Mon, Feb 22, 2010 at 2:06 PM, Pauli Virtanen wrote: ma, 2010-02-22 kello 14:01 -0700, Charles R Harris kirjoitti: > On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern > wrote: [clip] > > Why? PyCObjects don't serialize at all. They would ne

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 2:06 PM, Pauli Virtanen wrote: > ma, 2010-02-22 kello 14:01 -0700, Charles R Harris kirjoitti: > > On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern > > wrote: > [clip] > > > Why? PyCObjects don't serialize at all. They would never show up in > > > a pickle to begin with. > >

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

2010-02-22 Thread Pauli Virtanen
ma, 2010-02-22 kello 14:01 -0700, Charles R Harris kirjoitti: > On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern > 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 arrayde

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 1:57 PM, Pauli Virtanen wrote: > ma, 2010-02-22 kello 13:53 -0700, Charles R Harris kirjoitti: > [clip] > > I'm actually using #ifdefs for the whole change, no macros in the > > include files. It hasn't been a lot of work so far. The c_api is > > currently exported as a Py

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 1:58 PM, Robert Kern wrote: > On Mon, Feb 22, 2010 at 14:53, Charles R Harris > wrote: > > > > > > On Mon, Feb 22, 2010 at 1:45 PM, Pauli Virtanen wrote: > >> > >> ma, 2010-02-22 kello 13:25 -0700, Charles R Harris kirjoitti: > > >> > I'm not sure if using PyCapsule obje

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

2010-02-22 Thread Robert Kern
On Mon, Feb 22, 2010 at 14:53, Charles R Harris wrote: > > > On Mon, Feb 22, 2010 at 1:45 PM, Pauli Virtanen wrote: >> >> ma, 2010-02-22 kello 13:25 -0700, Charles R Harris kirjoitti: >> > I'm not sure if using PyCapsule objects will make pickled arrays >> > incompatible between py2k and py3k, b

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

2010-02-22 Thread Pauli Virtanen
ma, 2010-02-22 kello 13:53 -0700, Charles R Harris kirjoitti: [clip] > I'm actually using #ifdefs for the whole change, no macros in the > include files. It hasn't been a lot of work so far. The c_api is > currently exported as a PyCObject, we might want to give it a name > when it is a PyCapsule.

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 1:45 PM, Pauli Virtanen wrote: > ma, 2010-02-22 kello 13:25 -0700, Charles R Harris kirjoitti: > [clip] > > It looks like context is the new name for desc, so > > that PyCObject_FromVoidPtrAndDesc can be implemented > > as tw

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

2010-02-22 Thread Pauli Virtanen
ma, 2010-02-22 kello 13:25 -0700, Charles R Harris kirjoitti: [clip] > It looks like context is the new name for desc, so > that PyCObject_FromVoidPtrAndDesc can be implemented > as two calls. > > I think it is a bit tricky to implemen

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 1:03 PM, Charles R Harris wrote: > > > On Mon, Feb 22, 2010 at 12:26 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sun, Feb 21, 2010 at 6:48 PM, Charles R Harris < >> charlesr.har...@gmail.com> wrote: >> >>> >>> >>> On Sun, Feb 21, 2010 at 11:34

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

2010-02-22 Thread Charles R Harris
On Mon, Feb 22, 2010 at 12:26 PM, Charles R Harris < charlesr.har...@gmail.com> wrote: > > > On Sun, Feb 21, 2010 at 6:48 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Sun, Feb 21, 2010 at 11:34 AM, Pauli Virtanen wrote: >> >>> su, 2010-02-21 kello 20:17 +0200, Pauli Vi

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

2010-02-22 Thread Charles R Harris
On Sun, Feb 21, 2010 at 6:48 PM, Charles R Harris wrote: > > > On Sun, Feb 21, 2010 at 11:34 AM, Pauli Virtanen wrote: > >> su, 2010-02-21 kello 20:17 +0200, Pauli Virtanen kirjoitti: >> [clip] >> > The Capsule API seems pretty much the same as the CObject API. (Why the >> > name change?) We can

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

2010-02-21 Thread Charles R Harris
On Sun, Feb 21, 2010 at 11:34 AM, Pauli Virtanen wrote: > su, 2010-02-21 kello 20:17 +0200, Pauli Virtanen kirjoitti: > [clip] > > The Capsule API seems pretty much the same as the CObject API. (Why the > > name change?) We can probably #define PyCapsule_* compatibility defines > > in npy_3kcompa

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

2010-02-21 Thread Charles R Harris
On Sun, Feb 21, 2010 at 11:34 AM, Pauli Virtanen wrote: > su, 2010-02-21 kello 20:17 +0200, Pauli Virtanen kirjoitti: > [clip] > > The Capsule API seems pretty much the same as the CObject API. (Why the > > name change?) We can probably #define PyCapsule_* compatibility defines > > in npy_3kcompa

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

2010-02-21 Thread Pauli Virtanen
su, 2010-02-21 kello 20:17 +0200, Pauli Virtanen kirjoitti: [clip] > The Capsule API seems pretty much the same as the CObject API. (Why the > name change?) We can probably #define PyCapsule_* compatibility defines > in npy_3kcompat.h that use PyCObject on 2.x, and use the real thing on > 3.x. Btw

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

2010-02-21 Thread Pauli Virtanen
su, 2010-02-21 kello 02:13 -0700, Charles R Harris kirjoitti: > The warning is > > dep.py:6: PendingDeprecationWarning: The CObject API is deprecated as > of Python 3.1. Please convert to using the Capsule API. > np.dtype('M8[3M/40]') > > This doesn't happen with the old dtypes, so I assume it i

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

2010-02-21 Thread Charles R Harris
Hi Travis, The warning is dep.py:6: PendingDeprecationWarning: The CObject API is deprecated as of Python 3.1. Please convert to using the Capsule API. np.dtype('M8[3M/40]') This doesn't happen with the old dtypes, so I assume it is associated with something introduced for datetime. Any ideas