[python-committers] Redoing the C API?

Brett Cannon brett at python.org
Thu Mar 3 13:52:20 EST 2016


On Thu, 3 Mar 2016 at 10:40 Antoine Pitrou <antoine at python.org> wrote:

>
> Le 03/03/2016 19:38, Brett Cannon a écrit :
> >
> > Ignoring the potential to crash the interpreter (I personally don't care
> > but some do), is the maintenance issue we have with ctypes (or at least
> > that's my hang-up with it). I think we still have not figured out what
> > code we have patched and so no one has been willing to update to a newer
> > version of libffi. I think Zachary looked into it and got some distance
> > but never far enough to feel comfortable with trying to update things.
> >
> > But I thought CFFI's ABI in-line solution matched what ctypes did?
>
> I think it does more or less, which is why precisely I would find it
> gratuitous to deprecate ctypes.
>
> As for the maintenance problem, ok, but we might end up with the same
> problems with cffi (both rely on libffi after all).
>

Personally, if I got my way we would deprecate ctypes in the stdlib and
give it to the community to maintain (but in situations like this I rarely
get my way :). We would then keep CFFI externally and just make sure that
any new C API we developed makes sense for use by CFFI.

And another idea I had for some new-fangled C API: no macros. That gives us
a better ABI and it also makes AST analysis easier with tools like
clang-analyzer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-committers/attachments/20160303/05b1711c/attachment.html>


More information about the python-committers mailing list