[pypy-commit] pypy default: remove the ability to pass a cpython code object to exc_ and eval

gutworth noreply at buildbot.pypy.org
Tue Jun 14 00:56:04 CEST 2011


Author: Benjamin Peterson <benjamin at python.org>
Branch: 
Changeset: r44915:834b642392b2
Date: 2011-06-13 17:59 -0500
http://bitbucket.org/pypy/pypy/changeset/834b642392b2/

Log:	remove the ability to pass a cpython code object to exc_ and eval

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -989,10 +989,6 @@
             compiler = self.createcompiler()
             expression = compiler.compile(expression, '?', 'eval', 0,
                                          hidden_applevel=hidden_applevel)
-        if isinstance(expression, types.CodeType):
-            # XXX only used by appsupport
-            expression = PyCode._from_code(self, expression)
-        if not isinstance(expression, PyCode):
             raise TypeError, 'space.eval(): expected a string, code or PyCode object'
         return expression.exec_code(self, w_globals, w_locals)
 
@@ -1007,9 +1003,6 @@
             compiler = self.createcompiler()
             statement = compiler.compile(statement, filename, 'exec', 0,
                                          hidden_applevel=hidden_applevel)
-        if isinstance(statement, types.CodeType):
-            # XXX only used by appsupport
-            statement = PyCode._from_code(self, statement)
         if not isinstance(statement, PyCode):
             raise TypeError, 'space.exec_(): expected a string, code or PyCode object'
         w_key = self.wrap('__builtins__')


More information about the pypy-commit mailing list