python39 utility fixes
- change the required python version
- replace deprecated imports from typing module based on https://peps.python.org/pep-0585/#implementation
With python/3.9 it's preferred to use built-in collection types such as list and dict as generic types instead of importing the corresponding capitalized types (e.g. List or Dict) from typing:
https://docs.python.org/3/whatsnew/3.9.html#type-hinting-generics-in-standard-collections