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

CI: Test integration_tests with Python 3.9, 3.10 and 3.11 #2298

Merged
merged 6 commits into from
Aug 25, 2023

Conversation

Shaikh-Ubaid
Copy link
Collaborator

@Shaikh-Ubaid Shaikh-Ubaid commented Aug 25, 2023

@Shaikh-Ubaid
Copy link
Collaborator Author

It seems linear_regression, correlation, covariance were added to the statistics module in Python 3.10 (https://docs.python.org/3/library/statistics.html#statistics.correlation). I temporarily removed them in tmp.

@certik
Copy link
Contributor

certik commented Aug 25, 2023

I have an idea. Why not to test integration_tests/test_statistics.py only with Python >= 3.10. That way we'll have a mechanism to test features in newer CPython versions. In LPython we can support the latest features, or we can even allow this with compiler options (but I would not bother for now, we can do that later).

@Shaikh-Ubaid Shaikh-Ubaid changed the title CI: Test integration_tests with Python 3.9 CI: Test integration_tests with Python 3.9, 3.10 and 3.11 Aug 25, 2023
@Shaikh-Ubaid
Copy link
Collaborator Author

We currently test both cpython and c_py (as the test depends on CPython for execution). We will eventually support other backends like llvm_py and probably c_sym, llvm_sym.

@@ -623,7 +635,7 @@ RUN(NAME bindpy_01 LABELS cpython c_py ENABLE_CPYTHON NOFAST COPY_TO_B
RUN(NAME bindpy_02 LABELS cpython c_py LINK_NUMPY COPY_TO_BIN bindpy_02_module.py)
RUN(NAME bindpy_03 LABELS cpython c_py LINK_NUMPY NOFAST COPY_TO_BIN bindpy_03_module.py)
RUN(NAME bindpy_04 LABELS cpython c_py LINK_NUMPY NOFAST COPY_TO_BIN bindpy_04_module.py)
RUN(NAME bindpy_05 LABELS llvm_py c_py ENABLE_CPYTHON COPY_TO_BIN bindpy_05_module.py)
RUN(NAME bindpy_05 LABELS llvm_py c_py ENABLE_CPYTHON COPY_TO_BIN bindpy_05_module.py REQ_PY_VER 3.10)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This test seems to fail with Python 3.9. For the moment, I marked it as REQ_PY_VER 3.10. I will tackle the failure with Python 3.9 in a future PR.

@Shaikh-Ubaid
Copy link
Collaborator Author

From #1827 (comment),

Ok, then let's test Python 3.9, 3.10 and 3.11 explicitly, all three

We now explicitly test all the three 3.9, 3.10 and 3.11 Python versions with integration_tests.

string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1" REQ_PY_MAJOR_VERSION "${RUN_REQ_PY_VER}")
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" REQ_PY_MINOR_VERSION "${RUN_REQ_PY_VER}")

if (PY_MINOR_VERSION LESS REQ_PY_MINOR_VERSION)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This compares only the Python minor versions for now. We might need to consider Python major versions when Python 4.0.0 is released, but I guess there might probably be some time for it.

@Shaikh-Ubaid
Copy link
Collaborator Author

The CI is green. This is ready!

Copy link
Contributor

@certik certik left a comment

Choose a reason for hiding this comment

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

I think this is good, thank you for fixing it!

@certik certik merged commit 615e7e7 into lcompilers:main Aug 25, 2023
12 checks passed
@Shaikh-Ubaid Shaikh-Ubaid deleted the ci_python_3_9 branch August 25, 2023 16:53
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.

Test lpython.py with multiple CPython versions
2 participants