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

Add support for numpy 1.22 #366

Merged
merged 1 commit into from May 26, 2022
Merged

Conversation

iyanmv
Copy link
Contributor

@iyanmv iyanmv commented May 26, 2022

Solves #365

numba 0.55.2 supports numpy 1.22, so no reason to stay with numpy 1.21.
numpy 1.22 fixes a few known security issues (CVE-2021-41496, CVE-2021-41495)
@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #366 (ff92175) into master (810bca8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #366   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files          42       42           
  Lines        5230     5230           
=======================================
  Hits         5058     5058           
  Misses        172      172           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efc645e...ff92175. Read the comment docs.

@mhostetter
Copy link
Owner

@iyanmv I like this thanks! I was just checking today to see about when Numba / NumPy might support Python 3.11 (I see people trying to install galois with Python 3.11). But this is very welcome, indeed.

Do you think it's worth a published release allowing users to get the latest everything? I don't have any another releases in the queue at this moment. So maybe it could be a small-ish release.

@mhostetter mhostetter added numpy compatibility Affects compatibility with NumPy numba compatibility Affects compatibility with Numba labels May 26, 2022
@mhostetter
Copy link
Owner

I also want to check that NumPy 1.22 doesn't throw any deprecation warnings or something similar. I've had that happen before. I'm testing on my machine now. Also curious if the test results have any warnings listed.

@mhostetter
Copy link
Owner

When I ran the tests on my machine I get these warnings (which I've seen before). They seem to be scipy-related. I don't believe NumPy 1.22 added anything. And neither did I see anything when running through some example in IPython.

This looks good to go to me. Any other thoughts? Thoughts on publishing a new release now?

================================================================== warnings summary ==================================================================/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
/usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16
  /usr/lib/python3/dist-packages/scipy/sparse/sputils.py:16: DeprecationWarning: `np.typeDict` is a deprecated alias for `np.sctypeDict`.
    supported_dtypes = [np.typeDict[x] for x in supported_dtypes]

/usr/lib/python3/dist-packages/scipy/linalg/__init__.py:217
  /usr/lib/python3/dist-packages/scipy/linalg/__init__.py:217: DeprecationWarning: The module numpy.dual is deprecated.  Instead of using dual, use the functions directly from numpy or scipy.
    from numpy.dual import register_func

-- Docs: https://docs.pytest.org/en/latest/warnings.html
===================================================== 7268 passed, 16 warnings in 315.80 seconds =====================================================

@iyanmv
Copy link
Contributor Author

iyanmv commented May 26, 2022

I guess it's fine to have a small release, but it's your call 😉

Interesting... I only got one warning, but nothing related with numpy or scipy.

============================================================ warnings summary =============================================================
../../../../../../usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:191
  /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== 7268 passed, 1 warning in 275.54s (0:04:35) ===============================================

I will run them again in a Arch chroot instead of a python env.

@mhostetter
Copy link
Owner

I'm ready to merge. Let me know when you are.

@iyanmv
Copy link
Contributor Author

iyanmv commented May 26, 2022

All tests passed on my chroot. I think numpy 1.22 doesn't break anything.

@mhostetter mhostetter merged commit d7d6988 into mhostetter:master May 26, 2022
@mhostetter mhostetter mentioned this pull request Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
numba compatibility Affects compatibility with Numba numpy compatibility Affects compatibility with NumPy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants