-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
fix: added check for FriCAS version #39796
base: develop
Are you sure you want to change the base?
Conversation
ffb15e1
to
c334808
Compare
Hey @dimpase |
indeed, anything earlier than 1.3.8 wasn't supported. Perhaps some tests, updated for newer FriCAS, might now fail, but that's OK |
cc-ing @mantepse just in case |
Documentation preview for this PR (built with commit 9897efb; changes) is ready! 🎉 |
can we use a non-deprecated API here?
|
e.g. you can use https://packaging.pypa.io/en/stable/version.html |
We can but is it causing any issue in the building process?
@dimpase the package pkg_resources definitely needs to go as it is deprecated as shown by pytorch ticket 139170 |
88cba46
to
deb6be6
Compare
Please review the changes @dimpase |
Deprecated features should not be used in newly written code, this is the only reason for my request
There are more uses of it across Sage code,
|
In the latest changes I have remove pkg_resources and use the package that you have suggested |
Hey @dimpase any specific instructions for me over this PR ? |
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.
your test for fricas version is too explicit. As we allow external fricas, it could be another version.
All you know is that's it's 1.3.something.
please replace 8
with dots, as done in such cases
deb6be6
to
9897efb
Compare
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.
Please add the following comment
--- a/build/pkgs/fricas/spkg-configure.m4
+++ b/build/pkgs/fricas/spkg-configure.m4
@@ -1,4 +1,7 @@
SAGE_SPKG_CONFIGURE(
+dnl
+dnl make sure that the minimal version is also set in src/sage/feature/fricas.py
+dnl
[fricas], [
AC_CACHE_CHECK([for FriCAS >= 1.3.8], [ac_cv_path_FRICAS], [
AC_PATH_PROGS_FEATURE_CHECK([FRICAS], [fricas], [
Otherwise it's good to go.
@roed314 - please turn this to Positive review
shall I do these changes now? |
yes, of course. |
sagemathgh-39796: fix: added check for FriCAS version This pull request includes several updates to the `FriCAS` class in the `src/sage/features/fricas.py` file. The changes introduce a minimum version requirement, add a method to retrieve the installed FriCAS version, and enhance the `is_functional` method to check the version.This is an attempt to fix the issue [39784](sagemath#39784) Enhancements to version handling and functionality checks: * [`src/sage/features/fricas.py`](diffhunk://#diff- a2c0d819d857ba2338e0d58e1a4875c88b600b174c8fb4371183ecc3f0e5b72eR29- R30): Added a `MINIMUM_VERSION` attribute to specify the minimum required version of FriCAS. * [`src/sage/features/fricas.py`](diffhunk://#diff- a2c0d819d857ba2338e0d58e1a4875c88b600b174c8fb4371183ecc3f0e5b72eR43- R54): Introduced a `get_version` method to retrieve the installed FriCAS version. * [`src/sage/features/fricas.py`](diffhunk://#diff- a2c0d819d857ba2338e0d58e1a4875c88b600b174c8fb4371183ecc3f0e5b72eL61- R85): Updated the `is_functional` method to call `get_version` and check if the installed version meets the minimum requirement. If the version is not retrievable or is too old, appropriate error messages are returned. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39796 Reported by: Devansh Srivastava Reviewer(s): Dima Pasechnik
@dimpase I have made the suggested changes in the file |
This pull request includes several updates to the
FriCAS
class in thesrc/sage/features/fricas.py
file. The changes introduce a minimum version requirement, add a method to retrieve the installed FriCAS version, and enhance theis_functional
method to check the version.This is an attempt to fix the issue 39784Enhancements to version handling and functionality checks:
src/sage/features/fricas.py
: Added aMINIMUM_VERSION
attribute to specify the minimum required version of FriCAS.src/sage/features/fricas.py
: Introduced aget_version
method to retrieve the installed FriCAS version.src/sage/features/fricas.py
: Updated theis_functional
method to callget_version
and check if the installed version meets the minimum requirement. If the version is not retrievable or is too old, appropriate error messages are returned.📝 Checklist
⌛ Dependencies