fix import error for version under python3.8
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

add compatibility for python version under 3.8 Thanks for your PR, but Python3.7 is no longer supported on `master` (1.3.x releases still support it though)

typing_extensions isn't a dependency anyway so this wouldn't work