From bd827c30484fa085ec769fa55dc7f2add8006ac8 Mon Sep 17 00:00:00 2001 From: Logan Date: Wed, 15 May 2024 18:03:41 -0600 Subject: [PATCH] remove exec from download_integration (#13523) --- llama-index-core/llama_index/core/download/integration.py | 1 - 1 file changed, 1 deletion(-) diff --git a/llama-index-core/llama_index/core/download/integration.py b/llama-index-core/llama_index/core/download/integration.py index d9023762f65eb..df7180bb67894 100644 --- a/llama-index-core/llama_index/core/download/integration.py +++ b/llama-index-core/llama_index/core/download/integration.py @@ -18,7 +18,6 @@ def download_integration(module_str: str, module_import_str: str, cls_name: str) raise Exception(f"Failed to pip install `{module_str}`") from e try: - exec(f"from {module_import_str} import {cls_name}") module_spec = importlib.util.find_spec(module_import_str) module = importlib.util.module_from_spec(module_spec) module_spec.loader.exec_module(module)