Repository: pandas-dev/pandas
Pull request: DEPR: Deprecate passing range-like arguments to DatetimeIndex, TimedeltaIndex
Also `verify_integrity` since allowing that to be False complicates things, and internally if its False we should be using simple_new anyway

- [x] closes #20535
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Problem statement:
API: deprecate range-generating keywords in DatetimeIndex
I was reviewing the PR on the DatetimeIndex docstring, and the list of parameters is horribly complex because you can both use it by passing `data` (with accompanying keywords like `copy`, `dtype`, ..) and by generating a range with optional `start`, `end`, `periods`. 

Since for generating ranges, we have the special purpose `pandas.date_range`, do we need to keep this functionality in the `DatetimeIndex` constructor as well?

Of course deprecating it will annoy people who use it (although I *think* the majority of usage of DatetimeIndex passed `data`), so the question is whether it is worth it.

Hints from issue discussion:
+1. I'd be great to extend this to  `TimedeltaIndex` and `PeriodIndex` as well. 
yep should do this

Commit message: GH reference

Patch to review:
diff --git a/doc/source/whatsnew/v0.24.0.rst b/doc/source/whatsnew/v0.24.0.rst
index 0e38396d156e1..131ca0f2dcd9f 100644
--- a/doc/source/whatsnew/v0.24.0.rst
+++ b/doc/source/whatsnew/v0.24.0.rst
@@ -1046,6 +1046,7 @@ Deprecations
 - The ``keep_tz=False`` option (the default) of the ``keep_tz`` keyword of
   :meth:`DatetimeIndex.to_series` is deprecated (:issue:`17832`).
 - Timezone converting a tz-aware ``datetime.datetime`` or :class:`Timestamp` with :class:`Timestamp` and the ``tz`` argument is now deprecated. Instead, use :meth:`Timestamp.tz_convert` (:issue:`23579`)
+- Creating a :class:`TimedeltaIndex` or :class:`DatetimeIndex` by passing range arguments `start`, `end`, `periods` is deprecated in favor of `timedelta_range` and `date_range` (:issue:`23919`)
 
 .. _whatsnew_0240.deprecations.datetimelike_int_ops:
 
diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py
index 6b66170e978ed..39a58570fecb6 100644
--- a/pandas/core/indexes/datetimes.py
+++ b/pandas/core/indexes/datetimes.py
@@ -221,8 +221,16 @@ def __new__(cls, data=None,
                 dayfirst=False, yearfirst=False, dtype=None,
                 copy=False, name=None, verify_integrity=True):
 
+        if verify_integrity is not True:
+            warnings.warn("The 'verify_integrity' argument is deprecated, "
+                          "will be removed in a future version.",
+                          FutureWarning, stacklevel=2)
+
         if data is None:
-            # TODO: Remove this block and associated kwargs; GH#20535
+            warnings.warn("Creating a DatetimeIndex by passing range "
+                          "endpoints is deprecated.  Use "
+                          "`pandas.date_range` instead.",
+                          FutureWarning, stacklevel=2)
             result = cls._generate_range(start, end, periods,
                                          freq=freq, tz=tz, normalize=normalize,
                                          closed=closed, ambiguous=ambiguous)
