From 6e66edd7a0345a29c9b813bb215b4b1097e3f135 Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Fri, 15 Jan 2016 11:50:15 -0600 Subject: [PATCH] Remove PyPy line number hack (closes #977) --- hy/compiler.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hy/compiler.py b/hy/compiler.py index 35b7c43..a68d9b6 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -2583,11 +2583,6 @@ def hy_compile(tree, module_name, root=ast.Module, get_expr=False): `last_expression` is the. """ - if hasattr(sys, "subversion"): - implementation = sys.subversion[0].lower() - elif hasattr(sys, "implementation"): - implementation = sys.implementation.name.lower() - body = [] expr = None @@ -2607,12 +2602,6 @@ def hy_compile(tree, module_name, root=ast.Module, get_expr=False): ret = root(body=body) - # PyPy _really_ doesn't like the ast going backwards... - if implementation != "cpython": - for node in ast.walk(ret): - node.lineno = 1 - node.col_offset = 1 - if get_expr: expr = ast.Expression(body=expr) ret = (ret, expr)