Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Promote pythoncapi-compat project #1

Open
gvanrossum opened this issue Oct 2, 2023 · 3 comments
Open

Promote pythoncapi-compat project #1

gvanrossum opened this issue Oct 2, 2023 · 3 comments

Comments

@gvanrossum
Copy link
Contributor

@vstinner maintains a repository (https://github.com/python/pythoncapi-compat) with backwards compatibility shims that allow extensions to use certain new C APIs while running on older Python versions.

We could officially promote this approach as a way for projects to be able to move forward while still supporting older Python versions.

I currently don't know what the limitations are -- possibly this doesn't work with the Stable ABI?

Credit-To: @ericsnowcurrently who mentioned this in our team meeting today.

@encukou
Copy link
Contributor

encukou commented Oct 9, 2023

The other limitation is that it only works for C. We might want to build an actual linkable library.

@encukou
Copy link
Contributor

encukou commented Oct 10, 2023

An idea @colesbury floated at the sprint (from one of the HPy devs? I didn't catch which one):
Make this a pip-installable library, with the functions it provides exported in a capsule, plus a header file with shims that import this capsule and call the functions in it.

@vstinner
Copy link
Contributor

The other limitation is that it only works for C. We might want to build an actual linkable library.

I wrote the deadparrot project which is implemented as a C shared library.

I'm not sure if it can be used by other programming languages since it renames PyXXX functions to DeadPyXXX. Well, the project is still experimental :-)

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

No branches or pull requests

3 participants