Skip to content

Commit 57fe084

Browse files
committed
Move threading import to module level of importlib.util
1 parent bb2292f commit 57fe084

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/importlib/util.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import _imp
1515
import sys
16+
import threading
1617
import types
1718

1819

@@ -253,8 +254,6 @@ def create_module(self, spec):
253254

254255
def exec_module(self, module):
255256
"""Make the module load lazily."""
256-
import threading
257-
258257
module.__spec__.loader = self.loader
259258
module.__loader__ = self.loader
260259
# Don't need to worry about deep-copying as trying to set an attribute

0 commit comments

Comments
 (0)