py34compat.py 245 B

12345678910111213
  1. import importlib
  2. try:
  3. import importlib.util
  4. except ImportError:
  5. pass
  6. try:
  7. module_from_spec = importlib.util.module_from_spec
  8. except AttributeError:
  9. def module_from_spec(spec):
  10. return spec.loader.load_module(spec.name)