diff -r 6aec9032afad -r c9f64088224b eric6/DebugClients/Python/DebugClientBase.py --- a/eric6/DebugClients/Python/DebugClientBase.py Thu Oct 08 19:07:33 2020 +0200 +++ b/eric6/DebugClients/Python/DebugClientBase.py Fri Oct 09 17:17:21 2020 +0200 @@ -15,11 +15,12 @@ import traceback import os import json -import imp import re import atexit import signal import time +import types +import importlib import DebugClientCapabilities @@ -162,7 +163,7 @@ self.framenr = 0 # The context to run the debugged program in. - self.debugMod = imp.new_module('__main__') + self.debugMod = types.ModuleType('__main__') self.debugMod.__dict__['__builtins__'] = __builtins__ # The list of complete lines to execute. @@ -834,8 +835,9 @@ discoveryStart, top_level_dir=top_level_dir) else: if params["filename"]: - utModule = imp.load_source( + spec = importlib.util.spec_from_file_location( params["testname"], params["filename"]) + utModule = importlib.util.module_from_spec(spec) else: utModule = None if params["failed"]: