Refactor chapel-py to use the C Python Stable API #26565
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors chapel-py to only use the C Python Stable API when possible. This means that chapel-py will no longer be constrained to run with the Python version it was built with. This allows users more flexibility in how they use chapel-py.
Due to limitations within Python, we can only use the stable API with python 3.10+. Previous versions had stable API's that were missing key features chapel-py relies on. So for previous versions, the previous limitations apply.
Its is expected that this PR will have a performance hit. Its not clear how much of an impact this will have.
TODO: make sure 'module' is set
TODO: fix the pyi generation
TODO: check that docs still work
TODO: cleanup build process/deps folders
Testing:
start_test test/chplcheck
andmake test-cls
with Python 3.13start_test test/chplcheck
andmake test-cls
with Python 3.12start_test test/chplcheck
andmake test-cls
with Python 3.11start_test test/chplcheck
andmake test-cls
with Python 3.10start_test test/chplcheck
andmake test-cls
with Python 3.13start_test test/chplcheck
andmake test-cls
with Python 3.12start_test test/chplcheck
andmake test-cls
with Python 3.11start_test test/chplcheck
andmake test-cls
with Python 3.10start_test test/chplcheck
andmake test-cls
with Python 3.9