Skip to content

DEP: update version in deprecation warning of interpnd #22099

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

Merged
merged 1 commit into from
Dec 22, 2024

Conversation

j-bowhay
Copy link
Member

@j-bowhay j-bowhay commented Dec 16, 2024

Closes #22097

It was reported that interpolate.interpnd.GradientEstimationWarning etc raised a warning saying they would be removed in 1.14. In fact they were only deprecated in this cycle and the version in the warning was outdated. This pr updates the version number so they can be removed in the next release.

@j-bowhay j-bowhay added scipy.interpolate backport-candidate This fix should be ported by a maintainer to previous SciPy versions. deprecated Items related to behavior that has been deprecated labels Dec 16, 2024
@j-bowhay j-bowhay added this to the 1.16.0 milestone Dec 16, 2024
@j-bowhay j-bowhay modified the milestones: 1.16.0, 1.15.0 Dec 16, 2024
Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this. If it's urgent we can merge this as-is, though I'd like to fix this in a way that we don't forget it again so easily, see suggestion below.

@jorenham
Copy link
Member

jorenham commented Dec 19, 2024

btw, there's a similar deprecation message issue in e.g. ttest_ind, caused by:

message = (f"Arguments {intersection} are deprecated, whether passed "
"by position or keyword. They will be removed in SciPy "
"{version}. ")

(it's the missing f prefix on line 222)

which leads to e.g.

DeprecationWarning: Arguments {'permutations'} are deprecated, whether passed by position or keyword. They will be removed in SciPy {version}. Use ``method`` to perform a permutation test.
  scipy.stats.ttest_ind(permutations=1)

(i.e. the {version} isn't formatted)

@jorenham
Copy link
Member

jorenham commented Dec 19, 2024

oh and the scipy.special.{lpn,lpmn,clpmn} don't warn about being deprecated when used, although they're deprecated in 1.15.0 (at least according to the docstrings)

@j-bowhay
Copy link
Member Author

btw, there's a similar deprecation message issue in e.g. ttest_ind, caused by:

message = (f"Arguments {intersection} are deprecated, whether passed "
"by position or keyword. They will be removed in SciPy "
"{version}. ")

(it's the missing f prefix on line 222)

which leads to e.g.

DeprecationWarning: Arguments {'permutations'} are deprecated, whether passed by position or keyword. They will be removed in SciPy {version}. Use ``method`` to perform a permutation test.
  scipy.stats.ttest_ind(permutations=1)

(i.e. the {version} isn't formatted)

Great spot thanks, has now been fixed.

oh and the scipy.special.{lpn,lpmn,clplm} don't warn about being deprecated when used, although they're deprecated in 1.15.0 (at least according to the docstrings)

@steppi what's the plan here?

@h-vetinari
Copy link
Member

oh and the scipy.special.{lpn,lpmn,clplm} don't warn about being deprecated when used, although they're deprecated in 1.15.0 (at least according to the docstrings)

@steppi what's the plan here?

Could you or @jorenham add a warning? We shouldn't deprecate only in docstrings.

Copy link
Member

@h-vetinari h-vetinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to understand better why we have so many warnings that (before this PR) say that stuff will be removed in 1.14. That means either the warnings were all are wrong, or we missed to remove a lot of stuff.

@jorenham
Copy link
Member

oh and the scipy.special.{lpn,lpmn,clplm} don't warn about being deprecated when used, although they're deprecated in 1.15.0 (at least according to the docstrings)

@steppi what's the plan here?

Could you or @jorenham add a warning? We shouldn't deprecate only in docstrings.

Sure, but I'm not clear which version I should mention that it'll be removed at.

@h-vetinari
Copy link
Member

Look at when the deprecation in the docstring was added (1.15 IIUC?), then add two minor versions (=1.17)

@jorenham
Copy link
Member

Look at when the deprecation in the docstring was added (1.15 IIUC?), then add two minor versions (=1.17)

Ah ok, I wasn't aware that the docstring was added in 1.15, because it looked like it was just forgotten to be removed 🤷🏻

@j-bowhay j-bowhay merged commit a755ee7 into scipy:main Dec 22, 2024
38 checks passed
@j-bowhay
Copy link
Member Author

Thanks for the review @h-vetinari and all the eagle eyed spots @jorenham

tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request Dec 23, 2024
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated Items related to behavior that has been deprecated scipy.interpolate scipy._lib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEP: interpolate.interpnd.GradientEstimationWarning still present in 1.15.0rc1
4 participants