lmfit / asteval

minimalistic evaluator of python expression using ast module
https://lmfit.github.io/asteval
MIT License
176 stars 41 forks source link

Add deprecations for numpy 2.0 #122

Closed eendebakpt closed 11 months ago

eendebakpt commented 11 months ago

In this PR we add four attributes that have been deprecated in numpy 2.0. Three out of the four have already been deprecated before, but are not selected because the statement if int(numpy_version[0]) == 1 and int(numpy_version[1]) >= 20 is false for numpy 2.0.

Numpy 2.0 is scheduled to be released end of 2023, see https://github.com/numpy/numpy/issues/24300

codecov-commenter commented 11 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (ecfcbeb) 95.42% compared to head (53aaacc) 95.39%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #122 +/- ## ========================================== - Coverage 95.42% 95.39% -0.04% ========================================== Files 5 5 Lines 2775 2777 +2 ========================================== + Hits 2648 2649 +1 - Misses 127 128 +1 ``` | [Files](https://app.codecov.io/gh/newville/asteval/pull/122?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matt+Newville) | Coverage Δ | | |---|---|---| | [asteval/astutils.py](https://app.codecov.io/gh/newville/asteval/pull/122?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matt+Newville#diff-YXN0ZXZhbC9hc3R1dGlscy5weQ==) | `92.44% <50.00%> (-0.25%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

newville commented 11 months ago

@eendebakpt Thanks! I will just merge this -- If I understand correctly, numpy 2.0 is a few months away. For us here, that means no one can really be expecting us to provide a stable interface to it, and we can deprecate anything we want ;)