markshannon / New-C-API-for-Python

Design and discussion for the new C-API for Python
Creative Commons Zero v1.0 Universal
15 stars 1 forks source link

Add section listing alternative approaches #8

Open ericsnowcurrently opened 2 years ago

ericsnowcurrently commented 2 years ago

There have been a number of informative discussions over the years (especially the last few years) about the future of the C-API. It would be worth taking advantage those discussions.

We can start by leaving links to those discussions here. Any of them that might warrant a deeper discussion could also get separate issues. (There's already some discussion about HPy.)

ericsnowcurrently commented 2 years ago

I'll start. @zooba wrote down what I think are some important design principles:

https://mail.python.org/archives/list/capi-sig@python.org/thread/B2VDVLABM4RQ4ATEJXFZYWEGTBZPUBKW/

I've opened #7 for a deeper discussion.

encukou commented 2 years ago

My notes: Draft: C API design strategy, Python C-API in non-C languages (and projects I asked to chime in)

hodgestar commented 2 years ago

Here is the high-level HPy API manifesto and the slightly longer explanation of each item:

And the HPy implementation https://github.com/hpyproject/hpy/ as prior art.

HPy can already run kiwisolver, matplotlib, and enough of numpy to run a simple Game of Life. The links are to the respective ports.

ericsnowcurrently commented 2 years ago

@vstinner has also made detailed proposals in the past and written extensively about it:

(Victor's personal Python notes at https://pythondev.readthedocs.io/ probably also have some related material.)

ericsnowcurrently commented 2 years ago

Here's a discussion I started about having an official cython-like tool:

https://mail.python.org/archives/list/capi-sig@python.org/thread/NSREULQDHSJ6SZTOY5YVSNX4U4AYJOI6/

ericsnowcurrently commented 2 years ago

A discussion started by @hodgestar about replacing the C-API with CFFI:

https://mail.python.org/archives/list/capi-sig@python.org/thread/ZV3IQWW7XL6MHZAJARHW62WNZDCX3A4M/

ericsnowcurrently commented 2 years ago

@vstinner also publishes a backward-compatibility shim header that relates here:

https://pythoncapi-compat.readthedocs.io/