[issue5630] Create alternatieve CObject API that is safe and clean

Larry Hastings report at bugs.python.org
Thu Apr 16 13:48:39 CEST 2009


Larry Hastings <larry at hastings.org> added the comment:

I've updated the patch:
* Capsule now has a custom repr that includes whatever name is set.
* I've updated the documentation to talk about Capsules and not
CObjects; the documentation discusses naming your capsules.
* PyCapsule_Import now takes a "no_block" parameter; if true,
PyCapsule_Import will import the module using
PyImport_ImportModuleNoBlock, and if the import fails it will return
failure but *not* raise an exception.
* I checked all the exceptions to ensure they were of reasonable types.

This is as far as I can take the patch without some input from the
community.  I hope the fate of this patch can be decided before the 3.1
feature freeze.

----------
Added file: http://bugs.python.org/file13703/lch.capsule.r71641.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5630>
_______________________________________


More information about the Python-bugs-list mailing list