| 1 | diff --git a/lib/Ice.py b/lib/Ice.py
|
| 2 | |
| 3 | |
| 4 | @@ -11,7 +11,7 @@
|
| 5 | Ice module
|
| 6 | """
|
| 7 |
|
| 8 | -import sys, string, imp, os, threading, warnings, datetime
|
| 9 | +import sys, string, importlib, os, threading, warnings, datetime
|
| 10 |
|
| 11 | #
|
| 12 | # RTTI problems can occur in C++ code unless we modify Python's dlopen flags.
|
| 13 | @@ -373,7 +373,8 @@ def createModule(name):
|
| 14 | elif curr in _pendingModules:
|
| 15 | mod = _pendingModules[curr]
|
| 16 | else:
|
| 17 | - nmod = imp.new_module(curr)
|
| 18 | + spec = importlib.util.spec_from_loader(curr, loader=None)
|
| 19 | + nmod = importlib.util.module_from_spec(spec)
|
| 20 | _pendingModules[curr] = nmod
|
| 21 | mod = nmod
|
| 22 |
|
| 23 | --
|
| 24 |
|