This code in importer.py is now likely redundant and can be removed.
def _create_import_hook_from_entrypoint(entrypoint):
def import_hook(module):
entrypoint_value = entrypoint.value.split(":")
module_name = entrypoint_value[0]
__import__(module_name)
callback = sys.modules[module_name]
if len(entrypoint_value) > 1:
attrs = entrypoint_value[1].split(".")
for attr in attrs:
callback = getattr(callback, attr)
return callback(module)
return import_hook
Was no longer needed after move to using new importlib entry points.
This code in
importer.pyis now likely redundant and can be removed.Was no longer needed after move to using new
importlibentry points.