From: Robert Bradshaw Date: Sun, 9 Mar 2008 08:40:34 +0000 (-0800) Subject: Some fixes to get it to run on 2.3 X-Git-Tag: 0.9.6.14~29^2~20 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cf77ad03d6e2d10cebcdce1bf3a1a632ea1e8fe3;p=cython.git Some fixes to get it to run on 2.3 --- diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index 6ba73f0b..abf8eeab 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -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(":") diff --git a/Cython/Compiler/Transform.py b/Cython/Compiler/Transform.py index 8397a475..b2254c2e 100644 --- a/Cython/Compiler/Transform.py +++ b/Cython/Compiler/Transform.py @@ -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]: