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

pytest deprecation warnings #609

Open
pkienzle opened this issue Sep 25, 2024 · 1 comment
Open

pytest deprecation warnings #609

pkienzle opened this issue Sep 25, 2024 · 1 comment

Comments

@pkienzle
Copy link
Contributor

Looking at the output of test (ubuntu-latest, 3.11) I see the following deprecations, which will likely turn into errors in future versions.

 =============================== warnings summary ===============================
../../../../../opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytools/persistent_dict.py:63
  /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytools/persistent_dict.py:63: RecommendedHashNotFoundWarning: Unable to import recommended hash 'siphash24.siphash13', falling back to 'hashlib.sha256'. Run 'python3 -m pip install siphash24' to install the recommended hash.
    warn("Unable to import recommended hash 'siphash24.siphash13', "

sasmodels/resolution.py: 136 warnings
  /home/runner/work/sasmodels/sasmodels/sasmodels/resolution.py:595: DeprecationWarning: `scipy.integrate.romberg` is deprecated as of SciPy 1.12.0and will be removed in SciPy 1.15.0. Please use`scipy.integrate.quad` instead.
    total = romberg(_int_w, 0, w, args=(qi,),

sasmodels/resolution.py: 136 warnings
  /home/runner/work/sasmodels/sasmodels/sasmodels/resolution.py:597: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    result[i] = total/w

sasmodels/sasview_model.py::test_cylinder
  /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but sasmodels/sasview_model.py::test_cylinder returned array([0.4255684]), which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?
    warnings.warn(

sasmodels/sasview_model.py::test_rpa
  /opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but sasmodels/sasview_model.py::test_rpa returned array([0.001]), which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?
    warnings.warn(
@krzywon
Copy link
Collaborator

krzywon commented Oct 28, 2024

../../../../../opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytools/persistent_dict.py:63
/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/site-packages/pytools/persistent_dict.py:63: RecommendedHashNotFoundWarning: Unable to import recommended hash 'siphash24.siphash13', falling back to 'hashlib.sha256'. Run 'python3 -m pip install siphash24' to install the recommended hash.
warn("Unable to import recommended hash 'siphash24.siphash13', "

This warning is now fixed in #613.

@krzywon krzywon mentioned this issue Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants