File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 1717import site
1818import sysconfig
1919
20- # deal with removal of imp from python 3.12
21- try :
22- import imp
23- except ImportError :
24- import _imp as imp
25-
2620
2721# Directories in which the standard library and installed packages may be located.
2822# Modules in these locations will be whitelisted:
@@ -63,16 +57,8 @@ def mainloop(self):
6357 while True :
6458 time .sleep (1 )
6559 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 ()
7662
7763 def check (self ):
7864 unload_required = False
You can’t perform that action at this time.
0 commit comments