ENH: Add dtype parameter to IntervalIndex constructors and deprecate from_intervals
State: closed

- [X] closes #19262
- [X] closes #19263
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Summary:
- Added support for a `dtype` parameter to all IntervalIndex constructors
   - Allows users to override the inferred dtype
- Deprecated `IntervalIndex.from_intervals`
   - Still added `dtype` parameter, since it's just a pass through to `IntervalIndex`
   - Removed usage and references to `IntervalIndex.from_intervals` throughout the codebase 
- Split construction tests off into `interval/test_construction.py`
   - Created a base class for common tests, and subclasses for each constructor
   - Was previously written in a more flat style, where each constructor was explicitly called
   - Expanded the tests to hit some previously untested behavior

Labels:
name: Deprecate
description: Functionality to remove in pandas
name: Interval
description: Interval data type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=h1) Report
> Merging [#19339](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/7202635c9332b2b510f3f32cb1e97e3268edc61f?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19339/graphs/tree.svg?height=150&src=pr&token=eZ4WkYLtcO&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #19339      +/-   ##
==========================================
- Coverage   91.61%    91.6%   -0.02%     
==========================================
  Files         150      150              
  Lines       48677    48697      +20     
==========================================
+ Hits        44595    44607      +12     
- Misses       4082     4090       +8
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.97% <100%> (-0.02%)` | :arrow_down: |
| #single | `41.72% <26.31%> (-0.02%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/19339/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `97.51% <100%> (ø)` | :arrow_up: |
| [pandas/core/reshape/tile.py](https://codecov.io/gh/pandas-dev/pandas/pull/19339/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzaGFwZS90aWxlLnB5) | `90.25% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/19339/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `92.4% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/19339/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.46% <100%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/19339/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `83.83% <0%> (-0.62%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=footer). Last update [7202635...da2eac2](https://codecov.io/gh/pandas-dev/pandas/pull/19339?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback : green
nice @jschendel keep em coming!