File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,9 @@ def __getattribute__(self, attr):
183
183
# exec_module(), which will access module.__dict__, module.__name__,
184
184
# and/or module.__spec__, reentering this method. These accesses
185
185
# need to be all
9592
owed to proceed without triggering the load again.
186
- if loader_state ['is_loading' ]. is_set () and attr .startswith ('__' ) and attr .endswith ('__' ):
186
+ if loader_state ['is_loading' ] and attr .startswith ('__' ) and attr .endswith ('__' ):
187
187
return object .__getattribute__ (self , attr )
188
- loader_state ['is_loading' ]. set ()
188
+ loader_state ['is_loading' ] = True
189
189
190
190
__dict__ = object .__getattribute__ (self , '__dict__' )
191
191
@@ -264,6 +264,6 @@ def exec_module(self, module):
264
264
loader_state ['__dict__' ] = module .__dict__ .copy ()
265
265
loader_state ['__class__' ] = module .__class__
266
266
loader_state ['lock' ] = threading .RLock ()
267
- loader_state ['is_loading' ] = threading . Event ()
267
+ loader_state ['is_loading' ] = False
268
268
module .__spec__ .loader_state = loader_state
269
269
module .__class__ = _LazyModule
You can’t perform that action at this time.
0 commit comments