Skip to content

Commit

Permalink
check that delayed packages are can be lazily loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Aggrathon committed Sep 15, 2023
1 parent 4b6ea95 commit 876f2b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions patches/bundle-dash-app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 876f2b4

Please sign in to comment.