[Python-Dev] public visibility of python-dev decisions "before it's too late" (was: PyCObject_AsVoidPtr removed from python 3.2 - is this documented?)

Robert Kern robert.kern at gmail.com
Tue Mar 15 17:34:55 CET 2011


On 3/14/11 5:30 PM, Lennart Regebro wrote:

> Many projects, not only the Zope Toolkit needs to support a lot of
> versions. The Zope component architecture currently supports 2.4, 2.5
> and 2.6 and is expected to work on 2.7. I don't know if 2.4 or 2.5 can
> be dropped, but it definitely will be *years* until we can drop
> support for 2.6.  But if I move the PyCObject API to the PyCapsule
> API, the zope packages will **only work on Python 2.7 and 3.2**. This
> is obviously not an option. If I do *not* switch, I can't support
> Python 3.2. That's bad.

For what it's worth, numpy simultaneously supports Python 2.5-2.7 and 3.1-3.2. 
It uses PyCObject or PyCapsule APIs as appropriate. We do this from the same 
codebase. We had to add another layer of indirection, but nothing too bad. You 
can steal our code here:

https://github.com/numpy/numpy/blob/master/numpy/core/include/numpy/npy_3kcompat.h#L299

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the Python-Dev mailing list