-
Notifications
You must be signed in to change notification settings - Fork 2
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
Switch to using the stable ABI #4
Comments
How does one implement the buffer API with that approach? |
Also how do I declare a subtype of unicode without PyType_FromSpecWithBases which appears to be limited to 3.3 and up? |
You can't support 3.2 with it, but I suspect we'll end up needing 3.3+ for However, it's probably worth waiting and seeing how far we can get while |
Implementing the buffer API should be like implementing any other slot. The |
Ah, now I remember why 3.3 is already the minimum version - we need the |
From PEP 384:
And from CPython 3.4.0b2, Include/typeslots.h:
|
Oh, damn - we forgot to change that after Stefan fixed the back end in |
It should be possible to implement asciicompat using the stable ABI, which will make it easier to maintain (a single binary will work on all Python version 3.2+).
The main changes needed will to define PY_LIMITED_API before importing python.h and to switch to use PyType_FromSpec rather than the legacy type declaration model.
The docs about this are rather suboptimal (see http://bugs.python.org/issue20224).
The text was updated successfully, but these errors were encountered: