mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
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.
This commit is contained in:
parent
f03eee12b4
commit
73b969ec70
4 changed files with 19 additions and 3 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import dis
|
import dis
|
||||||
import imp
|
import imp
|
||||||
|
import importlib.machinery
|
||||||
import marshal
|
import marshal
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
||||||
|
|
@ -196,6 +196,18 @@ a/module.py
|
||||||
from . import bar
|
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):
|
def open_file(path):
|
||||||
dirname = os.path.dirname(path)
|
dirname = os.path.dirname(path)
|
||||||
|
|
@ -273,6 +285,9 @@ class ModuleFinderTest(unittest.TestCase):
|
||||||
def test_relative_imports_3(self):
|
def test_relative_imports_3(self):
|
||||||
self._do_test(relative_import_test_3)
|
self._do_test(relative_import_test_3)
|
||||||
|
|
||||||
|
def test_relative_imports_4(self):
|
||||||
|
self._do_test(relative_import_test_4)
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
support.run_unittest(ModuleFinderTest)
|
support.run_unittest(ModuleFinderTest)
|
||||||
|
|
|
||||||
|
|
@ -894,15 +894,13 @@ Dan Parisien
|
||||||
William Park
|
William Park
|
||||||
Harri Pasanen
|
Harri Pasanen
|
||||||
Gaël Pasgrimaud
|
Gaël Pasgrimaud
|
||||||
Berker Peksag
|
|
||||||
Bo Peng
|
|
||||||
Joe Peterson
|
|
||||||
Randy Pausch
|
Randy Pausch
|
||||||
Samuele Pedroni
|
Samuele Pedroni
|
||||||
Justin Peel
|
Justin Peel
|
||||||
Marcel van der Peijl
|
Marcel van der Peijl
|
||||||
Berker Peksag
|
Berker Peksag
|
||||||
Steven Pemberton
|
Steven Pemberton
|
||||||
|
Bo Peng
|
||||||
Santiago Peresón
|
Santiago Peresón
|
||||||
George Peristerakis
|
George Peristerakis
|
||||||
Mathieu Perreault
|
Mathieu Perreault
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #16752: Add a missing import to modulefinder. Patch by Berker Peksag.
|
||||||
|
|
||||||
- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
|
- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
|
||||||
(patch by Serhiy Storchaka)
|
(patch by Serhiy Storchaka)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue