[Python-checkins] r43561 - in python/trunk/Lib: compiler/__init__.py compiler/ast.py compiler/transformer.py test/test_dict.py test/test_import.py test/test_sets.py test/test_urllib2.py

neal.norwitz python-checkins at python.org
Mon Apr 3 06:45:36 CEST 2006


Author: neal.norwitz
Date: Mon Apr  3 06:45:34 2006
New Revision: 43561

Modified:
   python/trunk/Lib/compiler/__init__.py
   python/trunk/Lib/compiler/ast.py
   python/trunk/Lib/compiler/transformer.py
   python/trunk/Lib/test/test_dict.py
   python/trunk/Lib/test/test_import.py
   python/trunk/Lib/test/test_sets.py
   python/trunk/Lib/test/test_urllib2.py
Log:
Use absolute imports

Modified: python/trunk/Lib/compiler/__init__.py
==============================================================================
--- python/trunk/Lib/compiler/__init__.py	(original)
+++ python/trunk/Lib/compiler/__init__.py	Mon Apr  3 06:45:34 2006
@@ -21,6 +21,6 @@
     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

Modified: python/trunk/Lib/compiler/ast.py
==============================================================================
--- python/trunk/Lib/compiler/ast.py	(original)
+++ python/trunk/Lib/compiler/ast.py	Mon Apr  3 06:45:34 2006
@@ -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 = []

Modified: python/trunk/Lib/compiler/transformer.py
==============================================================================
--- python/trunk/Lib/compiler/transformer.py	(original)
+++ python/trunk/Lib/compiler/transformer.py	Mon Apr  3 06:45:34 2006
@@ -34,8 +34,8 @@
 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")

Modified: python/trunk/Lib/test/test_dict.py
==============================================================================
--- python/trunk/Lib/test/test_dict.py	(original)
+++ python/trunk/Lib/test/test_dict.py	Mon Apr  3 06:45:34 2006
@@ -445,7 +445,7 @@
             self.fail_("g[42] didn't raise KeyError")
 
 
-import mapping_tests
+from test import mapping_tests
 
 class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
     type2test = dict

Modified: python/trunk/Lib/test/test_import.py
==============================================================================
--- python/trunk/Lib/test/test_import.py	(original)
+++ python/trunk/Lib/test/test_import.py	Mon Apr  3 06:45:34 2006
@@ -15,7 +15,7 @@
     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",

Modified: python/trunk/Lib/test/test_sets.py
==============================================================================
--- python/trunk/Lib/test/test_sets.py	(original)
+++ python/trunk/Lib/test/test_sets.py	Mon Apr  3 06:45:34 2006
@@ -819,7 +819,8 @@
 __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,

Modified: python/trunk/Lib/test/test_urllib2.py
==============================================================================
--- python/trunk/Lib/test/test_urllib2.py	(original)
+++ python/trunk/Lib/test/test_urllib2.py	Mon Apr  3 06:45:34 2006
@@ -632,7 +632,7 @@
         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")


More information about the Python-checkins mailing list