@@ -1514,9 +1522,13 @@ def date_range(start=None, end=None, periods=None, freq=None, tz=None,
     if freq is None and com._any_none(periods, start, end):
         freq = 'D'
 
-    return DatetimeIndex(start=start, end=end, periods=periods,
-                         freq=freq, tz=tz, normalize=normalize, name=name,
-                         closed=closed, **kwargs)
+    result = DatetimeIndex._generate_range(
+        start=start, end=end, periods=periods,
+        freq=freq, tz=tz, normalize=normalize,
+        closed=closed, **kwargs)
+
+    result.name = name
+    return result
 
 
 def bdate_range(start=None, end=None, periods=None, freq='B', tz=None,
@@ -1602,9 +1614,9 @@ def bdate_range(start=None, end=None, periods=None, freq='B', tz=None,
                'weekmask are passed, got frequency {freq}').format(freq=freq)
         raise ValueError(msg)
 
-    return DatetimeIndex(start=start, end=end, periods=periods,
-                         freq=freq, tz=tz, normalize=normalize, name=name,
-                         closed=closed, **kwargs)
+    return date_range(start=start, end=end, periods=periods,
+                      freq=freq, tz=tz, normalize=normalize, name=name,
+                      closed=closed, **kwargs)
 
 
 def cdate_range(start=None, end=None, periods=None, freq='C', tz=None,
@@ -1661,9 +1673,10 @@ def cdate_range(start=None, end=None, periods=None, freq='C', tz=None,
         holidays = kwargs.pop('holidays', [])
         weekmask = kwargs.pop('weekmask', 'Mon Tue Wed Thu Fri')
         freq = CDay(holidays=holidays, weekmask=weekmask)
-    return DatetimeIndex(start=start, end=end, periods=periods, freq=freq,
-                         tz=tz, normalize=normalize, name=name,
-                         closed=closed, **kwargs)
+
+    return date_range(start=start, end=end, periods=periods, freq=freq,
+                      tz=tz, normalize=normalize, name=name,
+                      closed=closed, **kwargs)
 
 
 def _time_to_micros(time):
diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py
index 8f50b40a20738..f5721aa3d42e5 100644
--- a/pandas/core/indexes/timedeltas.py
+++ b/pandas/core/indexes/timedeltas.py
@@ -1,5 +1,6 @@
 """ implement the TimedeltaIndex """
 from datetime import datetime
+import warnings
 
 import numpy as np
 
@@ -131,10 +132,18 @@ def __new__(cls, data=None, unit=None, freq=None, start=None, end=None,
                 periods=None, closed=None, dtype=None, copy=False,
                 name=None, verify_integrity=True):
 
+        if verify_integrity is not True:
+            warnings.warn("The 'verify_integrity' argument is deprecated, "
+                          "will be removed in a future version.",
+                          FutureWarning, stacklevel=2)
+
         freq, freq_infer = dtl.maybe_infer_freq(freq)
 
         if data is None:
-            # TODO: Remove this block and associated kwargs; GH#20535
+            warnings.warn("Creating a TimedeltaIndex by passing range "
+                          "endpoints is deprecated.  Use "
+                          "`pandas.timedelta_range` instead.",
+                          FutureWarning, stacklevel=2)
             result = cls._generate_range(start, end, periods, freq,
                                          closed=closed)
             result.name = name
@@ -727,5 +736,8 @@ def timedelta_range(start=None, end=None, periods=None, freq=None,
     if freq is None and com._any_none(periods, start, end):
         freq = 'D'
 
-    return TimedeltaIndex(start=start, end=end, periods=periods,
-                          freq=freq, name=name, closed=closed)
+    freq, freq_infer = dtl.maybe_infer_freq(freq)
+    result = TimedeltaIndex._generate_range(start, end, periods, freq,
+                                            closed=closed)
+    result.name = name
+    return result
diff --git a/pandas/core/resample.py b/pandas/core/resample.py
index 125b441e5558a..370bab9b9e73a 100644
--- a/pandas/core/resample.py
+++ b/pandas/core/resample.py
@@ -1375,11 +1375,11 @@ def _get_time_bins(self, ax):
         # because replace() will swallow the nanosecond part
         # thus last bin maybe slightly before the end if the end contains
         # nanosecond part and lead to `Values falls after last bin` error
-        binner = labels = DatetimeIndex(freq=self.freq,
-                                        start=first,
-                                        end=last,
-                                        tz=tz,
-                                        name=ax.name)
+        binner = labels = date_range(freq=self.freq,
+                                     start=first,
+                                     end=last,
+                                     tz=tz,
+                                     name=ax.name)
 
         # GH 15549
         # In edge case of tz-aware resapmling binner last index can be
diff --git a/pandas/tests/frame/test_indexing.py b/pandas/tests/frame/test_indexing.py
index b41d432cea7ca..de810a656c3ea 100644
--- a/pandas/tests/frame/test_indexing.py
+++ b/pandas/tests/frame/test_indexing.py
@@ -647,7 +647,7 @@ def test_setitem_boolean_column(self):
 
     def test_frame_setitem_timestamp(self):
         # GH#2155
-        columns = DatetimeIndex(start='1/1/2012', end='2/1/2012', freq=BDay())
+        columns = date_range(start='1/1/2012', end='2/1/2012', freq=BDay())
         index = lrange(10)
         data = DataFrame(columns=columns, index=index)
         t = datetime(2012, 11, 1)
diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py
index e92e5a70b263f..d5147790a66a1 100644
--- a/pandas/tests/groupby/test_groupby.py
+++ b/pandas/tests/groupby/test_groupby.py
@@ -8,7 +8,7 @@
 
 from pandas import (date_range, Timestamp,
                     Index, MultiIndex, DataFrame, Series,
-                    Panel, DatetimeIndex, read_csv)
+                    Panel, read_csv)
 from pandas.errors import PerformanceWarning
 from pandas.util.testing import (assert_frame_equal,
                                  assert_series_equal, assert_almost_equal)
@@ -1438,7 +1438,7 @@ def test_groupby_sort_multiindex_series():
 def test_groupby_reindex_inside_function():
 
     periods = 1000
-    ind = DatetimeIndex(start='2012/1/1', freq='5min', periods=periods)
+    ind = date_range(start='2012/1/1', freq='5min', periods=periods)
     df = DataFrame({'high': np.arange(
         periods), 'low': np.arange(periods)}, index=ind)
 
diff --git a/pandas/tests/groupby/test_timegrouper.py b/pandas/tests/groupby/test_timegrouper.py
index 23b51b93d6a72..183ccfb5182a2 100644
--- a/pandas/tests/groupby/test_timegrouper.py
+++ b/pandas/tests/groupby/test_timegrouper.py
@@ -9,7 +9,7 @@
 
 import pandas as pd
 from pandas import (DataFrame, date_range, Index,
-                    Series, MultiIndex, Timestamp, DatetimeIndex)
+                    Series, MultiIndex, Timestamp)
 from pandas.core.groupby.ops import BinGrouper
 from pandas.compat import StringIO
 from pandas.util import testing as tm
@@ -374,9 +374,9 @@ def sumfunc_value(x):
                             expected.reset_index(drop=True))
 
     def test_groupby_groups_datetimeindex(self):
-        # #1430
+        # GH#1430
         periods = 1000
-        ind = DatetimeIndex(start='2012/1/1', freq='5min', periods=periods)
+        ind = pd.date_range(start='2012/1/1', freq='5min', periods=periods)
         df = DataFrame({'high': np.arange(periods),
                         'low': np.arange(periods)}, index=ind)
         grouped = df.groupby(lambda x: datetime(x.year, x.month, x.day))
@@ -385,7 +385,7 @@ def test_groupby_groups_datetimeindex(self):
         groups = grouped.groups
         assert isinstance(list(groups.keys())[0], datetime)
 
-        # GH 11442
+        # GH#11442
         index = pd.date_range('2015/01/01', periods=5, name='date')
         df = pd.DataFrame({'A': [5, 6, 7, 8, 9],
                            'B': [1, 2, 3, 4, 5]}, index=index)
diff --git a/pandas/tests/indexes/datetimes/test_construction.py b/pandas/tests/indexes/datetimes/test_construction.py
index 02755c7e58a1d..0adf31f65a1f3 100644
--- a/pandas/tests/indexes/datetimes/test_construction.py
+++ b/pandas/tests/indexes/datetimes/test_construction.py
@@ -314,10 +314,11 @@ def test_constructor_coverage(self):
 
         msg = 'periods must be a number, got foo'
         with pytest.raises(TypeError, match=msg):
-            DatetimeIndex(start='1/1/2000', periods='foo', freq='D')
+            date_range(start='1/1/2000', periods='foo', freq='D')
 
-        pytest.raises(ValueError, DatetimeIndex, start='1/1/2000',
-                      end='1/10/2000')
+        with pytest.raises(ValueError):
+            with tm.assert_produces_warning(FutureWarning):
+                DatetimeIndex(start='1/1/2000', end='1/10/2000')
 
         with pytest.raises(TypeError):
             DatetimeIndex('1/1/2000')
@@ -351,11 +352,11 @@ def test_constructor_coverage(self):
         pytest.raises(ValueError, DatetimeIndex,
                       ['2000-01-01', '2000-01-02', '2000-01-04'], freq='D')
 
-        pytest.raises(ValueError, DatetimeIndex, start='2011-01-01',
+        pytest.raises(ValueError, date_range, start='2011-01-01',
                       freq='b')
-        pytest.raises(ValueError, DatetimeIndex, end='2011-01-01',
+        pytest.raises(ValueError, date_range, end='2011-01-01',
                       freq='B')
-        pytest.raises(ValueError, DatetimeIndex, periods=10, freq='D')
+        pytest.raises(ValueError, date_range, periods=10, freq='D')
 
     @pytest.mark.parametrize('freq', ['AS', 'W-SUN'])
     def test_constructor_datetime64_tzformat(self, freq):
@@ -436,8 +437,8 @@ def test_constructor_dtype(self):
         tm.assert_index_equal(idx, result)
 
     def test_constructor_name(self):
-        idx = DatetimeIndex(start='2000-01-01', periods=1, freq='A',
-                            name='TEST')
+        idx = date_range(start='2000-01-01', periods=1, freq='A',
+                         name='TEST')
         assert idx.name == 'TEST'
 
     def test_000constructor_resolution(self):
@@ -460,7 +461,7 @@ def test_constructor_start_end_with_tz(self, tz):
         # GH 18595
         start = Timestamp('2013-01-01 06:00:00', tz='America/Los_Angeles')
         end = Timestamp('2013-01-02 06:00:00', tz='America/Los_Angeles')
-        result = DatetimeIndex(freq='D', start=start, end=end, tz=tz)
+        result = date_range(freq='D', start=start, end=end, tz=tz)
         expected = DatetimeIndex(['2013-01-01 06:00:00',
                                   '2013-01-02 06:00:00'],
                                  tz='America/Los_Angeles')
@@ -576,7 +577,7 @@ def test_ctor_str_intraday(self):
         assert rng[0].second == 1
 
     def test_is_(self):
-        dti = DatetimeIndex(start='1/1/2005', end='12/1/2005', freq='M')
+        dti = date_range(start='1/1/2005', end='12/1/2005', freq='M')
         assert dti.is_(dti)
         assert dti.is_(dti.view())
         assert not dti.is_(dti.copy())
@@ -604,12 +605,12 @@ def test_constructor_int64_nocopy(self):
     @pytest.mark.parametrize('freq', ['M', 'Q', 'A', 'D', 'B', 'BH',
                                       'T', 'S', 'L', 'U', 'H', 'N', 'C'])
     def test_from_freq_recreate_from_data(self, freq):
-        org = DatetimeIndex(start='2001/02/01 09:00', freq=freq, periods=1)
+        org = date_range(start='2001/02/01 09:00', freq=freq, periods=1)
         idx = DatetimeIndex(org, freq=freq)
         tm.assert_index_equal(idx, org)
 
-        org = DatetimeIndex(start='2001/02/01 09:00', freq=freq,
-                            tz='US/Pacific', periods=1)
+        org = date_range(start='2001/02/01 09:00', freq=freq,
+                         tz='US/Pacific', periods=1)
         idx = DatetimeIndex(org, freq=freq, tz='US/Pacific')
         tm.assert_index_equal(idx, org)
 
@@ -648,30 +649,30 @@ def test_datetimeindex_constructor_misc(self):
 
         sdate = datetime(1999, 12, 25)
         edate = datetime(2000, 1, 1)
-        idx = DatetimeIndex(start=sdate, freq='1B', periods=20)
+        idx = date_range(start=sdate, freq='1B', periods=20)
         assert len(idx) == 20
         assert idx[0] == sdate + 0 * offsets.BDay()
         assert idx.freq == 'B'
 
-        idx = DatetimeIndex(end=edate, freq=('D', 5), periods=20)
+        idx = date_range(end=edate, freq=('D', 5), periods=20)
         assert len(idx) == 20
         assert idx[-1] == edate
         assert idx.freq == '5D'
 
-        idx1 = DatetimeIndex(start=sdate, end=edate, freq='W-SUN')
-        idx2 = DatetimeIndex(start=sdate, end=edate,
-                             freq=offsets.Week(weekday=6))
+        idx1 = date_range(start=sdate, end=edate, freq='W-SUN')
+        idx2 = date_range(start=sdate, end=edate,
+                          freq=offsets.Week(weekday=6))
         assert len(idx1) == len(idx2)
         assert idx1.freq == idx2.freq
 
-        idx1 = DatetimeIndex(start=sdate, end=edate, freq='QS')
-        idx2 = DatetimeIndex(start=sdate, end=edate,
-                             freq=offsets.QuarterBegin(startingMonth=1))
+        idx1 = date_range(start=sdate, end=edate, freq='QS')
+        idx2 = date_range(start=sdate, end=edate,
+                          freq=offsets.QuarterBegin(startingMonth=1))
         assert len(idx1) == len(idx2)
         assert idx1.freq == idx2.freq
 
-        idx1 = DatetimeIndex(start=sdate, end=edate, freq='BQ')
-        idx2 = DatetimeIndex(start=sdate, end=edate,
-                             freq=offsets.BQuarterEnd(startingMonth=12))
+        idx1 = date_range(start=sdate, end=edate, freq='BQ')
+        idx2 = date_range(start=sdate, end=edate,
+                          freq=offsets.BQuarterEnd(startingMonth=12))
         assert len(idx1) == len(idx2)
         assert idx1.freq == idx2.freq
diff --git a/pandas/tests/indexes/datetimes/test_date_range.py b/pandas/tests/indexes/datetimes/test_date_range.py
index 06b52dfc407cf..54a04ab6f80fd 100644
--- a/pandas/tests/indexes/datetimes/test_date_range.py
+++ b/pandas/tests/indexes/datetimes/test_date_range.py
@@ -561,10 +561,10 @@ def test_3(self):
         assert rng == expected
 
     def test_precision_finer_than_offset(self):
-        # GH 9907
-        result1 = DatetimeIndex(start='2015-04-15 00:00:03',
+        # GH#9907
+        result1 = pd.date_range(start='2015-04-15 00:00:03',
                                 end='2016-04-22 00:00:00', freq='Q')
-        result2 = DatetimeIndex(start='2015-04-15 00:00:03',
+        result2 = pd.date_range(start='2015-04-15 00:00:03',
                                 end='2015-06-22 00:00:04', freq='W')
         expected1_list = ['2015-06-30 00:00:03', '2015-09-30 00:00:03',
                           '2015-12-31 00:00:03', '2016-03-31 00:00:03']
@@ -594,7 +594,7 @@ def test_mismatching_tz_raises_err(self, start, end):
         with pytest.raises(TypeError):
             pd.date_range(start, end)
         with pytest.raises(TypeError):
-            pd.DatetimeIndex(start, end, freq=BDay())
+            pd.date_range(start, end, freq=BDay())
 
     def test_CalendarDay_range_with_dst_crossing(self):
         # GH 20596
diff --git a/pandas/tests/indexes/datetimes/test_datetime.py b/pandas/tests/indexes/datetimes/test_datetime.py
index 4363777d25235..c338026025767 100644
--- a/pandas/tests/indexes/datetimes/test_datetime.py
+++ b/pandas/tests/indexes/datetimes/test_datetime.py
@@ -100,10 +100,10 @@ def test_hash_error(self):
             hash(index)
 
     def test_stringified_slice_with_tz(self):
-        # GH2658
+        # GH#2658
         import datetime
         start = datetime.datetime.now()
-        idx = DatetimeIndex(start=start, freq="1d", periods=10)
+        idx = date_range(start=start, freq="1d", periods=10)
         df = DataFrame(lrange(10), index=idx)
         df["2013-01-14 23:44:34.437768-05:00":]  # no exception here
 
@@ -293,8 +293,8 @@ def test_ns_index(self):
         index = pd.DatetimeIndex(dt, freq=freq, name='time')
         self.assert_index_parameters(index)
 
-        new_index = pd.DatetimeIndex(start=index[0], end=index[-1],
-                                     freq=index.freq)
+        new_index = pd.date_range(start=index[0], end=index[-1],
+                                  freq=index.freq)
         self.assert_index_parameters(new_index)
 
     def test_join_with_period_index(self, join_type):
diff --git a/pandas/tests/indexes/datetimes/test_formats.py b/pandas/tests/indexes/datetimes/test_formats.py
index d8e4104919e55..df0a5742e7a49 100644
--- a/pandas/tests/indexes/datetimes/test_formats.py
+++ b/pandas/tests/indexes/datetimes/test_formats.py
@@ -11,7 +11,7 @@
 
 
 def test_to_native_types():
-    index = DatetimeIndex(freq='1D', periods=3, start='2017-01-01')
+    index = pd.date_range(freq='1D', periods=3, start='2017-01-01')
 
     # First, with no arguments.
     expected = np.array(['2017-01-01', '2017-01-02',
diff --git a/pandas/tests/indexes/datetimes/test_indexing.py b/pandas/tests/indexes/datetimes/test_indexing.py
index f75b5867e1511..944c925dabe3e 100644
--- a/pandas/tests/indexes/datetimes/test_indexing.py
+++ b/pandas/tests/indexes/datetimes/test_indexing.py
@@ -198,7 +198,7 @@ def test_take2(self, tz):
         dates = [datetime(2010, 1, 1, 14), datetime(2010, 1, 1, 15),
                  datetime(2010, 1, 1, 17), datetime(2010, 1, 1, 21)]
 
-        idx = DatetimeIndex(start='2010-01-01 09:00',
+        idx = pd.date_range(start='2010-01-01 09:00',
                             end='2010-02-01 09:00', freq='H', tz=tz,
                             name='idx')
         expected = DatetimeIndex(dates, freq=None, name='idx', tz=tz)
diff --git a/pandas/tests/indexes/datetimes/test_misc.py b/pandas/tests/indexes/datetimes/test_misc.py
index 6d6f13bb763f6..8d9f496b70079 100644
--- a/pandas/tests/indexes/datetimes/test_misc.py
+++ b/pandas/tests/indexes/datetimes/test_misc.py
@@ -23,8 +23,8 @@ def test_pass_datetimeindex_to_index(self):
         tm.assert_numpy_array_equal(idx.values, expected.values)
 
     def test_range_edges(self):
-        # GH 13672
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:00.000000001'),
+        # GH#13672
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:00.000000001'),
                             end=Timestamp('1970-01-01 00:00:00.000000004'),
                             freq='N')
         exp = DatetimeIndex(['1970-01-01 00:00:00.000000001',
@@ -33,19 +33,19 @@ def test_range_edges(self):
                              '1970-01-01 00:00:00.000000004'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:00.000000004'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:00.000000004'),
                             end=Timestamp('1970-01-01 00:00:00.000000001'),
                             freq='N')
         exp = DatetimeIndex([])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:00.000000001'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:00.000000001'),
                             end=Timestamp('1970-01-01 00:00:00.000000001'),
                             freq='N')
         exp = DatetimeIndex(['1970-01-01 00:00:00.000000001'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:00.000001'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:00.000001'),
                             end=Timestamp('1970-01-01 00:00:00.000004'),
                             freq='U')
         exp = DatetimeIndex(['1970-01-01 00:00:00.000001',
@@ -54,7 +54,7 @@ def test_range_edges(self):
                              '1970-01-01 00:00:00.000004'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:00.001'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:00.001'),
                             end=Timestamp('1970-01-01 00:00:00.004'),
                             freq='L')
         exp = DatetimeIndex(['1970-01-01 00:00:00.001',
@@ -63,25 +63,25 @@ def test_range_edges(self):
                              '1970-01-01 00:00:00.004'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:00:01'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:00:01'),
                             end=Timestamp('1970-01-01 00:00:04'), freq='S')
         exp = DatetimeIndex(['1970-01-01 00:00:01', '1970-01-01 00:00:02',
                              '1970-01-01 00:00:03', '1970-01-01 00:00:04'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 00:01'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 00:01'),
                             end=Timestamp('1970-01-01 00:04'), freq='T')
         exp = DatetimeIndex(['1970-01-01 00:01', '1970-01-01 00:02',
                              '1970-01-01 00:03', '1970-01-01 00:04'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01 01:00'),
+        idx = pd.date_range(start=Timestamp('1970-01-01 01:00'),
                             end=Timestamp('1970-01-01 04:00'), freq='H')
         exp = DatetimeIndex(['1970-01-01 01:00', '1970-01-01 02:00',
                              '1970-01-01 03:00', '1970-01-01 04:00'])
         tm.assert_index_equal(idx, exp)
 
-        idx = DatetimeIndex(start=Timestamp('1970-01-01'),
+        idx = pd.date_range(start=Timestamp('1970-01-01'),
                             end=Timestamp('1970-01-04'), freq='D')
         exp = DatetimeIndex(['1970-01-01', '1970-01-02',
                              '1970-01-03', '1970-01-04'])
@@ -91,10 +91,10 @@ def test_range_edges(self):
 class TestDatetime64(object):
 
     def test_datetimeindex_accessors(self):
-        dti_naive = DatetimeIndex(freq='D', start=datetime(1998, 1, 1),
+        dti_naive = pd.date_range(freq='D', start=datetime(1998, 1, 1),
                                   periods=365)
-        # GH 13303
-        dti_tz = DatetimeIndex(freq='D', start=datetime(1998, 1, 1),
+        # GH#13303
+        dti_tz = pd.date_range(freq='D', start=datetime(1998, 1, 1),
                                periods=365, tz='US/Eastern')
         for dti in [dti_naive, dti_tz]:
 
@@ -179,7 +179,7 @@ def test_datetimeindex_accessors(self):
             exp = DatetimeIndex([], freq='D', tz=dti.tz, name='name')
             tm.assert_index_equal(res, exp)
 
-        dti = DatetimeIndex(freq='BQ-FEB', start=datetime(1998, 1, 1),
+        dti = pd.date_range(freq='BQ-FEB', start=datetime(1998, 1, 1),
                             periods=4)
 
         assert sum(dti.is_quarter_start) == 0
@@ -260,8 +260,8 @@ def test_datetime_name_accessors(self, time_locale):
                 expected_days = calendar.day_name[:]
                 expected_months = calendar.month_name[1:]
 
-        # GH 11128
-        dti = DatetimeIndex(freq='D', start=datetime(1998, 1, 1),
+        # GH#11128
+        dti = pd.date_range(freq='D', start=datetime(1998, 1, 1),
                             periods=365)
         english_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
                         'Friday', 'Saturday', 'Sunday']
@@ -281,8 +281,8 @@ def test_datetime_name_accessors(self, time_locale):
         ts = Timestamp(pd.NaT)
         assert np.isnan(ts.day_name(locale=time_locale))
 
-        # GH 12805
-        dti = DatetimeIndex(freq='M', start='2012', end='2013')
+        # GH#12805
+        dti = pd.date_range(freq='M', start='2012', end='2013')
         result = dti.month_name(locale=time_locale)
         expected = Index([month.capitalize() for month in expected_months])
 
diff --git a/pandas/tests/indexes/datetimes/test_ops.py b/pandas/tests/indexes/datetimes/test_ops.py
index d599af6180bfb..4be4372f65dcc 100644
--- a/pandas/tests/indexes/datetimes/test_ops.py
+++ b/pandas/tests/indexes/datetimes/test_ops.py
@@ -535,9 +535,8 @@ def test_shift(self):
             assert shifted[0] == rng[0] + CDay()
 
     def test_shift_periods(self):
-        # GH #22458 : argument 'n' was deprecated in favor of 'periods'
-        idx = pd.DatetimeIndex(start=START, end=END,
-                               periods=3)
+        # GH#22458 : argument 'n' was deprecated in favor of 'periods'
+        idx = pd.date_range(start=START, end=END, periods=3)
         tm.assert_index_equal(idx.shift(periods=0), idx)
         tm.assert_index_equal(idx.shift(0), idx)
         with tm.assert_produces_warning(FutureWarning,
diff --git a/pandas/tests/indexes/datetimes/test_partial_slicing.py b/pandas/tests/indexes/datetimes/test_partial_slicing.py
index e6e19c6a8200d..acb6a559c1b51 100644
--- a/pandas/tests/indexes/datetimes/test_partial_slicing.py
+++ b/pandas/tests/indexes/datetimes/test_partial_slicing.py
@@ -15,7 +15,7 @@
 
 class TestSlicing(object):
     def test_dti_slicing(self):
-        dti = DatetimeIndex(start='1/1/2005', end='12/1/2005', freq='M')
+        dti = date_range(start='1/1/2005', end='12/1/2005', freq='M')
         dti2 = dti[[1, 3, 5]]
 
         v1 = dti2[0]
@@ -74,8 +74,8 @@ def test_slice_with_zero_step_raises(self):
             ts.loc[::0]
 
     def test_slice_bounds_empty(self):
-        # GH 14354
-        empty_idx = DatetimeIndex(freq='1H', periods=0, end='2015')
+        # GH#14354
+        empty_idx = date_range(freq='1H', periods=0, end='2015')
 
         right = empty_idx._maybe_cast_slice_bound('2015-01-02', 'right', 'loc')
         exp = Timestamp('2015-01-02 23:59:59.999999999')
@@ -114,7 +114,7 @@ def test_monotone_DTI_indexing_bug(self):
         tm.assert_frame_equal(df.loc['2017-01-03'], expected)
 
     def test_slice_year(self):
-        dti = DatetimeIndex(freq='B', start=datetime(2005, 1, 1), periods=500)
+        dti = date_range(freq='B', start=datetime(2005, 1, 1), periods=500)
 
         s = Series(np.arange(len(dti)), index=dti)
         result = s['2005']
@@ -133,7 +133,7 @@ def test_slice_year(self):
         assert result == expected
 
     def test_slice_quarter(self):
-        dti = DatetimeIndex(freq='D', start=datetime(2000, 6, 1), periods=500)
+        dti = date_range(freq='D', start=datetime(2000, 6, 1), periods=500)
 
         s = Series(np.arange(len(dti)), index=dti)
         assert len(s['2001Q1']) == 90
@@ -142,7 +142,7 @@ def test_slice_quarter(self):
         assert len(df.loc['1Q01']) == 90
 
     def test_slice_month(self):
-        dti = DatetimeIndex(freq='D', start=datetime(2005, 1, 1), periods=500)
+        dti = date_range(freq='D', start=datetime(2005, 1, 1), periods=500)
         s = Series(np.arange(len(dti)), index=dti)
         assert len(s['2005-11']) == 30
 
@@ -152,7 +152,7 @@ def test_slice_month(self):
         tm.assert_series_equal(s['2005-11'], s['11-2005'])
 
     def test_partial_slice(self):
-        rng = DatetimeIndex(freq='D', start=datetime(2005, 1, 1), periods=500)
+        rng = date_range(freq='D', start=datetime(2005, 1, 1), periods=500)
         s = Series(np.arange(len(rng)), index=rng)
 
         result = s['2005-05':'2006-02']
@@ -173,7 +173,7 @@ def test_partial_slice(self):
         pytest.raises(Exception, s.__getitem__, '2004-12-31')
 
     def test_partial_slice_daily(self):
-        rng = DatetimeIndex(freq='H', start=datetime(2005, 1, 31), periods=500)
+        rng = date_range(freq='H', start=datetime(2005, 1, 31), periods=500)
         s = Series(np.arange(len(rng)), index=rng)
 
         result = s['2005-1-31']
@@ -182,8 +182,8 @@ def test_partial_slice_daily(self):
         pytest.raises(Exception, s.__getitem__, '2004-12-31 00')
 
     def test_partial_slice_hourly(self):
-        rng = DatetimeIndex(freq='T', start=datetime(2005, 1, 1, 20, 0, 0),
-                            periods=500)
+        rng = date_range(freq='T', start=datetime(2005, 1, 1, 20, 0, 0),
+                         periods=500)
         s = Series(np.arange(len(rng)), index=rng)
 
         result = s['2005-1-1']
@@ -196,8 +196,8 @@ def test_partial_slice_hourly(self):
         pytest.raises(Exception, s.__getitem__, '2004-12-31 00:15')
 
     def test_partial_slice_minutely(self):
-        rng = DatetimeIndex(freq='S', start=datetime(2005, 1, 1, 23, 59, 0),
-                            periods=500)
+        rng = date_range(freq='S', start=datetime(2005, 1, 1, 23, 59, 0),
+                         periods=500)
         s = Series(np.arange(len(rng)), index=rng)
 
         result = s['2005-1-1 23:59']
@@ -210,8 +210,8 @@ def test_partial_slice_minutely(self):
         pytest.raises(Exception, s.__getitem__, '2004-12-31 00:00:00')
 
     def test_partial_slice_second_precision(self):
-        rng = DatetimeIndex(start=datetime(2005, 1, 1, 0, 0, 59,
-                                           microsecond=999990),
+        rng = date_range(start=datetime(2005, 1, 1, 0, 0, 59,
+                                        microsecond=999990),
                             periods=20, freq='US')
         s = Series(np.arange(20), rng)
 
diff --git a/pandas/tests/indexes/datetimes/test_scalar_compat.py b/pandas/tests/indexes/datetimes/test_scalar_compat.py
index eb4169639482f..680eddd27cf9f 100644
--- a/pandas/tests/indexes/datetimes/test_scalar_compat.py
+++ b/pandas/tests/indexes/datetimes/test_scalar_compat.py
@@ -184,7 +184,7 @@ def test_ceil_floor_edge(self, test_input, rounder, freq, expected):
         '12H', '1D',
     ])
     def test_round_int64(self, start, index_freq, periods, round_freq):
-        dt = DatetimeIndex(start=start, freq=index_freq, periods=periods)
+        dt = date_range(start=start, freq=index_freq, periods=periods)
         unit = to_offset(round_freq).nanos
 
         # test floor
diff --git a/pandas/tests/indexes/datetimes/test_setops.py b/pandas/tests/indexes/datetimes/test_setops.py
index 7c1f753dbeaaa..1f7a2eee75750 100644
--- a/pandas/tests/indexes/datetimes/test_setops.py
+++ b/pandas/tests/indexes/datetimes/test_setops.py
@@ -114,7 +114,7 @@ def test_union_dataframe_index(self):
 
     def test_union_with_DatetimeIndex(self):
         i1 = Int64Index(np.arange(0, 20, 2))
-        i2 = DatetimeIndex(start='2012-01-03 00:00:00', periods=10, freq='D')
+        i2 = date_range(start='2012-01-03 00:00:00', periods=10, freq='D')
         i1.union(i2)  # Works
         i2.union(i1)  # Fails with "AttributeError: can't set attribute"
 
@@ -253,14 +253,14 @@ def test_difference_freq(self, sort):
 
     @pytest.mark.parametrize("sort", [True, False])
     def test_datetimeindex_diff(self, sort):
-        dti1 = DatetimeIndex(freq='Q-JAN', start=datetime(1997, 12, 31),
-                             periods=100)
-        dti2 = DatetimeIndex(freq='Q-JAN', start=datetime(1997, 12, 31),
-                             periods=98)
+        dti1 = date_range(freq='Q-JAN', start=datetime(1997, 12, 31),
+                          periods=100)
+        dti2 = date_range(freq='Q-JAN', start=datetime(1997, 12, 31),
+                          periods=98)
         assert len(dti1.difference(dti2, sort)) == 2
 
     def test_datetimeindex_union_join_empty(self):
-        dti = DatetimeIndex(start='1/1/2001', end='2/1/2001', freq='D')
+        dti = date_range(start='1/1/2001', end='2/1/2001', freq='D')
         empty = Index([])
 
         result = dti.union(empty)
diff --git a/pandas/tests/indexes/datetimes/test_timezones.py b/pandas/tests/indexes/datetimes/test_timezones.py
index 52f4f3c309038..8c7d20684fd8c 100644
--- a/pandas/tests/indexes/datetimes/test_timezones.py
+++ b/pandas/tests/indexes/datetimes/test_timezones.py
@@ -392,11 +392,11 @@ def test_dti_tz_localize_pass_dates_to_utc(self, tzstr):
     @pytest.mark.parametrize('prefix', ['', 'dateutil/'])
     def test_dti_tz_localize(self, prefix):
         tzstr = prefix + 'US/Eastern'
-        dti = DatetimeIndex(start='1/1/2005', end='1/1/2005 0:00:30.256',
+        dti = pd.date_range(start='1/1/2005', end='1/1/2005 0:00:30.256',
                             freq='L')
         dti2 = dti.tz_localize(tzstr)
 
-        dti_utc = DatetimeIndex(start='1/1/2005 05:00',
+        dti_utc = pd.date_range(start='1/1/2005 05:00',
                                 end='1/1/2005 5:00:30.256', freq='L', tz='utc')
 
         tm.assert_numpy_array_equal(dti2.values, dti_utc.values)
@@ -404,12 +404,12 @@ def test_dti_tz_localize(self, prefix):
         dti3 = dti2.tz_convert(prefix + 'US/Pacific')
         tm.assert_numpy_array_equal(dti3.values, dti_utc.values)
 
-        dti = DatetimeIndex(start='11/6/2011 1:59', end='11/6/2011 2:00',
+        dti = pd.date_range(start='11/6/2011 1:59', end='11/6/2011 2:00',
                             freq='L')
         with pytest.raises(pytz.AmbiguousTimeError):
             dti.tz_localize(tzstr)
 
-        dti = DatetimeIndex(start='3/13/2011 1:59', end='3/13/2011 2:00',
+        dti = pd.date_range(start='3/13/2011 1:59', end='3/13/2011 2:00',
                             freq='L')
         with pytest.raises(pytz.NonExistentTimeError):
             dti.tz_localize(tzstr)
@@ -721,7 +721,7 @@ def test_dti_tz_constructors(self, tzstr):
         arr = ['11/10/2005 08:00:00', '11/10/2005 09:00:00']
 
         idx1 = to_datetime(arr).tz_localize(tzstr)
-        idx2 = DatetimeIndex(start="2005-11-10 08:00:00", freq='H', periods=2,
+        idx2 = pd.date_range(start="2005-11-10 08:00:00", freq='H', periods=2,
                              tz=tzstr)
         idx3 = DatetimeIndex(arr, tz=tzstr)
         idx4 = DatetimeIndex(np.array(arr), tz=tzstr)
diff --git a/pandas/tests/indexes/period/test_indexing.py b/pandas/tests/indexes/period/test_indexing.py
index c92769311d848..aaa1126e92f3d 100644
--- a/pandas/tests/indexes/period/test_indexing.py
+++ b/pandas/tests/indexes/period/test_indexing.py
@@ -136,8 +136,8 @@ def test_getitem_list_periods(self):
         tm.assert_series_equal(ts[[Period('2012-01-02', freq='D')]], exp)
 
     def test_getitem_seconds(self):
-        # GH 6716
-        didx = DatetimeIndex(start='2013/01/01 09:00:00', freq='S',
+        # GH#6716
+        didx = pd.date_range(start='2013/01/01 09:00:00', freq='S',
                              periods=4000)
         pidx = PeriodIndex(start='2013/01/01 09:00:00', freq='S', periods=4000)
 
@@ -160,9 +160,9 @@ def test_getitem_seconds(self):
                 tm.assert_series_equal(s[d], s)
 
     def test_getitem_day(self):
-        # GH 6716
+        # GH#6716
         # Confirm DatetimeIndex and PeriodIndex works identically
-        didx = DatetimeIndex(start='2013/01/01', freq='D', periods=400)
+        didx = pd.date_range(start='2013/01/01', freq='D', periods=400)
         pidx = PeriodIndex(start='2013/01/01', freq='D', periods=400)
 
         for idx in [didx, pidx]:
diff --git a/pandas/tests/indexes/period/test_partial_slicing.py b/pandas/tests/indexes/period/test_partial_slicing.py
index 137a7be987d5b..23348f6241ddf 100644
--- a/pandas/tests/indexes/period/test_partial_slicing.py
+++ b/pandas/tests/indexes/period/test_partial_slicing.py
@@ -63,8 +63,8 @@ def test_pindex_slice_index(self):
         tm.assert_series_equal(res, exp)
 
     def test_range_slice_day(self):
-        # GH 6716
-        didx = DatetimeIndex(start='2013/01/01', freq='D', periods=400)
+        # GH#6716
+        didx = pd.date_range(start='2013/01/01', freq='D', periods=400)
         pidx = PeriodIndex(start='2013/01/01', freq='D', periods=400)
 
         for idx in [didx, pidx]:
@@ -88,8 +88,8 @@ def test_range_slice_day(self):
                     idx[v:]
 
     def test_range_slice_seconds(self):
-        # GH 6716
-        didx = DatetimeIndex(start='2013/01/01 09:00:00', freq='S',
+        # GH#6716
+        didx = pd.date_range(start='2013/01/01 09:00:00', freq='S',
                              periods=4000)
         pidx = PeriodIndex(start='2013/01/01 09:00:00', freq='S', periods=4000)
 
@@ -113,8 +113,8 @@ def test_range_slice_seconds(self):
                 tm.assert_series_equal(s[d:], s)
 
     def test_range_slice_outofbounds(self):
-        # GH 5407
-        didx = DatetimeIndex(start='2013/10/01', freq='D', periods=10)
+        # GH#5407
+        didx = pd.date_range(start='2013/10/01', freq='D', periods=10)
         pidx = PeriodIndex(start='2013/10/01', freq='D', periods=10)
 
         for idx in [didx, pidx]:
diff --git a/pandas/tests/indexes/period/test_tools.py b/pandas/tests/indexes/period/test_tools.py
index c8e1e6c1f3525..15dd4cd520cf8 100644
--- a/pandas/tests/indexes/period/test_tools.py
+++ b/pandas/tests/indexes/period/test_tools.py
@@ -127,7 +127,7 @@ def test_to_timestamp_to_period_astype(self):
         tm.assert_index_equal(res, exp)
 
     def test_dti_to_period(self):
-        dti = DatetimeIndex(start='1/1/2005', end='12/1/2005', freq='M')
+        dti = pd.date_range(start='1/1/2005', end='12/1/2005', freq='M')
         pi1 = dti.to_period()
         pi2 = dti.to_period(freq='D')
         pi3 = dti.to_period(freq='3D')
@@ -193,8 +193,8 @@ def test_period_dt64_round_trip(self):
         tm.assert_index_equal(pi.to_timestamp(), dti)
 
     def test_combine_first(self):
-        # GH 3367
-        didx = pd.DatetimeIndex(start='1950-01-31', end='1950-07-31', freq='M')
+        # GH#3367
+        didx = pd.date_range(start='1950-01-31', end='1950-07-31', freq='M')
         pidx = pd.PeriodIndex(start=pd.Period('1950-1'),
                               end=pd.Period('1950-7'), freq='M')
         # check to be consistent with DatetimeIndex
diff --git a/pandas/tests/indexes/timedeltas/test_construction.py b/pandas/tests/indexes/timedeltas/test_construction.py
index 074c8904b55b1..314a896295793 100644
--- a/pandas/tests/indexes/timedeltas/test_construction.py
+++ b/pandas/tests/indexes/timedeltas/test_construction.py
@@ -128,10 +128,11 @@ def test_constructor_coverage(self):
 
         msg = 'periods must be a number, got foo'
         with pytest.raises(TypeError, match=msg):
-            TimedeltaIndex(start='1 days', periods='foo', freq='D')
+            timedelta_range(start='1 days', periods='foo', freq='D')
 
-        pytest.raises(ValueError, TimedeltaIndex, start='1 days',
-                      end='10 days')
+        with pytest.raises(ValueError):
+            with tm.assert_produces_warning(FutureWarning):
+                TimedeltaIndex(start='1 days', end='10 days')
 
         with pytest.raises(TypeError):
             TimedeltaIndex('1 days')
@@ -155,10 +156,10 @@ def test_constructor_coverage(self):
         pytest.raises(ValueError, TimedeltaIndex,
                       ['1 days', '2 days', '4 days'], freq='D')
 
-        pytest.raises(ValueError, TimedeltaIndex, periods=10, freq='D')
+        pytest.raises(ValueError, timedelta_range, periods=10, freq='D')
 
     def test_constructor_name(self):
-        idx = TimedeltaIndex(start='1 days', periods=1, freq='D', name='TEST')
+        idx = timedelta_range(start='1 days', periods=1, freq='D', name='TEST')
         assert idx.name == 'TEST'
 
         # GH10025
diff --git a/pandas/tests/indexes/timedeltas/test_indexing.py b/pandas/tests/indexes/timedeltas/test_indexing.py
index bfed4114929b7..94d694b644eb8 100644
--- a/pandas/tests/indexes/timedeltas/test_indexing.py
+++ b/pandas/tests/indexes/timedeltas/test_indexing.py
@@ -115,7 +115,7 @@ def test_take_invalid_kwargs(self):
     # TODO: This method came from test_timedelta; de-dup with version above
     def test_take2(self):
         tds = ['1day 02:00:00', '1 day 04:00:00', '1 day 10:00:00']
-        idx = TimedeltaIndex(start='1d', end='2d', freq='H', name='idx')
+        idx = timedelta_range(start='1d', end='2d', freq='H', name='idx')
         expected = TimedeltaIndex(tds, freq=None, name='idx')
 
         taken1 = idx.take([2, 4, 10])
diff --git a/pandas/tests/indexes/timedeltas/test_setops.py b/pandas/tests/indexes/timedeltas/test_setops.py
index 35b2cff13c015..45101da78d9c7 100644
--- a/pandas/tests/indexes/timedeltas/test_setops.py
+++ b/pandas/tests/indexes/timedeltas/test_setops.py
@@ -16,7 +16,7 @@ def test_union(self):
         tm.assert_index_equal(result, expected)
 
         i1 = Int64Index(np.arange(0, 20, 2))
-        i2 = TimedeltaIndex(start='1 day', periods=10, freq='D')
+        i2 = timedelta_range(start='1 day', periods=10, freq='D')
         i1.union(i2)  # Works
         i2.union(i1)  # Fails with "AttributeError: can't set attribute"
 
diff --git a/pandas/tests/io/formats/test_to_html.py b/pandas/tests/io/formats/test_to_html.py
index 0da48f60f1b51..bd0b025b277a2 100644
--- a/pandas/tests/io/formats/test_to_html.py
+++ b/pandas/tests/io/formats/test_to_html.py
@@ -206,7 +206,7 @@ def test_to_html_regression_GH6098(self):
         df.pivot_table(index=[u('clé1')], columns=[u('clé2')])._repr_html_()
 
     def test_to_html_truncate(self, datapath):
-        index = pd.DatetimeIndex(start='20010101', freq='D', periods=20)
+        index = pd.date_range(start='20010101', freq='D', periods=20)
         df = DataFrame(index=index, columns=range(20))
         result = df.to_html(max_rows=8, max_cols=4)
         expected = expected_html(datapath, 'truncate')
diff --git a/pandas/tests/io/parser/test_parse_dates.py b/pandas/tests/io/parser/test_parse_dates.py
index e70ae03e007ee..ffc8af09bf239 100644
--- a/pandas/tests/io/parser/test_parse_dates.py
+++ b/pandas/tests/io/parser/test_parse_dates.py
@@ -840,9 +840,9 @@ def test_parse_timezone(all_parsers):
               2018-01-04 09:05:00+09:00,23400"""
     result = parser.read_csv(StringIO(data), parse_dates=["dt"])
 
-    dti = pd.DatetimeIndex(start="2018-01-04 09:01:00",
-                           end="2018-01-04 09:05:00", freq="1min",
-                           tz=pytz.FixedOffset(540))
+    dti = pd.date_range(start="2018-01-04 09:01:00",
+                        end="2018-01-04 09:05:00", freq="1min",
+                        tz=pytz.FixedOffset(540))
     expected_data = {"dt": dti, "val": [23350, 23400, 23400, 23400, 23400]}
 
     expected = DataFrame(expected_data)
diff --git a/pandas/tests/plotting/test_datetimelike.py b/pandas/tests/plotting/test_datetimelike.py
index 4865638671ea9..42f509c7322b8 100644
--- a/pandas/tests/plotting/test_datetimelike.py
+++ b/pandas/tests/plotting/test_datetimelike.py
@@ -1274,7 +1274,7 @@ def test_format_date_axis(self):
 
     @pytest.mark.slow
     def test_ax_plot(self):
-        x = DatetimeIndex(start='2012-01-02', periods=10, freq='D')
+        x = date_range(start='2012-01-02', periods=10, freq='D')
         y = lrange(len(x))
         _, ax = self.plt.subplots()
         lines = ax.plot(x, y, label='Y')
diff --git a/pandas/tests/reshape/merge/test_merge_asof.py b/pandas/tests/reshape/merge/test_merge_asof.py
index 71db7844a9db5..3035412d7b836 100644
--- a/pandas/tests/reshape/merge/test_merge_asof.py
+++ b/pandas/tests/reshape/merge/test_merge_asof.py
@@ -621,22 +621,22 @@ def test_tolerance_nearest(self):
     def test_tolerance_tz(self):
         # GH 14844
         left = pd.DataFrame(
-            {'date': pd.DatetimeIndex(start=pd.to_datetime('2016-01-02'),
-                                      freq='D', periods=5,
-                                      tz=pytz.timezone('UTC')),
+            {'date': pd.date_range(start=pd.to_datetime('2016-01-02'),
+                                   freq='D', periods=5,
+                                   tz=pytz.timezone('UTC')),
              'value1': np.arange(5)})
         right = pd.DataFrame(
-            {'date': pd.DatetimeIndex(start=pd.to_datetime('2016-01-01'),
-                                      freq='D', periods=5,
-                                      tz=pytz.timezone('UTC')),
+            {'date': pd.date_range(start=pd.to_datetime('2016-01-01'),
+                                   freq='D', periods=5,
+                                   tz=pytz.timezone('UTC')),
              'value2': list("ABCDE")})
         result = pd.merge_asof(left, right, on='date',
                                tolerance=pd.Timedelta('1 day'))
 
         expected = pd.DataFrame(
-            {'date': pd.DatetimeIndex(start=pd.to_datetime('2016-01-02'),
-                                      freq='D', periods=5,
-                                      tz=pytz.timezone('UTC')),
+            {'date': pd.date_range(start=pd.to_datetime('2016-01-02'),
+                                   freq='D', periods=5,
+                                   tz=pytz.timezone('UTC')),
              'value1': np.arange(5),
              'value2': list("BCDEE")})
         assert_frame_equal(result, expected)
diff --git a/pandas/tests/reshape/test_concat.py b/pandas/tests/reshape/test_concat.py
index 07b00cef2669e..4113fb7f0f11e 100644
--- a/pandas/tests/reshape/test_concat.py
+++ b/pandas/tests/reshape/test_concat.py
@@ -335,9 +335,9 @@ def test_concatlike_datetimetz(self, tz_aware_fixture):
     @pytest.mark.parametrize('tz',
                              ['UTC', 'US/Eastern', 'Asia/Tokyo', 'EST5EDT'])
     def test_concatlike_datetimetz_short(self, tz):
-        # GH 7795
-        ix1 = pd.DatetimeIndex(start='2014-07-15', end='2014-07-17',
-                               freq='D', tz=tz)
+        # GH#7795
+        ix1 = pd.date_range(start='2014-07-15', end='2014-07-17',
+                            freq='D', tz=tz)
         ix2 = pd.DatetimeIndex(['2014-07-11', '2014-07-21'], tz=tz)
         df1 = pd.DataFrame(0, index=ix1, columns=['A', 'B'])
         df2 = pd.DataFrame(0, index=ix2, columns=['A', 'B'])
diff --git a/pandas/tests/series/indexing/test_datetime.py b/pandas/tests/series/indexing/test_datetime.py
index cdcc423e3410c..21395f6004760 100644
--- a/pandas/tests/series/indexing/test_datetime.py
+++ b/pandas/tests/series/indexing/test_datetime.py
@@ -23,8 +23,8 @@
 
 
 def test_fancy_getitem():
-    dti = DatetimeIndex(freq='WOM-1FRI', start=datetime(2005, 1, 1),
-                        end=datetime(2010, 1, 1))
+    dti = date_range(freq='WOM-1FRI', start=datetime(2005, 1, 1),
+                     end=datetime(2010, 1, 1))
 
     s = Series(np.arange(len(dti)), index=dti)
 
@@ -40,8 +40,8 @@ def test_fancy_getitem():
 
 
 def test_fancy_setitem():
-    dti = DatetimeIndex(freq='WOM-1FRI', start=datetime(2005, 1, 1),
-                        end=datetime(2010, 1, 1))
+    dti = date_range(freq='WOM-1FRI', start=datetime(2005, 1, 1),
+                     end=datetime(2010, 1, 1))
 
     s = Series(np.arange(len(dti)), index=dti)
     s[48] = -1
@@ -69,7 +69,7 @@ def test_dti_snap():
 
 
 def test_dti_reset_index_round_trip():
-    dti = DatetimeIndex(start='1/1/2001', end='6/1/2001', freq='D')
+    dti = date_range(start='1/1/2001', end='6/1/2001', freq='D')
     d1 = DataFrame({'v': np.random.rand(len(dti))}, index=dti)
     d2 = d1.reset_index()
     assert d2.dtypes[0] == np.dtype('M8[ns]')
diff --git a/pandas/tests/series/test_datetime_values.py b/pandas/tests/series/test_datetime_values.py
index b1c92c2b82a56..5c3cf5450986a 100644
--- a/pandas/tests/series/test_datetime_values.py
+++ b/pandas/tests/series/test_datetime_values.py
@@ -335,8 +335,8 @@ def test_dt_accessor_datetime_name_accessors(self, time_locale):
                 expected_days = calendar.day_name[:]
                 expected_months = calendar.month_name[1:]
 
-        s = Series(DatetimeIndex(freq='D', start=datetime(1998, 1, 1),
-                                 periods=365))
+        s = Series(date_range(freq='D', start=datetime(1998, 1, 1),
+                              periods=365))
         english_days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
                         'Friday', 'Saturday', 'Sunday']
         for day, name, eng_name in zip(range(4, 11),
@@ -348,7 +348,7 @@ def test_dt_accessor_datetime_name_accessors(self, time_locale):
         s = s.append(Series([pd.NaT]))
         assert np.isnan(s.dt.day_name(locale=time_locale).iloc[-1])
 
-        s = Series(DatetimeIndex(freq='M', start='2012', end='2013'))
+        s = Series(date_range(freq='M', start='2012', end='2013'))
         result = s.dt.month_name(locale=time_locale)
         expected = Series([month.capitalize() for month in expected_months])
 
diff --git a/pandas/tests/test_resample.py b/pandas/tests/test_resample.py
index d38f2a237c31d..db926212dbc9a 100644
--- a/pandas/tests/test_resample.py
+++ b/pandas/tests/test_resample.py
@@ -58,8 +58,8 @@ def _simple_pts(start, end, freq='D'):
 class TestResampleAPI(object):
 
     def setup_method(self, method):
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='Min')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='Min')
 
         self.series = Series(np.random.rand(len(dti)), dti)
         self.frame = DataFrame(
@@ -793,8 +793,8 @@ def _series_name(self):
         return 'dti'
 
     def setup_method(self, method):
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='Min')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='Min')
 
         self.series = Series(np.random.rand(len(dti)), dti)
 
@@ -806,8 +806,8 @@ def create_series(self):
 
     def test_custom_grouper(self):
 
-        dti = DatetimeIndex(freq='Min', start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10))
+        dti = date_range(freq='Min', start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10))
 
         s = Series(np.array([1] * len(dti)), index=dti, dtype='int64')
 
@@ -945,9 +945,9 @@ def test_numpy_compat(self):
                 getattr(r, func)(axis=1)
 
     def test_resample_how_callables(self):
-        # GH 7929
+        # GH#7929
         data = np.arange(5, dtype=np.int64)
-        ind = pd.DatetimeIndex(start='2014-01-01', periods=len(data), freq='d')
+        ind = date_range(start='2014-01-01', periods=len(data), freq='d')
         df = DataFrame({"A": data, "B": data}, index=ind)
 
         def fn(x, a=1):
@@ -1064,8 +1064,8 @@ def test_resample_rounding(self):
 
     def test_resample_basic_from_daily(self):
         # from daily
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='D', name='index')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='D', name='index')
 
         s = Series(np.random.rand(len(dti)), dti)
 
@@ -1182,8 +1182,8 @@ def test_resample_loffset(self, loffset):
         assert result.index.freq == Minute(5)
 
         # from daily
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='D')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='D')
         ser = Series(np.random.rand(len(dti)), dti)
 
         # to weekly
@@ -1228,8 +1228,8 @@ def test_resample_loffset_count(self):
 
     def test_resample_upsample(self):
         # from daily
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='D', name='index')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='D', name='index')
 
         s = Series(np.random.rand(len(dti)), dti)
 
@@ -1257,11 +1257,11 @@ def test_resample_how_method(self):
         assert_series_equal(s.resample("10S").mean(), expected)
 
     def test_resample_extra_index_point(self):
-        # GH 9756
-        index = DatetimeIndex(start='20150101', end='20150331', freq='BM')
+        # GH#9756
+        index = date_range(start='20150101', end='20150331', freq='BM')
         expected = DataFrame({'A': Series([21, 41, 63], index=index)})
 
-        index = DatetimeIndex(start='20150101', end='20150331', freq='B')
+        index = date_range(start='20150101', end='20150331', freq='B')
         df = DataFrame(
             {'A': Series(range(len(index)), index=index)}, dtype='int64')
         result = df.resample('BM').last()
@@ -1375,8 +1375,8 @@ def test_resample_dup_index(self):
         assert_frame_equal(result, expected)
 
     def test_resample_reresample(self):
-        dti = DatetimeIndex(start=datetime(2005, 1, 1),
-                            end=datetime(2005, 1, 10), freq='D')
+        dti = date_range(start=datetime(2005, 1, 1),
+                         end=datetime(2005, 1, 10), freq='D')
         s = Series(np.random.rand(len(dti)), dti)
         bs = s.resample('B', closed='right', label='right').mean()
         result = bs.resample('8H').mean()
@@ -2733,7 +2733,7 @@ def test_quarterly_resampling(self):
 
     def test_resample_weekly_bug_1726(self):
         # 8/6/12 is a Monday
-        ind = DatetimeIndex(start="8/6/2012", end="8/26/2012", freq="D")
+        ind = date_range(start="8/6/2012", end="8/26/2012", freq="D")
         n = len(ind)
         data = [[x] * 5 for x in range(n)]
         df = DataFrame(data, columns=['open', 'high', 'low', 'close', 'vol'],
@@ -2796,7 +2796,7 @@ def test_default_right_closed_label(self):
         end_types = ['M', 'A', 'Q', 'W']
 
         for from_freq, to_freq in zip(end_freq, end_types):
-            idx = DatetimeIndex(start='8/15/2012', periods=100, freq=from_freq)
+            idx = date_range(start='8/15/2012', periods=100, freq=from_freq)
             df = DataFrame(np.random.randn(len(idx), 2), idx)
 
             resampled = df.resample(to_freq).mean()
@@ -2808,7 +2808,7 @@ def test_default_left_closed_label(self):
         others_freq = ['D', 'Q', 'M', 'H', 'T']
 
         for from_freq, to_freq in zip(others_freq, others):
-            idx = DatetimeIndex(start='8/15/2012', periods=100, freq=from_freq)
+            idx = date_range(start='8/15/2012', periods=100, freq=from_freq)
             df = DataFrame(np.random.randn(len(idx), 2), idx)
 
             resampled = df.resample(to_freq).mean()
diff --git a/pandas/tests/tseries/offsets/test_offsets.py b/pandas/tests/tseries/offsets/test_offsets.py
index d68dd65c9841b..2ab6a1a79d112 100644
--- a/pandas/tests/tseries/offsets/test_offsets.py
+++ b/pandas/tests/tseries/offsets/test_offsets.py
@@ -15,7 +15,7 @@
 from pandas._libs.tslibs.frequencies import (get_freq_code, get_freq_str,
                                              INVALID_FREQ_ERR_MSG)
 from pandas.tseries.frequencies import _offset_map, get_offset
-from pandas.core.indexes.datetimes import _to_m8, DatetimeIndex
+from pandas.core.indexes.datetimes import _to_m8, DatetimeIndex, date_range
 from pandas.core.indexes.timedeltas import TimedeltaIndex
 import pandas._libs.tslibs.offsets as liboffsets
 from pandas.tseries.offsets import (BDay, CDay, BQuarterEnd, BMonthEnd,
@@ -1367,10 +1367,10 @@ def test_apply_nanoseconds(self):
                 assert_offset_equal(offset, base, expected)
 
     def test_datetimeindex(self):
-        idx1 = DatetimeIndex(start='2014-07-04 15:00', end='2014-07-08 10:00',
-                             freq='BH')
-        idx2 = DatetimeIndex(start='2014-07-04 15:00', periods=12, freq='BH')
-        idx3 = DatetimeIndex(end='2014-07-08 10:00', periods=12, freq='BH')
+        idx1 = date_range(start='2014-07-04 15:00', end='2014-07-08 10:00',
+                          freq='BH')
+        idx2 = date_range(start='2014-07-04 15:00', periods=12, freq='BH')
+        idx3 = date_range(end='2014-07-08 10:00', periods=12, freq='BH')
         expected = DatetimeIndex(['2014-07-04 15:00', '2014-07-04 16:00',
                                   '2014-07-07 09:00',
                                   '2014-07-07 10:00', '2014-07-07 11:00',
@@ -1383,10 +1383,10 @@ def test_datetimeindex(self):
         for idx in [idx1, idx2, idx3]:
             tm.assert_index_equal(idx, expected)
 
-        idx1 = DatetimeIndex(start='2014-07-04 15:45', end='2014-07-08 10:45',
-                             freq='BH')
-        idx2 = DatetimeIndex(start='2014-07-04 15:45', periods=12, freq='BH')
-        idx3 = DatetimeIndex(end='2014-07-08 10:45', periods=12, freq='BH')
+        idx1 = date_range(start='2014-07-04 15:45', end='2014-07-08 10:45',
+                          freq='BH')
+        idx2 = date_range(start='2014-07-04 15:45', periods=12, freq='BH')
+        idx3 = date_range(end='2014-07-08 10:45', periods=12, freq='BH')
 
         expected = DatetimeIndex(['2014-07-04 15:45', '2014-07-04 16:45',
                                   '2014-07-07 09:45',
@@ -2005,8 +2005,8 @@ def test_datetimeindex(self):
         hcal = USFederalHolidayCalendar()
         freq = CBMonthEnd(calendar=hcal)
 
-        assert (DatetimeIndex(start='20120101', end='20130101',
-                              freq=freq).tolist()[0] == datetime(2012, 1, 31))
+        assert (date_range(start='20120101', end='20130101',
+                           freq=freq).tolist()[0] == datetime(2012, 1, 31))
 
 
 class TestCustomBusinessMonthBegin(CustomBusinessMonthBase, Base):
@@ -2122,8 +2122,8 @@ def test_holidays(self):
     def test_datetimeindex(self):
         hcal = USFederalHolidayCalendar()
         cbmb = CBMonthBegin(calendar=hcal)
-        assert (DatetimeIndex(start='20120101', end='20130101',
-                              freq=cbmb).tolist()[0] == datetime(2012, 1, 3))
+        assert (date_range(start='20120101', end='20130101',
+                           freq=cbmb).tolist()[0] == datetime(2012, 1, 3))
 
 
 class TestWeek(Base):
@@ -2425,7 +2425,7 @@ def test_offset_whole_year(self):
         tm.assert_index_equal(result, exp)
 
         # ensure generating a range with DatetimeIndex gives same result
-        result = DatetimeIndex(start=dates[0], end=dates[-1], freq='SM')
+        result = date_range(start=dates[0], end=dates[-1], freq='SM')
         exp = DatetimeIndex(dates)
         tm.assert_index_equal(result, exp)
 
@@ -2612,7 +2612,7 @@ def test_offset_whole_year(self):
         tm.assert_index_equal(result, exp)
 
         # ensure generating a range with DatetimeIndex gives same result
-        result = DatetimeIndex(start=dates[0], end=dates[-1], freq='SMS')
+        result = date_range(start=dates[0], end=dates[-1], freq='SMS')
         exp = DatetimeIndex(dates)
         tm.assert_index_equal(result, exp)
 
diff --git a/pandas/tseries/holiday.py b/pandas/tseries/holiday.py
index 40e2b76672a4e..4016114919f5b 100644
--- a/pandas/tseries/holiday.py
+++ b/pandas/tseries/holiday.py
@@ -7,7 +7,7 @@
 from pandas.compat import add_metaclass
 from pandas.errors import PerformanceWarning
 
-from pandas import DateOffset, DatetimeIndex, Series, Timestamp
+from pandas import DateOffset, Series, Timestamp, date_range
 
 from pandas.tseries.offsets import Day, Easter
 
@@ -254,9 +254,9 @@ def _reference_dates(self, start_date, end_date):
         reference_end_date = Timestamp(
             datetime(end_date.year + 1, self.month, self.day))
         # Don't process unnecessary holidays
-        dates = DatetimeIndex(start=reference_start_date,
-                              end=reference_end_date,
-                              freq=year_offset, tz=start_date.tz)
+        dates = date_range(start=reference_start_date,
+                           end=reference_end_date,
+                           freq=year_offset, tz=start_date.tz)
 
         return dates
 
diff --git a/pandas/util/testing.py b/pandas/util/testing.py
index 210620f2092cf..24aff12e64192 100644
--- a/pandas/util/testing.py
+++ b/pandas/util/testing.py
@@ -34,7 +34,7 @@
 from pandas import (
     Categorical, CategoricalIndex, DataFrame, DatetimeIndex, Index,
     IntervalIndex, MultiIndex, Panel, PeriodIndex, RangeIndex, Series,
-    TimedeltaIndex, bdate_range)
+    bdate_range)
 from pandas.core.algorithms import take_1d
 from pandas.core.arrays import (
     DatetimeArrayMixin as DatetimeArray, ExtensionArray, IntervalArray,
@@ -1938,8 +1938,8 @@ def makeDateIndex(k=10, freq='B', name=None, **kwargs):
 
 
 def makeTimedeltaIndex(k=10, freq='D', name=None, **kwargs):
-    return TimedeltaIndex(start='1 day', periods=k, freq=freq,
-                          name=name, **kwargs)
+    return pd.timedelta_range(start='1 day', periods=k, freq=freq,
+                              name=name, **kwargs)
 
 
 def makePeriodIndex(k=10, name=None, **kwargs):


Code review comments:
diff_hunk: @@ -1046,6 +1046,7 @@ Deprecations
 - The ``keep_tz=False`` option (the default) of the ``keep_tz`` keyword of
   :meth:`DatetimeIndex.to_series` is deprecated (:issue:`17832`).
 - Timezone converting a tz-aware ``datetime.datetime`` or :class:`Timestamp` with :class:`Timestamp` and the ``tz`` argument is now deprecated. Instead, use :meth:`Timestamp.tz_convert` (:issue:`23579`)
+- Creating a :class:`TimedeltaIndex` or :class:`DatetimeIndex` by passing range arguments `start`, `end`, `periods` is deprecated in favor of `timedelta_range` and `date_range` (:issue:`23919`)
path: doc/source/whatsnew/v0.24.0.rst
text: @user1:
`end`, `periods` --> `end`, **AND** `periods`