BUG: Dockerfile environment not working with latest pandas dev merge
- [X] I have checked that this issue has not already been reported.

- [ ] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

### Code Sample

**Bash** 

```git
docker build --tag pandas-parfaitg-env .
docker run -it --rm -v path-to-pandas-yourname:/home/pandas-parfaitg pandas-parfaitg-env

cd /home
ls
# pandas  pandas-parfaitg

cat > sandbox.py
# see script below

python sandbox.py
```
**Python** (sandbox.py)

```python
import sys
sys.path.remove('/home/pandas')
sys.path.append('/home/pandas-parfaitg')

import pandas as pd
```

### Problem Description

Currently, I am working on a pandas ENH PR and use a Docker container for my development environment, following exact instructions in [contributing docs](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#using-a-docker-container). Dockerfile builds image and runs container perfectly fine. However, after several weeks where above routine worked great, until yesterday evening after a `git fetch upstream` and `git merge upstream/master`, my development pandas `sandbox.py` code now errors out with the following message:

```python
Traceback (most recent call last):
  File "sandbox.py", line 5, in <module>
    import pandas as pd
  File "/home/pandas-parfaitg/pandas/__init__.py", line 51, in <module>
    from pandas.core.api import (
  File "/home/pandas-parfaitg/pandas/core/api.py", line 31, in <module>
    from pandas.core.groupby import Grouper, NamedAgg
  File "/home/pandas-parfaitg/pandas/core/groupby/__init__.py", line 1, in <module>
    from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
  File "/home/pandas-parfaitg/pandas/core/groupby/generic.py", line 58, in <module>
    from pandas.core.aggregation import (
  File "/home/pandas-parfaitg/pandas/core/aggregation.py", line 41, in <module>
    from pandas.core.indexes.api import Index
  File "/home/pandas-parfaitg/pandas/core/indexes/api.py", line 24, in <module>
    from pandas.core.indexes.period import PeriodIndex
  File "/home/pandas-parfaitg/pandas/core/indexes/period.py", line 66, in <module>
    class PeriodIndex(DatetimeIndexOpsMixin):
  File "/home/pandas-parfaitg/pandas/core/indexes/extension.py", line 112, in wrapper
    meth = inherit_from_data(name, delegate, cache=cache, wrap=wrap)
  File "/home/pandas-parfaitg/pandas/core/indexes/extension.py", line 43, in inherit_from_data
    attr = getattr(delegate, name)
AttributeError: type object 'PeriodArray' has no attribute 'start_time'
````


If `sandbox.py` simply contains `import pandas` (the Docker build version), no error occurs. Does Dockerfile use last stable pandas build?

A few [commits have been merged yesterday evening](https://github.com/pandas-dev/pandas/commits/master/pandas/core) in the  `pandas/core` directory. Is this somehow related? I tried many `git` synches to be current with latest version to no avail. Is my forked repo or local branch the issue?

#### Expected Output

No error

#### Output of ``pd.show_versions()``

Unable to run since I am cannot `import pandas as pd` from `pandas/parfaitg`

<details>

...

</details>
