From 876f2b4237d5189cb50b682c78700e9c5e92751a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Bj=C3=B6rklund?= Date: Fri, 15 Sep 2023 23:55:23 +0300 Subject: [PATCH] check that delayed packages are can be lazily loaded --- patches/bundle-dash-app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/patches/bundle-dash-app.py b/patches/bundle-dash-app.py index 9e6913f..435c694 100644 --- a/patches/bundle-dash-app.py +++ b/patches/bundle-dash-app.py @@ -162,6 +162,8 @@ def server_error(err): delayed_packages[package] = f"{package}=={version(package)}" except: print("Could not find version for", package) +for mod in delayed_packages.keys(): + assert mod not in sys.modules, f"Importing xiplot should not import {mod} " reg = 'DELAYED_PACKAGES = (".+")' rep = f"DELAYED_PACKAGES = {str(delayed_packages)}" content = re.sub(reg, rep, content)