summaryrefslogtreecommitdiffstats
path: root/Lib/compiler
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-03 20:21:48 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-03 20:21:48 (GMT)
commitd4e30357016f0b2e2a5093d810b7edea33501cd3 (patch)
tree84fcdbdb049f0ae839d89e70e2e935e7762eb907 /Lib/compiler
parent9742f27a9a94dc1598cdacbd952d35bf2185c1ab (diff)
downloadcpython-d4e30357016f0b2e2a5093d810b7edea33501cd3.zip
cpython-d4e30357016f0b2e2a5093d810b7edea33501cd3.tar.gz
cpython-d4e30357016f0b2e2a5093d810b7edea33501cd3.tar.bz2
Fix compiler breakage related to absolute imports
Diffstat (limited to 'Lib/compiler')
-rw-r--r--Lib/compiler/pycodegen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 5fcdbb9..a1236de 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -891,7 +891,7 @@ class CodeGenerator:
def visitImport(self, node):
self.set_lineno(node)
- level = 0 if "absolute_import" in self.futures else -1
+ level = 0 if self.graph.checkFlag(CO_FUTURE_ABSIMPORT) else -1
for name, alias in node.names:
if VERSION > 1:
self.emit('LOAD_CONST', level)
@@ -907,7 +907,7 @@ class CodeGenerator:
def visitFrom(self, node):
self.set_lineno(node)
level = node.level
- if level == 0 and "absolute_import" not in self.futures:
+ if level == 0 and not self.graph.checkFlag(CO_FUTURE_ABSIMPORT):
level = -1
fromlist = map(lambda (name, alias): name, node.names)
if VERSION > 1: