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

<title>find_fit issues a deprecation warning starting with SageMath 10.2 #39410

Open
2 tasks done
dhousman13 opened this issue Jan 30, 2025 · 0 comments
Open
2 tasks done
Labels

Comments

@dhousman13
Copy link

Steps To Reproduce

In a Jupyter notebook using SageMath 10.2 or 10.4, run the following code:

#store the data
xdata = [0, 1, 2, 3, 4, 5, 6, 7, 8]
ydata = [5, 0, -11, -22, -27, -20, 5, 54, 133]
data = list(zip(xdata,ydata))

#find a best fit model to the data
var('a b c x')
model(x) = ax^2 + bx + c
best_parameters = find_fit(data, model, solution_dict=True)

Expected Behavior

No output.

Actual Behavior

The following message appears:

/ext/sage/10.4/local/var/lib/sage/venv-python3.12.4/lib/python3.12/site-packages/scikits/init.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import("pkg_resources").declare_namespace(name)
/ext/sage/10.4/local/var/lib/sage/venv-python3.12.4/lib/python3.12/site-packages/scikits/init.py:1: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('scikits').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
import("pkg_resources").declare_namespace(name)

Additional Information

The deprecation warning does not appear in SageMath 10.0, 10.1, and in some 9.x version I had used previously. The warning does appear in SageMath 10.2 and 10.4. The find_fit function does appear to work properly in SageMath 10.4 despite the warning.

Environment

  • OS: Windows in Firefox browswer
  • Sage Version: various; see above

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant