-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
DEPR: Deprecate cdate_range and merge into bdate_range #17691
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,3 +240,13 @@ def test_deprecation_access_func(self): | |
[c1, c2], | ||
sort_categories=True, | ||
ignore_order=True) | ||
|
||
|
||
class TestCDateRange(object): | ||
|
||
def test_deprecation_cdaterange(self): | ||
# GH17596 | ||
from pandas.core.indexes.datetimes import cdate_range | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. import from pandas here (we are actually testing the pd. deprecation); in this case they are the same, but its our practice to use the one we are deprecating. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, we are testing this one (the move to top-level pd namespace was only very recently in master, so we don't have to deprecate that. That one we just removed, and we are deprecating the actual nested one) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, ok then; guess we moved this in 0.21.0, so this is fine then. |
||
with tm.assert_produces_warning(FutureWarning, | ||
check_stacklevel=False): | ||
cdate_range('2017-01-01', '2017-12-31') |
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 think if you indent this paragraph, it more 'belongs' to the versionadded directive (although not fully sure how it will look like when rendered)
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 tried indenting and it rendered everything on the same line, i.e. "New in version 0.21.0:
bdate_range
can also...". I changed it back to make it consistent with the other usages of versionadded withintimeseries.rst
and other documentation.