File tree 1 file changed +2
-16
lines changed
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 17
17
import site
18
18
import sysconfig
19
19
20
- # deal with removal of imp from python 3.12
21
- try :
22
- import imp
23
- except ImportError :
24
- import _imp as imp
25
-
26
20
27
21
# Directories in which the standard library and installed packages may be located.
28
22
# Modules in these locations will be whitelisted:
@@ -63,16 +57,8 @@ def mainloop(self):
63
57
while True :
64
58
time .sleep (1 )
65
59
with self .lock :
66
- # Acquire the import lock so that we don't unload modules whilst an
67
- # import is in progess:
68
- imp .acquire_lock ()
69
- try :
70
- if self .check ():
71
- self .unload ()
72
- finally :
73
- # We're done mucking around with the cached modules, normal imports
74
- # in other threads may resume:
75
- imp .release_lock ()
60
+ if self .check ():
61
+ self .unload ()
76
62
77
63
def check (self ):
78
64
unload_required = False
You can’t perform that action at this time.
0 commit comments