[Python-checkins] cpython (merge 3.3 -> default): merge with 3.3

brett.cannon python-checkins at python.org
Sun Dec 23 01:38:43 CET 2012


http://hg.python.org/cpython/rev/d22e9e3a3326
changeset:   80985:d22e9e3a3326
parent:      80983:3a841240bc10
parent:      80984:1b9b7cb136db
user:        Brett Cannon <brett at python.org>
date:        Sat Dec 22 19:38:32 2012 -0500
summary:
  merge with 3.3

files:
  Lib/modulefinder.py           |   1 +
  Lib/test/test_modulefinder.py |  15 +++++++++++++++
  Misc/ACKS                     |   4 +---
  Misc/NEWS                     |   2 ++
  4 files changed, 19 insertions(+), 3 deletions(-)


diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
--- 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
--- a/Lib/test/test_modulefinder.py
+++ b/Lib/test/test_modulefinder.py
@@ -196,6 +196,18 @@
                                 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 @@
     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
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -901,15 +901,13 @@
 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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -173,6 +173,8 @@
 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)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list