Make _freq/freq/tz/_tz/dtype/_dtype/offset/_offset all inherit reliably
State: closed

There was an issue in rebasing #24024 in which index._freq didn't match index._eadata._freq.  This ensures that is never an issue by removing _freq/freq from the Index subclasses and making them properties aliasing the _eadata attrs.

To do this, we have to make _eadata not-a-property for the time being.

Also make the _tz --> _dtype transition in #24024, and fix a couple of places in DatetimeIndex where it sets _tz manually that would otherwise be missed.

Remove PeriodIndex.shift, since it now can use the DatetimeIndexOpsMixin version (also done in 24024)

Labels:
name: Datetime
description: Datetime data dtype
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=h1) Report
> Merging [#24517](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/bf9d41c8f211fdd9e2b1a37162b753d3845a6708?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `58.06%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24517      +/-   ##
==========================================
+ Coverage   31.88%   31.89%   +<.01%     
==========================================
  Files         166      166              
  Lines       52434    52445      +11     
==========================================
+ Hits        16718    16726       +8     
- Misses      35716    35719       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `30.29% <58.06%> (ø)` | :arrow_up: |
| #single | `31.89% <58.06%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `38.23% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `31.49% <100%> (-0.02%)` | :arrow_down: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `62.24% <100%> (+0.26%)` | :arrow_up: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `40.05% <25%> (-0.36%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `37.44% <46.66%> (+0.1%)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `43.28% <81.81%> (+0.43%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24517?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/24517?src=pr&el=footer). Last update [bf9d41c...288255c](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=h1) Report
> Merging [#24517](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/bf9d41c8f211fdd9e2b1a37162b753d3845a6708?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `72.72%`.

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

```diff
@@            Coverage Diff             @@
##           master   #24517      +/-   ##
==========================================
+ Coverage   31.88%   31.88%   +<.01%     
==========================================
  Files         166      166              
  Lines       52434    52412      -22     
==========================================
- Hits        16718    16714       -4     
+ Misses      35716    35698      -18
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `30.29% <72.72%> (ø)` | :arrow_up: |
| #single | `31.88% <72.72%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/arrays/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lbGlrZS5weQ==) | `38.36% <ø> (+0.13%)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `31.4% <100%> (-0.1%)` | :arrow_down: |
| [pandas/core/arrays/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2RhdGV0aW1lcy5weQ==) | `62.28% <100%> (+0.3%)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `42.57% <100%> (-0.29%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `36.95% <42.85%> (-0.39%)` | :arrow_down: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `41.14% <83.33%> (+0.73%)` | :arrow_up: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `31.41% <0%> (ø)` | :arrow_up: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/24517/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `37.59% <0%> (+0.21%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/24517?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/24517?src=pr&el=footer). Last update [bf9d41c...1456b6a](https://codecov.io/gh/pandas-dev/pandas/pull/24517?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

While you're at it, could you add

1. Add `DatetimeIndexOpsMixin._ndarray_values` as

```python
@property
def _ndarray_values(self):
    return self._eadata._ndarray_values
```

2. Remove `PeriodIndex._ndarray_values`
ping on green.
ping
thanks!