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

fix: added check for FriCAS version #39796

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

devansh-srv
Copy link

@devansh-srv devansh-srv commented Mar 26, 2025

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

Enhancements to version handling and functionality checks:

  • src/sage/features/fricas.py: Added a MINIMUM_VERSION attribute to specify the minimum required version of FriCAS.
  • src/sage/features/fricas.py: Introduced a get_version method to retrieve the installed FriCAS version.
  • src/sage/features/fricas.py: 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.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@devansh-srv
Copy link
Author

Hey @dimpase
I have checked that the url https://fricas.github.io/ refers to version 1.3.11
but this ticket concludes that FriCAS support was updated to 1.3.8
so I think 1.3.8 version check would be appropriate but I need to be sure
I am not on a Ubuntu machine (rather an arch machine)

@dimpase
Copy link
Member

dimpase commented Mar 26, 2025

indeed, anything earlier than 1.3.8 wasn't supported. Perhaps some tests, updated for newer FriCAS, might now fail, but that's OK

@tscrim
Copy link
Collaborator

tscrim commented Mar 28, 2025

cc-ing @mantepse just in case

Copy link

Documentation preview for this PR (built with commit c334808; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@dimpase
Copy link
Member

dimpase commented Mar 29, 2025

can we use a non-deprecated API here?

>>> from pkg_resources import parse_version
<stdin>:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

@dimpase
Copy link
Member

dimpase commented Mar 29, 2025

e.g. you can use https://packaging.pypa.io/en/stable/version.html

@devansh-srv
Copy link
Author

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?

pkg_resources

@dimpase the package pkg_resources definitely needs to go as it is deprecated as shown by pytorch ticket 139170
I have made the necessary changes using the packaging.version package
I have also written and optional EXAMPLE doctest for the get_version() method
you may have a look on these latest changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants