Some fixes to get it to run on 2.3
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 9 Mar 2008 08:40:34 +0000 (00:40 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 9 Mar 2008 08:40:34 +0000 (00:40 -0800)
Cython/Compiler/CmdLine.py
Cython/Compiler/Transform.py

index 6ba73f0b629b1e542c35d3df5295b984c5d1f45a..abf8eeab62d02561ed4ed340f817e5b9f5b4c99b 100644 (file)
@@ -57,7 +57,7 @@ def parse_command_line(args):
             if modsplitpt == -1: bad_usage()
             modulename = fqn[:modsplitpt]
             symbolname = fqn[modsplitpt+1:]
-            module = __import__(modulename, fromlist=[symbolname], level=0)
+            module = __import__(modulename, globals(), locals(), [symbolname])
             return getattr(module, symbolname)
     
         stagename, factoryname = param.split(":")
index 8397a4751a428544fdd7c64e240dc5defabe757e..b2254c2e57002471caee8f3cba340288cb6858f7 100644 (file)
@@ -105,7 +105,8 @@ PHASES = [
 
 class TransformSet(dict):
     def __init__(self):
-        self.update([(name, []) for name in PHASES])
+        for name in PHASES:
+            self[name] = []
     def run(self, name, node, **options):
         assert name in self
         for transform in self[name]: