summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-12-22 19:38:32 -0500
committerBrett Cannon <brett@python.org>2012-12-22 19:38:32 -0500
commit2909d6b47c5a96b38099d5e00fd68e6b5c3ef4da (patch)
treef9353ef041ed41113fce0c3eec3f6bfac83b537f
parentMerge 3.3. (diff)
parentIssue #16752: Add a missing import to modulefinder. (diff)
downloadcpython-2909d6b47c5a96b38099d5e00fd68e6b5c3ef4da.tar.gz
cpython-2909d6b47c5a96b38099d5e00fd68e6b5c3ef4da.tar.bz2
cpython-2909d6b47c5a96b38099d5e00fd68e6b5c3ef4da.zip
merge with 3.3
-rw-r--r--Lib/modulefinder.py1
-rw-r--r--Lib/test/test_modulefinder.py15
-rw-r--r--Misc/ACKS4
-rw-r--r--Misc/NEWS2
4 files changed, 19 insertions, 3 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index 7418a9ce6d4..4996d7a20b6 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -2,6 +2,7 @@
import dis
import imp
+import importlib.machinery
import marshal
import os
import sys
diff --git a/Lib/test/test_modulefinder.py b/Lib/test/test_modulefinder.py
index c5fc320f645..53ea2321749 100644
--- a/Lib/test/test_modulefinder.py
+++ b/Lib/test/test_modulefinder.py
@@ -196,6 +196,18 @@ a/module.py
from . import bar
"""]
+relative_import_test_4 = [
+ "a.module",
+ ["a", "a.module"],
+ [],
+ [],
+ """\
+a/__init__.py
+ def foo(): pass
+a/module.py
+ from . import *
+"""]
+
def open_file(path):
dirname = os.path.dirname(path)
@@ -273,6 +285,9 @@ class ModuleFinderTest(unittest.TestCase):
def test_relative_imports_3(self):
self._do_test(relative_import_test_3)
+ def test_relative_imports_4(self):
+ self._do_test(relative_import_test_4)
+
def test_main():
support.run_unittest(ModuleFinderTest)
diff --git a/Misc/ACKS b/Misc/ACKS
index aa95d4dfb36..90894a00205 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -901,15 +901,13 @@ William Park
Harri Pasanen
Gaël Pasgrimaud
Ashish Nitin Patil
-Berker Peksag
-Bo Peng
-Joe Peterson
Randy Pausch
Samuele Pedroni
Justin Peel
Marcel van der Peijl
Berker Peksag
Steven Pemberton
+Bo Peng
Santiago Peresón
George Peristerakis
Mathieu Perreault
diff --git a/Misc/NEWS b/Misc/NEWS
index 15ab07a50f3..b175c42d341 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -173,6 +173,8 @@ Core and Builtins
Library
-------
+- Issue #16752: Add a missing import to modulefinder. Patch by Berker Peksag.
+
- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
(patch by Serhiy Storchaka)