]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16752: Add a missing import to modulefinder.
authorBrett Cannon <brett@python.org>
Sun, 23 Dec 2012 00:34:21 +0000 (19:34 -0500)
committerBrett Cannon <brett@python.org>
Sun, 23 Dec 2012 00:34:21 +0000 (19:34 -0500)
Also fix Misc/ACKS to put part of it back in alphabetical order and
remove some duplicate names.

Patch by Berker Peksag.

Lib/modulefinder.py
Lib/test/test_modulefinder.py
Misc/ACKS
Misc/NEWS

index 683e30549643c6890e371e3deff3b617e6f49eba..f90a4327e6704ab50135920072aa8dea3967fdb5 100644 (file)
@@ -2,6 +2,7 @@
 
 import dis
 import imp
+import importlib.machinery
 import marshal
 import os
 import sys
index c5fc320f64501c6a11c3ce17b87656344d5db71d..53ea232174912cb0593b29a71f7881aec4293a07 100644 (file)
@@ -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)
index a5351b386e5b2b13072687490f1adc87e106eaa5..e4d178355af73b9f640f44371a8f0d217afc7242 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -894,15 +894,13 @@ Dan Parisien
 William Park
 Harri Pasanen
 Gaël Pasgrimaud
-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
index 7e041f37b3f94eb0c60201f183103b7f53056f1c..97e24fa1db9c9b1e7ba5f601ea1eb20e10be5cca 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -114,6 +114,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)