-
Notifications
You must be signed in to change notification settings - Fork 21
add deprecation warning to resample function #180
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
- Coverage 99.56% 93.97% -5.59%
==========================================
Files 7 8 +1
Lines 230 299 +69
==========================================
+ Hits 229 281 +52
- Misses 1 18 +17 |
We could also consider using I think we should also phase the message in a way that indicates why we are deprecating: |
Yes, I agree with @Sparks29032 . Also please specify the future version where it will be removed. Normally two mid-level version bumps later. |
"The 'resample' function is deprecated and will be removed in a future release 3.6.3. \n" | ||
"'resample' has been renamed 'wsinterp' to better reflect functionality. \n" | ||
"Please use 'wsinterp' instead." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. Does this decorator also work in Python 3.12 and 3.11 without failing the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test on that and make a new PR based on the new structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobleesj this deprecated decorator actually is only released for 3.13 so should I use warnings.warn instead? @Sparks29032
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's a new feature for 3.13.
If it doesn't work for 3.11 and 3.12, then I suggest we should not use this decorator since then 3.11 and 3.12 users won't be able to read this warning msg. tagging @sbillinge for his opinion too.
Also, since this is a public facing PR, why is it being closed? |
@bobleesj I wanted to make a new PR since this was before the major reconstruction simon made |
@alisnwu If it doesn't work, then we can use https://numpydoc.readthedocs.io/en/latest/format.html#deprecation-warning |
closes #139
Only adding a deprecation warning as per discussion with @Sparks29032 in #145
Warning looks like this:

@sbillinge ready for review