lmfit / asteval

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

Fix numpy 1.24 deprecation warnings #114

Closed eendebakpt closed 1 year ago

eendebakpt commented 1 year ago

In numpy 1.24 a couple of aliases have been deprecated. In this PR we add the deprecated aliases to the list so they are not added to the asteval symbol table (and they do not generate warnings when asteval is used with numpy 1.24).

If these aliases are still in use and we do not want to remove them, we could create a PR what suppresses the warnings during addition for these elements.

@newville

codecov-commenter commented 1 year ago

Codecov Report

Base: 93.40% // Head: 93.40% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (052899a) compared to base (2479279). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #114 +/- ## ======================================= Coverage 93.40% 93.40% ======================================= Files 4 4 Lines 1500 1501 +1 ======================================= + Hits 1401 1402 +1 Misses 99 99 ``` | [Impacted Files](https://codecov.io/gh/newville/asteval/pull/114?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://codecov.io/gh/newville/asteval/pull/114/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matt+Newville#diff-YXN0ZXZhbC9hc3R1dGlscy5weQ==) | `88.46% <100.00%> (+0.07%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matt+Newville). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Matt+Newville)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

newville commented 1 year ago

@eendebakpt Thanks -- yes, let's deprecate those!