After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 630844 - add compat functions for the deprecated PyCObject api
add compat functions for the deprecated PyCObject api
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-28 19:33 UTC by johnp
Modified: 2010-10-13 18:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add compat functions for the deprecated PyCObject api (6.91 KB, patch)
2010-09-28 19:33 UTC, johnp
none Details | Review
add compat functions for the deprecated PyCObject api (7.91 KB, patch)
2010-10-04 17:09 UTC, johnp
none Details | Review
add compat functions for the deprecated PyCObject api (7.95 KB, patch)
2010-10-08 20:57 UTC, johnp
none Details | Review
add compat functions for the deprecated PyCObject api (7.96 KB, patch)
2010-10-12 16:52 UTC, johnp
none Details | Review
add compat functions for the deprecated PyCObject api (7.94 KB, patch)
2010-10-13 17:56 UTC, johnp
committed Details | Review

Description johnp 2010-09-28 19:33:00 UTC
* Moved to using the PyCapsule API for python >= 2.7
Comment 1 johnp 2010-09-28 19:33:02 UTC
Created attachment 171294 [details] [review]
add compat functions for the deprecated PyCObject api
Comment 2 johnp 2010-10-04 17:09:51 UTC
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.
Comment 3 Tomeu Vizoso 2010-10-06 09:26:06 UTC
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.
Comment 4 johnp 2010-10-08 20:57:17 UTC
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.
Comment 5 johnp 2010-10-08 20:59:08 UTC
Renamed PYGLIB_PyCapsule_New to PYGLIB_PuCapsule_WrapPointer
Comment 6 johnp 2010-10-12 16:52:36 UTC
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.
Comment 7 johnp 2010-10-13 17:56:51 UTC
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.
Comment 8 johnp 2010-10-13 18:00:43 UTC
Attachment 172293 [details] pushed as e1981da - add compat functions for the deprecated PyCObject api