summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-04-03 04:45:34 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-04-03 04:45:34 (GMT)
commitb902f4e401bbf5ada3494c4fb7eeab605a370e10 (patch)
tree5fe70c6b50f12d41bce604fd031d432b84d8e76b /Lib
parent480725d4c5bd3738c1f1fc7af74fa8825705c428 (diff)
downloadcpython-b902f4e401bbf5ada3494c4fb7eeab605a370e10.zip
cpython-b902f4e401bbf5ada3494c4fb7eeab605a370e10.tar.gz
cpython-b902f4e401bbf5ada3494c4fb7eeab605a370e10.tar.bz2
Use absolute imports
Diffstat (limited to 'Lib')
-rw-r--r--Lib/compiler/__init__.py6
-rw-r--r--Lib/compiler/ast.py2
-rw-r--r--Lib/compiler/transformer.py4
-rw-r--r--Lib/test/test_dict.py2
-rw-r--r--Lib/test/test_import.py2
-rw-r--r--Lib/test/test_sets.py3
-rw-r--r--Lib/test/test_urllib2.py2
7 files changed, 11 insertions, 10 deletions
diff --git a/Lib/compiler/__init__.py b/Lib/compiler/__init__.py
index 13b05bf..ce89144 100644
--- a/Lib/compiler/__init__.py
+++ b/Lib/compiler/__init__.py
@@ -21,6 +21,6 @@ compileFile(filename)
Generates a .pyc file by compiling filename.
"""
-from transformer import parse, parseFile
-from visitor import walk
-from pycodegen import compile, compileFile
+from compiler.transformer import parse, parseFile
+from compiler.visitor import walk
+from compiler.pycodegen import compile, compileFile
diff --git a/Lib/compiler/ast.py b/Lib/compiler/ast.py
index 08e0c6a..8dcdf68 100644
--- a/Lib/compiler/ast.py
+++ b/Lib/compiler/ast.py
@@ -2,7 +2,7 @@
This file is automatically generated by Tools/compiler/astgen.py
"""
-from consts import CO_VARARGS, CO_VARKEYWORDS
+from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
def flatten(seq):
l = []
diff --git a/Lib/compiler/transformer.py b/Lib/compiler/transformer.py
index cc91b4f..8225dfa 100644
--- a/Lib/compiler/transformer.py
+++ b/Lib/compiler/transformer.py
@@ -34,8 +34,8 @@ import sys
class WalkerError(StandardError):
pass
-from consts import CO_VARARGS, CO_VARKEYWORDS
-from consts import OP_ASSIGN, OP_DELETE, OP_APPLY
+from compiler.consts import CO_VARARGS, CO_VARKEYWORDS
+from compiler.consts import OP_ASSIGN, OP_DELETE, OP_APPLY
def parseFile(path):
f = open(path, "U")
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index f3f78e7..bbca798 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -445,7 +445,7 @@ class DictTest(unittest.TestCase):
self.fail_("g[42] didn't raise KeyError")
-import mapping_tests
+from test import mapping_tests
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = dict
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 72f27fa..a72b8bd 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -15,7 +15,7 @@ else:
raise TestFailed("import of RAnDoM should have failed (case mismatch)")
# Another brief digression to test the accuracy of manifest float constants.
-import double_const # don't blink -- that *was* the test
+from test import double_const # don't blink -- that *was* the test
def remove_files(name):
for f in (name + os.extsep + "py",
diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py
index ff834e0..85e4a22 100644
--- a/Lib/test/test_sets.py
+++ b/Lib/test/test_sets.py
@@ -819,7 +819,8 @@ Set(['Jack', 'Jane', 'Janice', 'John', 'Marvin', 'Sam', 'Zack'])
__test__ = {'libreftest' : libreftest}
def test_main(verbose=None):
- import test_sets, doctest
+ import doctest
+ from test import test_sets
test_support.run_unittest(
TestSetOfSets,
TestExceptionPropagation,
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 58b54c1..64a2ee9 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -632,7 +632,7 @@ class HandlerTests(unittest.TestCase):
from urllib2 import build_opener, HTTPHandler, HTTPError, \
HTTPCookieProcessor
- from test_cookielib import interact_netscape
+ from test.test_cookielib import interact_netscape
cj = CookieJar()
interact_netscape(cj, "http://www.example.com/", "spam=eggs")