-
Notifications
You must be signed in to change notification settings - Fork 248
deps: Update minimal for sympy and numpy #2605
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e0fee5c to
a68fe24
Compare
| pip>=9.0.1 | ||
| numpy>1.16,<2.3 | ||
| sympy>=1.9,<1.14 | ||
| numpy>=2,<2.2.6 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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.
JDBetteridge
left a comment
There was a problem hiding this 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?
d9fd68a to
21522ab
Compare
FabioLuporini
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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')}
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
FabioLuporini
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.