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

Upgrade supported Python version to 3.12 #154

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

kvrigor
Copy link
Contributor

@kvrigor kvrigor commented May 15, 2024

Address #106. On my local machine (Ubuntu 22.04) the sympde tests pass for sympy 1.9 but fail for sympy 1.10-1.12. Let's see if the CI picks up the same failures I've encountered.

Also upgraded sympy to 1.12
@kvrigor kvrigor marked this pull request as draft May 15, 2024 07:02
and also upgraded GitHub actions to latest versions:
- checkout@v2 -> checkout@v4
- setup-python@v2 -> setup-python@v5
@kvrigor
Copy link
Contributor Author

kvrigor commented May 15, 2024

So the error with sympy 1.12 isn't local to my dev machine and could be replicated here: https://github.com/pyccel/sympde/actions/runs/9091374690/job/24985858819#step:6:33

============================= test session starts ==============================
platform linux -- Python 3.11.[9](https://github.com/pyccel/sympde/actions/runs/9091374690/job/24985858819#step:6:10), pytest-8.2.0, pluggy-1.5.0
rootdir: /home/runner
collected 157 items / 1 error

==================================== ERRORS ====================================
_______________ ERROR collecting exterior/tests/test_compiler.py _______________
/opt/hostedtoolcache/Python/3.[11](https://github.com/pyccel/sympde/actions/runs/9091374690/job/24985858819#step:6:12).9/x64/lib/python3.11/site-packages/sympde/exterior/tests/test_compiler.py:299: in <module>
    test_compiler_3d_poisson()
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sympde/exterior/tests/test_compiler.py:237: in test_compiler_3d_poisson
    expr = dot(sigma, tau) + div(tau)*u + div(sigma)*v
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sympde/calculus/core.py:363: in __new__
    if a == b:
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sympy/core/basic.py:4[17](https://github.com/pyccel/sympde/actions/runs/9091374690/job/24985858819#step:6:18): in __eq__
    a, b = self._hashable_content(), other._hashable_content()
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sympy/core/symbol.py:363: in _hashable_content
    return (self.name,) + tuple(sorted(self.assumptions0.items()))
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/sympy/core/symbol.py:375: in assumptions0
    return self._assumptions0.copy()
E   AttributeError: 'VectorFunction' object has no attribute '_assumptions0'
=========================== short test summary info ============================
ERROR exterior/tests/test_compiler.py - AttributeError: 'VectorFunction' object has no attribute '_assumptions0'
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 4.30s ===============================

This seems to be a known issue in sympy (issue#25134) and has something to do with incompatible pickle-d objects across sympy versions. Nevertheless, I've added a test for Python 3.12 and the sympde tests still pass even without upgrading sympy.

@kvrigor kvrigor marked this pull request as ready for review May 15, 2024 07:37
@kvrigor kvrigor changed the title Upgrade supported Python version to 3.12.2 Upgrade supported Python version to 3.12 May 15, 2024
Copy link
Collaborator

@campospinto campospinto left a comment

Choose a reason for hiding this comment

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

Good to me! Thanks.

@campospinto campospinto merged commit 27358bf into master Jul 11, 2024
6 checks passed
@campospinto campospinto deleted the upgrade-python-3.12 branch July 11, 2024 13:48
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.

None yet

2 participants