From 8c5e165216a5b61f3ce417f591a1072956f3b0e9 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Tue, 2 Dec 2025 11:23:25 -0500 Subject: [PATCH] Ignore PySide6 ephemeral imports from zip that linger in sys.modules as being in the labscript-suite profile path. Implemented as a simple string filter for common component names. --- labscript/labscript.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/labscript/labscript.py b/labscript/labscript.py index 6e1d23f..fba7dca 100644 --- a/labscript/labscript.py +++ b/labscript/labscript.py @@ -404,6 +404,9 @@ def save_labscripts(hdf5_file): if getattr(module, '__file__', None) is not None: path = os.path.abspath(module.__file__) if path.startswith(prefix) and (path.endswith('.pyc') or path.endswith('.py')): + if 'signature_bootstrap.py' in path or 'shibokensupport' in path: + # ignore PySide6 shenaniganry + continue path = path.replace('.pyc', '.py') save_path = 'labscriptlib/' + path.replace(prefix, '').replace('\\', '/').replace('//', '/') if save_path in hdf5_file: