Skip to content

Conversation

@mloubout
Copy link
Contributor

No description provided.

@mloubout mloubout added the dependencies Pull requests that update a dependency file label May 15, 2025
@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.92%. Comparing base (c91cee0) to head (8b43ba4).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2605      +/-   ##
==========================================
+ Coverage   91.91%   91.92%   +0.01%     
==========================================
  Files         245      245              
  Lines       48427    48432       +5     
  Branches     4255     4256       +1     
==========================================
+ Hits        44513    44523      +10     
+ Misses       3237     3233       -4     
+ Partials      677      676       -1     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 72.52% <85.00%> (-0.02%) ⬇️
pytest-gpu-nvc-nvidiaX 73.58% <85.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mloubout mloubout force-pushed the sympy-compate branch 11 times, most recently from e0fee5c to a68fe24 Compare May 16, 2025 02:19
@mloubout mloubout changed the title deps: fix sympy compat check at install deps: Update minimal for sympy and numpy May 16, 2025
pip>=9.0.1
numpy>1.16,<2.3
sympy>=1.9,<1.14
numpy>=2,<2.2.6
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the max numpy downgrade?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a downgrade. numpy is currently at 2.2.5 and making minor releases so the dependabot is not catching those because they always satisfy the current major release bound. It's just refining it

Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any systems that we know about where Devito is running and numpy is a system dependency (ie: air-gapped systems) where this might cause an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think Colab was yes, but I think they updated recently. Handling the sympy-numpy versions is quite a pain if we allow numpy <2 but will see if can find a way.

return vmin, vmax


def numpy_compat(required):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Ok so basically this was not doing anything because pip runs the build in isolation so sympy is never found and it always default to the PkgNotFound case.

Copy link
Contributor

@JDBetteridge JDBetteridge left a comment

Choose a reason for hiding this comment

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

Given that most of the logic is stripped out of setup.py should we start thinking about migrating to a more modern Python packaging solution, namely a pyproject.toml?

@mloubout mloubout force-pushed the sympy-compate branch 2 times, most recently from d9fd68a to 21522ab Compare May 16, 2025 16:15
Copy link
Contributor

@FabioLuporini FabioLuporini left a comment

Choose a reason for hiding this comment

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

Minor comments, otherwise GTG

assumptions = newobj._assumptions.copy()
for key in ('real', 'imaginary', 'complex'):
assumptions.pop(key, None)
newobj._assumptions = assumptions
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't these four lines equivalent to just

newobj._assumptions = {k: v for k, v in newobj._assumptions.items()
                       if k not in ('real', 'imaginary', 'complex')}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

_assumptions is some fnacy sympy internal type not a plain dict so this would break a lot of stuff.

sympy.polys.rings._ring_cache.clear()
sympy.polys.fields._field_cache.clear()
except AttributeError:
# SymPy 1.14 and later
Copy link
Contributor

Choose a reason for hiding this comment

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

since I'm paranoid, could you try a git grep _cache in SymPy 1.14 to be sure they haven't added any other random caches?

Copy link
Contributor

@FabioLuporini FabioLuporini left a comment

Choose a reason for hiding this comment

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

LGTM

@mloubout mloubout merged commit 6509d71 into main May 19, 2025
34 checks passed
@mloubout mloubout deleted the sympy-compate branch May 19, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants