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

Refactor chapel-py to use the C Python Stable API #26565

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Jan 17, 2025

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.

Testing:

  • Building with Python 3.13
    • run start_test test/chplcheck and make test-cls with Python 3.13
    • run start_test test/chplcheck and make test-cls with Python 3.12
    • run start_test test/chplcheck and make test-cls with Python 3.11
    • run start_test test/chplcheck and make test-cls with Python 3.10
    • run start_test test/chplcheck and make test-cls with Python 3.9
  • Building with Python 3.10
    • run start_test test/chplcheck and make test-cls with Python 3.13
    • run start_test test/chplcheck and make test-cls with Python 3.12
    • run start_test test/chplcheck and make test-cls with Python 3.11
    • run start_test test/chplcheck and make test-cls with Python 3.10
    • run start_test test/chplcheck and make test-cls with Python 3.9

Performance Impact

main this PR
chplcheck 1.7s 1.7s
chplcheck modules/standard/IO.chpl 4.9s 4.8s
chplcheck modules/standard/Sort.chpl 2.9s 3.2s

[Reviewed by @DanilaFe]

Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 marked this pull request as ready for review January 22, 2025 20:14
@jabraham17 jabraham17 requested a review from DanilaFe January 22, 2025 20:14
Copy link
Contributor

@DanilaFe DanilaFe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fantastic. I have no problem with the direction, of course, but I did have some rather mechanical remarks. Thank you for taking this on.

doc/rst/conf.py Outdated Show resolved Hide resolved
util/chplenv/chpl_home_utils.py Outdated Show resolved Hide resolved
tools/chapel-py/src/python-type-helper.h Outdated Show resolved Hide resolved
tools/chapel-py/src/PythonWrapper.h Show resolved Hide resolved
tools/chapel-py/src/core-types-gen.cpp Outdated Show resolved Hide resolved
tools/chapel-py/src/core-types-gen.cpp Outdated Show resolved Hide resolved
tools/chapel-py/src/core-types-gen.cpp Outdated Show resolved Hide resolved
tools/chapel-py/src/python-type-helper.h Outdated Show resolved Hide resolved
tools/chapel-py/src/python-class.h Outdated Show resolved Hide resolved
tools/chapel-py/src/python-types.h Outdated Show resolved Hide resolved
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 requested a review from DanilaFe January 22, 2025 23:36
Signed-off-by: Jade Abraham <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants