[Python-checkins] r61629 - sandbox/trunk/2to3/lib2to3/pgen2/driver.py sandbox/trunk/2to3/lib2to3/pgen2/pgen.py

collin.winter python-checkins at python.org
Wed Mar 19 17:58:19 CET 2008


Author: collin.winter
Date: Wed Mar 19 17:58:19 2008
New Revision: 61629

Modified:
   sandbox/trunk/2to3/lib2to3/pgen2/driver.py
   sandbox/trunk/2to3/lib2to3/pgen2/pgen.py
Log:
Two more relative import fixes in pgen2.

Modified: sandbox/trunk/2to3/lib2to3/pgen2/driver.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/pgen2/driver.py	(original)
+++ sandbox/trunk/2to3/lib2to3/pgen2/driver.py	Wed Mar 19 17:58:19 2008
@@ -21,7 +21,7 @@
 import sys
 
 # Pgen imports
-from . import grammar, parse, token, tokenize
+from . import grammar, parse, token, tokenize, pgen
 
 
 class Driver(object):
@@ -123,7 +123,6 @@
         gp = head + tail + ".".join(map(str, sys.version_info)) + ".pickle"
     if force or not _newer(gp, gt):
         logger.info("Generating grammar tables from %s", gt)
-        from pgen2 import pgen
         g = pgen.generate_grammar(gt)
         if save:
             logger.info("Writing grammar tables to %s", gp)

Modified: sandbox/trunk/2to3/lib2to3/pgen2/pgen.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/pgen2/pgen.py	(original)
+++ sandbox/trunk/2to3/lib2to3/pgen2/pgen.py	Wed Mar 19 17:58:19 2008
@@ -2,7 +2,7 @@
 # Licensed to PSF under a Contributor Agreement.
 
 # Pgen imports
-from pgen2 import grammar, token, tokenize
+from . import grammar, token, tokenize
 
 class PgenGrammar(grammar.Grammar):
     pass


More information about the Python-checkins mailing list