summaryrefslogtreecommitdiffstats
path: root/Lib/runpy.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-07-20 13:40:09 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-07-20 13:40:09 (GMT)
commitbe7e49fd820318509cd8b4dbde479c552f74ef62 (patch)
tree856c3693092233495f1ecadbd90c0b7e085cc70d /Lib/runpy.py
parent818b1186f9459646a4ad7015ed45ce9dfea0fa55 (diff)
downloadcpython-be7e49fd820318509cd8b4dbde479c552f74ef62.zip
cpython-be7e49fd820318509cd8b4dbde479c552f74ef62.tar.gz
cpython-be7e49fd820318509cd8b4dbde479c552f74ef62.tar.bz2
Close #15386: There was a loophole that meant importlib.machinery and imp would sometimes reference an uninitialised copy of importlib._bootstrap
Diffstat (limited to 'Lib/runpy.py')
-rw-r--r--Lib/runpy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/runpy.py b/Lib/runpy.py
index d612727..39c0e9f 100644
--- a/Lib/runpy.py
+++ b/Lib/runpy.py
@@ -12,8 +12,8 @@ importers when locating support scripts as well as when importing modules.
import os
import sys
+import importlib.machinery # importlib first so we can test #15386 via -m
import imp
-import importlib.machinery
from pkgutil import read_code, get_loader, get_importer
__all__ = [