[Python-ideas] discouraging direct use of the C-API
Eric Snow
ericsnowcurrently at gmail.com
Thu May 7 00:00:48 CEST 2015
On Wed, May 6, 2015 at 1:59 PM, Andrew Barnert <abarnert at yahoo.com> wrote:
> On May 6, 2015, at 09:23, Eric Snow <ericsnowcurrently at gmail.com> wrote:
>>
>> A big blocker to making certain sweeping changes to CPython (e.g.
>> ref-counting) is compatibility with the vast body of C extension
>> modules out there that use the C-API. While there are certainly
>> drastic long-term solutions to that problem, there is one thing we can
>> do in the short-term that would at least get the ball rolling. We can
>> put a big red note at the top of every page of the C-API docs that
>> encourages folks to either use CFFI or Cython.
>
> Does this mean you also want to discourage boost::python, SIP, SWIG, etc., which as far as I know come down to automatically building C API extensions, and would need to be completely rewritten if you wanted to make them work a different way?
Not really. I mentioned CFFI and Cython specifically because they are
the two that kept coming up in previous discussions related to
discouraging use of the C-API. If C extensions were always generated
using tools, then only tools would have to adapt to (drastic) changes
in the C-API. That would be a much better situation than the status
quo since it drastically reduces the impact of changes.
-eric
More information about the Python-ideas
mailing list