Skip to content

Commit 0089c1e

Browse files
common/reloader: import reload from importlib (#2093)
The imp module is deprecated since Python 3.4 [1]. The import was added even after it was deprecated in [2]. In Python 3.12 the imp module will be removed. Use the reload function from importlib, which is the designated replacement [1]. With #2091 and this change, crossbar can be installed and run on Python 3.12 with: - numpy>=1.26.0b1 - wsaccel @ git+https://github.com/methane/[email protected] (assuming cython>=3.0.0 is installed, tarball from pypi won't work [3]) [1] https://docs.python.org/3.11/library/imp.html [2] 21910b0 [3] methane/wsaccel#30
1 parent 03d7057 commit 0089c1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crossbar/common/reloader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
reload
1515
except NameError:
1616
# Python 3
17-
from imp import reload
17+
from importlib import reload
1818

1919
__all__ = ('TrackingModuleReloader', )
2020

0 commit comments

Comments
 (0)