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

Use Py_LIMITED_API #371

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

RobinD42
Copy link
Member

VERY early look at using the Py_LIMITED_API which, in theory, would allow us to have one binary that works with multiple Python 3.x versions. See also #314 and https://www.python.org/dev/peps/pep-0384/.

It looks like there will be lots of flaming hoops to jump through to make it work, and I'm not certain that it is even possible at all due to the kinds of Python C API things we're already using that are not available in the Python limited API. For example, all the PyFoo_GET_ITEM type of "faster" macros will need to be changed to their function call equivalents, all operations on buffer objects, Python datetime objects, PyMethods and probably some others are not allowed. And so on...

I can do like PyQt/SIP has done and make a separate wxpy_api extension module that is built for each version of Python, and exports an API that can be used by the Python3-generic binaries for things that can't be done with the limited API. I've started doing that, but it's still unclear whether that will be sufficient for all the things that will need to change. And, of course, that means that a new package will need to be built and distributed, dependencies tracked, etc.

Also unclear at this point is whether it will be possible to include support for Python3.4 on Windows since it uses a different version of the compiler than the newer 3.x versions do.

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

Successfully merging this pull request may close these issues.

1 participant