Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Shared library providing new C API functions to old stable ABI #10

Closed
vstinner opened this issue Nov 14, 2023 · 1 comment
Closed

Shared library providing new C API functions to old stable ABI #10

vstinner opened this issue Nov 14, 2023 · 1 comment

Comments

@vstinner
Copy link

Sometimes, I wish a pythoncapi-compat-like library for the stable ABI: provide new functions on top of the existing limited C API. It would provide immediately new functions to all Python versions, maybe up to Python 3.2 stable ABI!

Currently, pythoncapi-compat is implemented as a single header files, the implementation has to be short and compatible with most C and C++ compilers. Maybe having a (new) shared library would allow to have more complicated implementations and care less about C/C++ compilers.

For example, I decided to not implement PyType_FromModuleAndSpec() in pythoncapi-compat because the implementation requires 100 to 500 lines of C code, it doesn't fit well into current pythoncapi-compat design.

Well, HPy already exists, provides a stable ABI, and works on all Python versions! :-)

@vstinner
Copy link
Author

I created the experimental https://github.com/vstinner/deadparrot project which is a shared library. I propose to continue the experiment there, I close this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant