Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an issue where imp is no longer a python module #101

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion labscript_utils/device_registry/_device_registry.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import os
import importlib
import imp
import warnings
import traceback
import inspect
from labscript_utils import dedent
from labscript_utils.labconfig import LabConfig

# deal with removal of imp from python 3.12
try:
import _imp as imp
except ImportError:
import imp

"""This file contains the machinery for registering and looking up what BLACS tab and
runviewer parser classes belong to a particular labscript device. "labscript device"
here means a device that BLACS needs to communicate with. These devices have
Expand Down
7 changes: 6 additions & 1 deletion labscript_utils/modulewatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
import threading
import time
import os
import imp
import site
import sysconfig

# deal with removal of imp from python 3.12
try:
import _imp as imp
except ImportError:
import imp


# Directories in which the standard library and installed packages may be located.
# Modules in these locations will be whitelisted:
Expand Down