Now that we no longer support Python 3.5, we can assume
ModuleNotFoundError is always available and drop our
backward-compatible workaround for it in version.py.
import sys
-# TODO(fungi) Clean up once Python 3.6 is the oldest interpreter supported
-if not hasattr(__builtins__, 'ModuleNotFoundError'):
- ModuleNotFoundError = ImportError
# TODO(fungi) Clean up once Python 3.8 is the oldest interpreter supported
try:
import importlib.metadata