From cf77ad03d6e2d10cebcdce1bf3a1a632ea1e8fe3 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 9 Mar 2008 00:40:34 -0800 Subject: [PATCH] Some fixes to get it to run on 2.3 --- Cython/Compiler/CmdLine.py | 2 +- Cython/Compiler/Transform.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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]: -- 2.26.2