Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 73b969e

Browse files
committed
Issue #16752: Add a missing import to modulefinder.
Also fix Misc/ACKS to put part of it back in alphabetical order and remove some duplicate names. Patch by Berker Peksag.
1 parent f03eee1 commit 73b969e

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

Lib/modulefinder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import dis
44
import imp
5+
import importlib.machinery
56
import marshal
67
import os
78
import sys

Lib/test/test_modulefinder.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@ def foo(): pass
196196
from . import bar
197197
"""]
198198

199+
relative_import_test_4 = [
200+
"a.module",
201+
["a", "a.module"],
202+
[],
203+
[],
204+
"""\
205+
a/__init__.py
206+
def foo(): pass
207+
a/module.py
208+
from . import *
209+
"""]
210+
199211

200212
def open_file(path):
201213
dirname = os.path.dirname(path)
@@ -273,6 +285,9 @@ def test_relative_imports_2(self):
273285
def test_relative_imports_3(self):
274286
self._do_test(relative_import_test_3)
275287

288+
def test_relative_imports_4(self):
289+
self._do_test(relative_import_test_4)
290+
276291

277292
def test_main():
278293
support.run_unittest(ModuleFinderTest)

Misc/ACKS

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -894,15 +894,13 @@ Dan Parisien
894894
William Park
895895
Harri Pasanen
896896
Gaël Pasgrimaud
897-
Berker Peksag
898-
Bo Peng
899-
Joe Peterson
900897
Randy Pausch
901898
Samuele Pedroni
902899
Justin Peel
903900
Marcel van der Peijl
904901
Berker Peksag
905902
Steven Pemberton
903+
Bo Peng
906904
Santiago Peresón
907905
George Peristerakis
908906
Mathieu Perreault

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ Core and Builtins
114114
Library
115115
-------
116116

117+
- Issue #16752: Add a missing import to modulefinder. Patch by Berker Peksag.
118+
117119
- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
118120
(patch by Serhiy Storchaka)
119121

0 commit comments

Comments
 (0)