[Python-Dev] Language Summit notes

Nick Coghlan ncoghlan at gmail.com
Fri Apr 11 13:41:12 CEST 2014


On 11 Apr 2014 05:39, "Armin Rigo" <arigo at tunes.org> wrote:
>
> Hi,
>
> On 10 April 2014 22:12, Paul Moore <p.f.moore at gmail.com> wrote:
> > I agree. I'd like to see a clear explanation of what advantages (and
> > disadvantages!) CFFI gives over ctypes, as well as the plan for
> > inclusion and how the inevitable confusion over whether to use ctypes
> > or cffi will be handled.  (...)
>
> I can't judge exactly what was told in the Language Summit, but here
> is my own position about CFFI. Code-wise, we're in precisely the same
> spot as last year.  The usage of CFFI seems to be growing a lot.
> However, it's not in any stdlib-ready state right now.
>
> Why not?  Because we have a plan to go forward and fix the main issues
> people seem to be having: when used in "API mode" there is some
> building-C-sources-and-compiling-them going on under your feet;
> however, "explicit is better than implicit" seems to apply here too.
> Thus, it seems that the basic model might be changed toward a variant
> in which you put your C declarations into some separate file that you
> need to execute once, in order to build and compile a regular C
> extension module.
>
> This would be superficial, but change the perception of CFFI to be "a
> preprocessor that produces C extension modules".
>
> This affects the "API mode" but not the "ABI mode" (which is basically
> the same as ctypes, modulo the syntax).

This is along the lines of what Alex said at the summit (i.e. it wasn't
proposed for 3.4 because you didn't consider it stdlib ready yet). The
clearer separation of the build and import steps definitely sounds
promising, as the current implicit approach poses challenges getting cffi
extensions to play nice with wheel based distribution.

Cheers,
Nick.

>
>
> A bientôt,
>
> Armin.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140411/fa1a7f3b/attachment.html>


More information about the Python-Dev mailing list