[Python-ideas] discouraging direct use of the C-API
Donald Stufft
donald at stufft.io
Wed May 6 23:54:06 CEST 2015
> On May 6, 2015, at 5:41 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>
> On 06.05.2015 18:23, Eric Snow 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.
>>
>> Thoughts?
>
> Python without the C extensions would hardly have had the
> success it has. It is widely known as perfect language to
> glue together different systems and provide integration.
>
> Deprecating the C API would mean that you deprecate all
> those existing C extensions together with the C API.
>
> This can hardly be in the interest of Python's quest for
> world domination :-)
>
> BTW: What can be more drastic than deprecating the Python C API ?
> There are certainly better ways to evolve an API than getting
> rid of it.
I think “deprecate” might be a bad word for it rather than telling
people they shoul use CFFI (or Python) instead of the C-API.
Similar to having the urllib.request direct people towards the
requests project for accessing the internet.
CFFI still makes it easy to act as a glue between different systems,
it just does so in a way that isn’t tied to one particular
implementation’s API and which is generally much easier to work with
on top of that. The biggest problems with CFFI currently are the
problems in distributing a CFFI module because of some early decisions,
but the CFFI 1.0 work is fixing all of that.
---
Donald Stufft
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150506/8ecb7f81/attachment.sig>
More information about the Python-ideas
mailing list