-
Notifications
You must be signed in to change notification settings - Fork 26
ENH: Add Python 3.12 and 3.13 to build-test-package CI workflow #323
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
ENH: Add Python 3.12 and 3.13 to build-test-package CI workflow #323
Conversation
Python 3.12 and 3.13 now both have "bugfix" maintenance status, according to https://www.python.org/downloads/
@thewtex Does the itk package already support Python 3.12 and 3.13? I don't see them at https://pypi.org/project/itk/#files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@N-Dekker we should not be trying to build 3.12 and 3.13 Python packages.
@@ -28,7 +28,7 @@ jobs: | |||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') | |||
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/[email protected] | |||
with: | |||
python3-minor-versions: '["9","10","11"]' | |||
python3-minor-versions: '["9","10","11","12","13"]' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want 12 and 13 here. Our 3.11 wheels work with 3.12 and 3.13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @thewtex, cool. But then, why do we have 10 and 11? Don't the 3.9 wheels work with 3.10 and 3.11?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stable ABI was introduced with Python 3.11, see: https://docs.python.org/3.11/c-api/stable.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! Thanks @dzenanz Do the ITK wrappings just use the "Limited API" of Python? Is Py_LIMITED_API defined for ITK?
It looks like even Python 3.9 supports a Stable ABI, although it has less documentation: https://docs.python.org/3.9/c-api/stable.html So don't you think a single Python 3.9 wheel would be sufficient to support any Python version >= 3.9? We could potentially save a lot of energy (and save a little bit more of the planet)... 😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that "official", "complete", "proper" (whatever) support for Python stable ABI has started with version 3.11. I don't know where that is written.
ITK has ITK_USE_PYTHON_LIMITED_API
, which is on by default if Python version is 3.11+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that "official", "complete", "proper" (whatever) support for Python stable ABI has started with version 3.11. I don't know where that is written.
Ah, now I see, in What’s New In Python 3.11 section New Features:
-
Py_buffer and APIs are now part of the limited API and the stable ABI:
- PyObject_CheckBuffer()
- PyObject_GetBuffer()
- PyBuffer_GetPointer()
- PyBuffer_SizeFromFormat()
- PyBuffer_ToContiguous()
- PyBuffer_FromContiguous()
- PyObject_CopyData()
- PyBuffer_IsContiguous()
- PyBuffer_FillContiguousStrides()
- PyBuffer_FillInfo()
- PyBuffer_Release()
- PyMemoryView_FromBuffer()
- bf_getbuffer and bf_releasebuffer type slots
(Contributed by Christian Heimes in bpo-45459.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need Python 3.11 for the CPython ABI we / our version of SWIG uses.
Python 3.12 and 3.13 now both have "bugfix" maintenance status, according to https://www.python.org/downloads/