-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: DateOffset args don't end in 's' #36660
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
also raise for nanosecond(s) argument in DateOffset
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.
thanks @GYHHAHA
we might want to test for this. Are there existing test that will emit the warning, for example?
We'll also need a whatsnew note (1.2 I think) under Deprecations
pandas/_libs/tslibs/offsets.pyx
Outdated
if any(not k.endswith('s') for k in kwds_no_nanos): | ||
if 'weekday' not in kwds_no_nanos: | ||
warnings.warn( | ||
"The DateOffset arguments that do not end in 's' replace " |
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'd write Use of Date Offset arguments that do not end with 's' overwrites the offset instead of incrementing it. These arguments are deprecated now and slated for removal in a future version.
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.
Looks better. I will make the change.
Test1:
Test2:
Test3:
Test4 (kwd on argument doesn't end with 's'):
I think these are test relating to this. But I'm not very familiar to handle them. @arw2019 |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
@GYAHHA sorry for not responding here. Can you rebase again and will take another look at test failures |
@GYHHAHA reviving this. I think we should do it. likely need to put |
ok, I will take this. |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
Thanks for the PR, but it appears to have gotten stale. Going to close for now but let us know if you can merge master and update and we'd be happy to reopen. |
Make deprecation DateOffset args don't end in 's'.
Mentioned here