GNOME Bugzilla – Bug 630844
add compat functions for the deprecated PyCObject api
Last modified: 2010-10-13 18:00:47 UTC
* Moved to using the PyCapsule API for python >= 2.7
Created attachment 171294 [details] [review] add compat functions for the deprecated PyCObject api
Created attachment 171709 [details] [review] add compat functions for the deprecated PyCObject api * Moved to using the PyCapsule API for python >= 3 * PyCObject is removed from Python 3.2 * It has also been deprecated in 2.7 but since we use the API in header files which are consumed by static binding modules, appling this for python 2.7 causes crashes unless the modules are recompiled, breaking ABI. It is safe to rely on for 2.7 because it will never be removed and there is talk of undeprecating it upstream. * There is no issues with static bindings under python 3 because they are not supported yet and most likely never will be. * Even if PyCObject is brought back in 3.2, PyCapsule is a much safer API which adds a poorman's type check when unboxing.
Can we come up with a different name for PYGLIB_PyCapsule_New ? I find it confusing that in some cases it won't be using the PyCapsule API, and I don't think we'll be able to get rid of the 2.x code in a good while.
Created attachment 171969 [details] [review] add compat functions for the deprecated PyCObject api * Moved to using the PyCapsule API for python >= 3 * PyCObject is removed from Python 3.2 * It has also been deprecated in 2.7 but since we use the API in header files which are consumed by static binding modules, appling this for python 2.7 causes crashes unless the modules are recompiled, breaking ABI. It is safe to rely on for 2.7 because it will never be removed and there is talk of undeprecating it upstream. * There is no issues with static bindings under python 3 because they are not supported yet and most likely never will be. * Even if PyCObject is brought back in 3.2, PyCapsule is a much safer API which adds a poorman's type check when unboxing.
Renamed PYGLIB_PyCapsule_New to PYGLIB_PuCapsule_WrapPointer
Created attachment 172201 [details] [review] add compat functions for the deprecated PyCObject api * Moved to using the PyCapsule API for python >= 3 * PyCObject is removed from Python 3.2 * It has also been deprecated in 2.7 but since we use the API in header files which are consumed by static binding modules, appling this for python 2.7 causes crashes unless the modules are recompiled, breaking ABI. It is safe to rely on for 2.7 because it will never be removed and there is talk of undeprecating it upstream. * There is no issues with static bindings under python 3 because they are not supported yet and most likely never will be. * Even if PyCObject is brought back in 3.2, PyCapsule is a much safer API which adds a poorman's type check when unboxing.
Created attachment 172293 [details] [review] add compat functions for the deprecated PyCObject api * Moved to using the PyCapsule API for python >= 3 * PyCObject is removed from Python 3.2 * It has also been deprecated in 2.7 but since we use the API in header files which are consumed by static binding modules, appling this for python 2.7 causes crashes unless the modules are recompiled, breaking ABI. It is safe to rely on for 2.7 because it will never be removed and there is talk of undeprecating it upstream. * There is no issues with static bindings under python 3 because they are not supported yet and most likely never will be. * Even if PyCObject is brought back in 3.2, PyCapsule is a much safer API which adds a poorman's type check when unboxing.
Attachment 172293 [details] pushed as e1981da - add compat functions for the deprecated PyCObject api