[pypy-svn] r9275 - in pypy/branch/dist-interpapp/pypy: . interpreter module/builtin tool
hpk at codespeak.net
hpk at codespeak.net
Thu Feb 17 17:22:54 CET 2005
Author: hpk
Date: Thu Feb 17 17:22:53 2005
New Revision: 9275
Modified:
pypy/branch/dist-interpapp/pypy/conftest.py
pypy/branch/dist-interpapp/pypy/interpreter/pyopcode.py
pypy/branch/dist-interpapp/pypy/module/builtin/app_inspect.py
pypy/branch/dist-interpapp/pypy/module/builtin/operation.py
pypy/branch/dist-interpapp/pypy/tool/pytestsupport.py
Log:
a couple of random fixes ... (more to follow)
Modified: pypy/branch/dist-interpapp/pypy/conftest.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/conftest.py (original)
+++ pypy/branch/dist-interpapp/pypy/conftest.py Thu Feb 17 17:22:53 2005
@@ -33,11 +33,11 @@
space = module.Space()
_spacecache[name] = space
if name != 'flow': # not sensible for flow objspace case
- space.setitem(space.w_builtins, space.wrap('AssertionError'),
+ space.setitem(space.builtin.w_dict, space.wrap('AssertionError'),
pytestsupport.build_pytest_assertion(space))
- space.setitem(space.w_builtins, space.wrap('raises'),
+ space.setitem(space.builtin.w_dict, space.wrap('raises'),
space.wrap(pytestsupport.app_raises))
- space.setitem(space.w_builtins, space.wrap('skip'),
+ space.setitem(space.builtin.w_dict, space.wrap('skip'),
space.wrap(pytestsupport.app_skip))
space.raises_w = pytestsupport.raises_w.__get__(space)
space.eq_w = pytestsupport.eq_w.__get__(space)
Modified: pypy/branch/dist-interpapp/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/interpreter/pyopcode.py (original)
+++ pypy/branch/dist-interpapp/pypy/interpreter/pyopcode.py Thu Feb 17 17:22:53 2005
@@ -799,7 +799,7 @@
return globals['__metaclass__']
else:
try:
- builtin.__metaclass__
+ return builtin.__metaclass__
except AttributeError:
return type
Modified: pypy/branch/dist-interpapp/pypy/module/builtin/app_inspect.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/builtin/app_inspect.py (original)
+++ pypy/branch/dist-interpapp/pypy/module/builtin/app_inspect.py Thu Feb 17 17:22:53 2005
@@ -11,6 +11,8 @@
def locals():
return sys._getframe(1).f_locals
+def _caller_locals():
+ return sys._getframe(2).f_locals
def _recursive_issubclass(cls, klass_or_tuple):
if cls is klass_or_tuple:
Modified: pypy/branch/dist-interpapp/pypy/module/builtin/operation.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/module/builtin/operation.py (original)
+++ pypy/branch/dist-interpapp/pypy/module/builtin/operation.py Thu Feb 17 17:22:53 2005
@@ -3,6 +3,7 @@
"""
from pypy.interpreter import gateway
+from pypy.interpreter.error import OperationError
NoneNotWrapped = gateway.NoneNotWrapped
def abs(space, w_val):
Modified: pypy/branch/dist-interpapp/pypy/tool/pytestsupport.py
==============================================================================
--- pypy/branch/dist-interpapp/pypy/tool/pytestsupport.py (original)
+++ pypy/branch/dist-interpapp/pypy/tool/pytestsupport.py Thu Feb 17 17:22:53 2005
@@ -104,7 +104,7 @@
space.setattr(w_self, space.wrap('msg'), w_msg)
# build a new AssertionError class to replace the original one.
- w_BuiltinAssertionError = space.getitem(space.w_builtins,
+ w_BuiltinAssertionError = space.getitem(space.builtin.w_dict,
space.wrap('AssertionError'))
w_metaclass = space.type(w_BuiltinAssertionError)
w_init = space.wrap(interp2app_temp(my_init))
@@ -137,14 +137,14 @@
w_locals)
except OperationError, e:
if e.match(space, w_ExpectedException):
- return space.sys.exc_info()
+ return space.call_function(space.sys.get('exc_info'))
raise
else:
try:
space.call_args(w_expr, __args__)
except OperationError, e:
if e.match(space, w_ExpectedException):
- return space.sys.exc_info()
+ return space.call_function(space.sys.get('exc_info'))
raise
raise OperationError(space.w_AssertionError,
space.wrap("DID NOT RAISE"))
More information about the Pypy-commit
mailing list