[pypy-svn] pypy jit-unroll-loops: hg merge default
hakanardo
commits-noreply at bitbucket.org
Thu Dec 30 10:53:36 CET 2010
Author: Hakan Ardo <hakan at debian.org>
Branch: jit-unroll-loops
Changeset: r40276:2514afd4a57c
Date: 2010-12-30 10:52 +0100
http://bitbucket.org/pypy/pypy/changeset/2514afd4a57c/
Log: hg merge default
diff --git a/pypy/interpreter/function.py b/pypy/interpreter/function.py
--- a/pypy/interpreter/function.py
+++ b/pypy/interpreter/function.py
@@ -444,7 +444,7 @@
pre = "bound"
else:
pre = "unbound"
- return "%s method %s" % (pre, self.w_function.getname(self.space, '?'))
+ return "%s method %s" % (pre, self.w_function.getname(self.space))
def call_args(self, args):
space = self.space
@@ -493,13 +493,13 @@
def descr_method_repr(self):
space = self.space
- name = self.w_function.getname(self.space, '?')
+ name = self.w_function.getname(self.space)
# XXX do we handle all cases sanely here?
if space.is_w(self.w_class, space.w_None):
w_class = space.type(self.w_instance)
else:
w_class = self.w_class
- typename = w_class.getname(self.space, '?')
+ typename = w_class.getname(self.space)
if self.w_instance is None:
s = "<unbound method %s.%s>" % (typename, name)
return space.wrap(s)
@@ -591,7 +591,7 @@
def descr_classmethod__new__(space, w_subtype, w_function):
if not space.is_true(space.callable(w_function)):
- typename = space.type(w_function).getname(space, '?')
+ typename = space.type(w_function).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not callable", typename)
instance = space.allocate_instance(ClassMethod, w_subtype)
diff --git a/pypy/tool/release/package.py b/pypy/tool/release/package.py
--- a/pypy/tool/release/package.py
+++ b/pypy/tool/release/package.py
@@ -19,7 +19,7 @@
if sys.version_info < (2,6): py.test.skip("requires 2.6 so far")
-USE_TARFILE_MODULE = sys.platform == 'win32'
+USE_ZIPFILE_MODULE = sys.platform == 'win32'
def ignore_patterns(*patterns):
"""Function that can be used as copytree() ignore parameter.
@@ -40,14 +40,26 @@
copy_to_dir = None, override_pypy_c = None):
basedir = py.path.local(basedir)
if sys.platform == 'win32':
- basename = 'pypy-c.exe'
+ # Can't rename a DLL
+ if override_pypy_c is not None:
+ rename_pypy_c = py.path.local(override_pypy_c).purebasename
+ pypy_c_dir = py.path.local(override_pypy_c).dirname
+ else:
+ pypy_c_dir = basedir.join('pypy', 'translator', 'goal')
+ pypy_c = pypy_c_dir.join(rename_pypy_c + '.exe')
+ libpypy_c = pypy_c_dir.join('lib' + rename_pypy_c + '.dll')
+ binaries = [(pypy_c, pypy_c.basename),
+ (libpypy_c, libpypy_c.basename),
+ (pypy_c_dir.join('libexpat.dll'), 'libexpat.dll')]
else:
basename = 'pypy-c'
- if override_pypy_c is None:
- pypy_c = basedir.join('pypy', 'translator', 'goal', basename)
- else:
- pypy_c = py.path.local(override_pypy_c)
+ if override_pypy_c is None:
+ pypy_c = basedir.join('pypy', 'translator', 'goal', basename)
+ else:
+ pypy_c = py.path.local(override_pypy_c)
+ binaries = [(pypy_c, rename_pypy_c)]
if not pypy_c.check():
+ print pypy_c
raise PyPyCNotFound('Please compile pypy first, using translate.py')
builddir = udir.ensure("build", dir=True)
pypydir = builddir.ensure(name, dir=True)
@@ -72,34 +84,47 @@
spdir = pypydir.ensure('site-packages', dir=True)
shutil.copy(str(basedir.join('site-packages', 'README')), str(spdir))
#
- pypydir.ensure('bin', dir=True)
- archive_pypy_c = pypydir.join('bin', rename_pypy_c)
- shutil.copy(str(pypy_c), str(archive_pypy_c))
+ if sys.platform == 'win32':
+ bindir = pypydir
+ else:
+ bindir = pypydir.join('bin')
+ bindir.ensure(dir=True)
+ for source, target in binaries:
+ archive = bindir.join(target)
+ shutil.copy(str(source), str(archive))
old_dir = os.getcwd()
try:
os.chdir(str(builddir))
#
# 'strip' fun: see https://codespeak.net/issue/pypy-dev/issue587
- if sys.platform == 'darwin':
- os.system("strip -x " + str(archive_pypy_c)) # ignore errors
+ for source, target in binaries:
+ if sys.platform == 'win32':
+ pass
+ elif sys.platform == 'darwin':
+ os.system("strip -x " + str(bindir.join(target))) # ignore errors
+ else:
+ os.system("strip " + str(bindir.join(target))) # ignore errors
+ #
+ if USE_ZIPFILE_MODULE:
+ import zipfile
+ archive = str(builddir.join(name + '.zip'))
+ zf = zipfile.ZipFile(archive, 'w',
+ compression=zipfile.ZIP_DEFLATED)
+ for (dirpath, dirnames, filenames) in os.walk(name):
+ for fnname in filenames:
+ filename = os.path.join(dirpath, fnname)
+ zf.write(filename)
+ zf.close()
else:
- os.system("strip " + str(archive_pypy_c)) # ignore errors
- #
- if USE_TARFILE_MODULE:
- import tarfile
- tf = tarfile.open(str(builddir.join(name + '.tar.bz2')), 'w:bz2')
- tf.add(name)
- tf.close()
- else:
- e = os.system('tar cvjf ' + str(builddir.join(name + '.tar.bz2')) +
- " " + name)
+ archive = str(builddir.join(name + '.tar.bz2'))
+ e = os.system('tar cvjf ' + archive + " " + name)
if e:
raise OSError('"tar" returned exit status %r' % e)
finally:
os.chdir(old_dir)
if copy_to_dir is not None:
- print "Copying to %s" % copy_to_dir
- shutil.copy(str(builddir.join(name + '.tar.bz2')), copy_to_dir)
+ print "Copying %s to %s" % (archive, copy_to_dir)
+ shutil.copy(archive, str(copy_to_dir))
return builddir # for tests
if __name__ == '__main__':
diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -55,7 +55,7 @@
return False
def setdict(self, space, w_dict):
- typename = space.type(self).getname(space, '?')
+ typename = space.type(self).getname(space)
raise operationerrfmt(space.w_TypeError,
"attribute '__dict__' of %s objects "
"is not writable", typename)
@@ -72,7 +72,7 @@
raise NotImplementedError("only for interp-level user subclasses "
"from typedef.py")
- def getname(self, space, default):
+ def getname(self, space, default='?'):
try:
return space.str_w(space.getattr(self, space.wrap('__name__')))
except OperationError, e:
@@ -117,7 +117,7 @@
classname = wrappable_class_name(RequiredClass)
msg = "'%s' object expected, got '%s' instead"
raise operationerrfmt(space.w_TypeError, msg,
- classname, self.getclass(space).getname(space, '?'))
+ classname, self.getclass(space).getname(space))
# used by _weakref implemenation
@@ -125,7 +125,7 @@
return None
def setweakref(self, space, weakreflifeline):
- typename = space.type(self).getname(space, '?')
+ typename = space.type(self).getname(space)
raise operationerrfmt(space.w_TypeError,
"cannot create weak reference to '%s' object", typename)
@@ -733,7 +733,7 @@
msg = "'%s' object expected, got '%s' instead"
raise operationerrfmt(self.w_TypeError, msg,
wrappable_class_name(RequiredClass),
- w_obj.getclass(self).getname(self, '?'))
+ w_obj.getclass(self).getname(self))
return obj
interp_w._annspecialcase_ = 'specialize:arg(1)'
@@ -1054,7 +1054,7 @@
raise
msg = "%s must be an integer, not %s"
raise operationerrfmt(self.w_TypeError, msg,
- objdescr, self.type(w_obj).getname(self, '?'))
+ objdescr, self.type(w_obj).getname(self))
try:
index = self.int_w(w_index)
except OperationError, err:
@@ -1070,7 +1070,7 @@
raise operationerrfmt(
w_exception,
"cannot fit '%s' into an index-sized "
- "integer", self.type(w_obj).getname(self, '?'))
+ "integer", self.type(w_obj).getname(self))
else:
return index
diff --git a/pypy/interpreter/typedef.py b/pypy/interpreter/typedef.py
--- a/pypy/interpreter/typedef.py
+++ b/pypy/interpreter/typedef.py
@@ -51,7 +51,7 @@
return space.wrap(compute_identity_hash(w_obj))
def descr__hash__unhashable(space, w_obj):
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' objects are unhashable", typename)
@@ -512,7 +512,7 @@
" objects doesn't apply to '%s' object",
self.name,
self.w_cls.name,
- space.type(w_obj).getname(space, '?'))
+ space.type(w_obj).getname(space))
def descr_member_get(space, member, w_obj, w_w_cls=None):
"""member.__get__(obj[, type]) -> value
@@ -578,7 +578,7 @@
def descr_get_dict(space, w_obj):
w_dict = w_obj.getdict()
if w_dict is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"descriptor '__dict__' doesn't apply to"
" '%s' objects", typename)
diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py
--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -5,11 +5,11 @@
options:
-i inspect interactively after running script
-O dummy optimization flag for compatibility with C Python
- -c CMD program passed in as CMD (terminates option list)
+ -c cmd program passed in as CMD (terminates option list)
-S do not 'import site' on initialization
-u unbuffered binary stdout and stderr
-h, --help show this help message and exit
- -m library module to be run as a script (terminates option list)
+ -m mod library module to be run as a script (terminates option list)
-W arg warning control (arg is action:message:category:module:lineno)
-E ignore environment variables (such as PYTHONPATH)
--version print the PyPy version
@@ -128,7 +128,8 @@
raise SystemExit
def print_help(*args):
- print 'usage: %s [options]' % (sys.executable,)
+ print 'usage: %s [options] [-c cmd|-m mod|file.py|-] [arg...]' % (
+ sys.executable,)
print __doc__.rstrip()
if 'pypyjit' in sys.builtin_module_names:
_print_jit_help()
diff --git a/pypy/objspace/descroperation.py b/pypy/objspace/descroperation.py
--- a/pypy/objspace/descroperation.py
+++ b/pypy/objspace/descroperation.py
@@ -30,7 +30,7 @@
def raiseattrerror(space, w_obj, name, w_descr=None):
w_type = space.type(w_obj)
- typename = w_type.getname(space, '?')
+ typename = w_type.getname(space)
if w_descr is None:
raise operationerrfmt(space.w_AttributeError,
"'%s' object has no attribute '%s'",
@@ -138,7 +138,7 @@
return w_obj.call_args(args)
w_descr = space.lookup(w_obj, '__call__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not callable",
typename)
@@ -155,7 +155,7 @@
def set(space, w_descr, w_obj, w_val):
w_set = space.lookup(w_descr, '__set__')
if w_set is None:
- typename = space.type(w_descr).getname(space, '?')
+ typename = space.type(w_descr).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not a descriptor with set",
typename)
@@ -164,7 +164,7 @@
def delete(space, w_descr, w_obj):
w_delete = space.lookup(w_descr, '__delete__')
if w_delete is None:
- typename = space.type(w_descr).getname(space, '?')
+ typename = space.type(w_descr).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not a descriptor with delete",
typename)
@@ -191,7 +191,7 @@
def setattr(space, w_obj, w_name, w_val):
w_descr = space.lookup(w_obj, '__setattr__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_AttributeError,
"'%s' object is readonly",
typename)
@@ -200,7 +200,7 @@
def delattr(space, w_obj, w_name):
w_descr = space.lookup(w_obj, '__delattr__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_AttributeError,
"'%s' object does not support attribute removal",
typename)
@@ -241,7 +241,7 @@
if w_descr is None:
w_descr = space.lookup(w_obj, '__getitem__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not iterable",
typename)
@@ -251,7 +251,7 @@
def next(space, w_obj):
w_descr = space.lookup(w_obj, 'next')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not an iterator",
typename)
@@ -260,7 +260,7 @@
def getitem(space, w_obj, w_key):
w_descr = space.lookup(w_obj, '__getitem__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object is not subscriptable",
typename)
@@ -269,7 +269,7 @@
def setitem(space, w_obj, w_key, w_val):
w_descr = space.lookup(w_obj, '__setitem__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object does not support item assignment",
typename)
@@ -278,7 +278,7 @@
def delitem(space, w_obj, w_key):
w_descr = space.lookup(w_obj, '__delitem__')
if w_descr is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"'%s' object does not support item deletion",
typename)
@@ -630,8 +630,8 @@
w_res = _invoke_binop(space, w_right_impl, w_obj2, w_obj1)
if w_res is not None:
return w_res
- typename1 = w_typ1.getname(space, '?')
- typename2 = w_typ2.getname(space, '?')
+ typename1 = w_typ1.getname(space)
+ typename2 = w_typ2.getname(space)
raise operationerrfmt(space.w_TypeError, errormsg,
typename1, typename2)
@@ -693,7 +693,7 @@
def unaryop_impl(space, w_obj):
w_impl = space.lookup(w_obj, specialname)
if w_impl is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError, errormsg, typename)
return space.get_and_call_function(w_impl, w_obj)
return func_with_new_name(unaryop_impl, 'unaryop_%s_impl'%specialname.strip('_'))
@@ -715,7 +715,7 @@
def %(targetname)s(space, w_obj):
w_impl = space.lookup(w_obj, %(specialname)r)
if w_impl is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"unsupported operand type for %(targetname)s(): '%%s'",
typename)
@@ -723,7 +723,7 @@
if %(checker)s:
return w_result
- typename = space.type(w_result).getname(space, '?')
+ typename = space.type(w_result).getname(space)
msg = "%(specialname)s returned non-%(targetname)s (type '%%s')"
raise operationerrfmt(space.w_TypeError, msg, typename)
assert not hasattr(DescrOperation, %(targetname)r)
@@ -742,7 +742,7 @@
def %(targetname)s(space, w_obj):
w_impl = space.lookup(w_obj, %(specialname)r)
if w_impl is None:
- typename = space.type(w_obj).getname(space, '?')
+ typename = space.type(w_obj).getname(space)
raise operationerrfmt(space.w_TypeError,
"unsupported operand type for %(targetname)s(): '%%s'",
typename)
@@ -755,7 +755,7 @@
except OperationError, e:
if not e.match(space, space.w_TypeError):
raise
- typename = space.type(w_result).getname(space, '?')
+ typename = space.type(w_result).getname(space)
msg = "%(specialname)s returned non-%(targetname)s (type '%%s')"
raise operationerrfmt(space.w_TypeError, msg, typename)
else:
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -334,7 +334,7 @@
if not isinstance(w_subtype, W_TypeObject):
raise operationerrfmt(space.w_TypeError,
"X is not a type object ('%s')",
- space.type(w_subtype).getname(space, '?'))
+ space.type(w_subtype).getname(space))
if not space.is_true(space.issubtype(w_subtype, w_self)):
raise operationerrfmt(space.w_TypeError,
"%s.__new__(%s): %s is not a subtype of %s",
@@ -875,7 +875,7 @@
# explicit error message for this specific case
raise operationerrfmt(space.w_TypeError,
"duplicate base class '%s'",
- candidate.getname(space,"?"))
+ candidate.getname(space))
while candidate not in cycle:
cycle.append(candidate)
nextblockinglist = mro_blockinglist(candidate, orderlists)
@@ -883,7 +883,7 @@
del cycle[:cycle.index(candidate)]
cycle.append(candidate)
cycle.reverse()
- names = [cls.getname(space, "?") for cls in cycle]
+ names = [cls.getname(space) for cls in cycle]
raise OperationError(space.w_TypeError,
space.wrap("cycle among base classes: " + ' < '.join(names)))
diff --git a/pypy/tool/release/test/test_package.py b/pypy/tool/release/test/test_package.py
--- a/pypy/tool/release/test/test_package.py
+++ b/pypy/tool/release/test/test_package.py
@@ -1,38 +1,56 @@
import py
from pypy.tool.autopath import pypydir
-from pypy.tool.release.package import package
+from pypy.tool.release import package
from pypy.module.sys.version import CPYTHON_VERSION
-import tarfile, os
+import tarfile, zipfile, os, sys
def test_dir_structure(test='test'):
# make sure we have sort of pypy-c
- pypy_c = py.path.local(pypydir).join('translator', 'goal', 'pypy-c')
+ if sys.platform == 'win32':
+ basename = 'pypy-c.exe'
+ rename_pypy_c = 'pypy-c'
+ else:
+ basename = 'pypy-c'
+ rename_pypy_c = 'pypy'
+ pypy_c = py.path.local(pypydir).join('translator', 'goal', basename)
if not pypy_c.check():
os.system("echo faked_pypy_c> %s" % (pypy_c,))
fake_pypy_c = True
else:
fake_pypy_c = False
try:
- builddir = package(py.path.local(pypydir).dirpath(), test)
+ builddir = package.package(py.path.local(pypydir).dirpath(), test,
+ rename_pypy_c)
prefix = builddir.join(test)
cpyver = '%d.%d.%d' % CPYTHON_VERSION[:3]
assert prefix.join('lib-python', cpyver, 'test').check()
- assert prefix.join('bin', 'pypy').check()
+ if sys.platform == 'win32':
+ assert prefix.join('pypy-c.exe').check()
+ else:
+ assert prefix.join('bin', 'pypy').check()
assert prefix.join('lib_pypy', 'syslog.py').check()
assert not prefix.join('lib_pypy', 'py').check()
assert not prefix.join('lib_pypy', 'ctypes_configure').check()
assert prefix.join('LICENSE').check()
assert prefix.join('README').check()
- th = tarfile.open(str(builddir.join('%s.tar.bz2' % test)))
- assert th.getmember('%s/lib_pypy/syslog.py' % test)
+ if package.USE_ZIPFILE_MODULE:
+ zh = zipfile.ZipFile(str(builddir.join('%s.zip' % test)))
+ assert zh.open('%s/lib_pypy/syslog.py' % test)
+ else:
+ th = tarfile.open(str(builddir.join('%s.tar.bz2' % test)))
+ assert th.getmember('%s/lib_pypy/syslog.py' % test)
# the headers file could be not there, because they are copied into
# trunk/include only during translation
includedir = py.path.local(pypydir).dirpath().join('include')
def check_include(name):
if includedir.join(name).check(file=True):
- assert th.getmember('%s/include/%s' % (test, name))
+ member = '%s/include/%s' % (test, name)
+ if package.USE_ZIPFILE_MODULE:
+ assert zh.open(member)
+ else:
+ assert th.getmember(member)
check_include('Python.h')
check_include('modsupport.inl')
check_include('pypy_decl.h')
@@ -40,11 +58,11 @@
if fake_pypy_c:
pypy_c.remove()
-def test_with_tarfile_module():
+def test_with_zipfile_module():
from pypy.tool.release import package
- prev = package.USE_TARFILE_MODULE
+ prev = package.USE_ZIPFILE_MODULE
try:
- package.USE_TARFILE_MODULE = True
- test_dir_structure(test='testtarfile')
+ package.USE_ZIPFILE_MODULE = True
+ test_dir_structure(test='testzipfile')
finally:
- package.USE_TARFILE_MODULE = prev
+ package.USE_ZIPFILE_MODULE = prev
diff --git a/pypy/tool/win32-build.bat b/pypy/tool/win32-build.bat
deleted file mode 100644
--- a/pypy/tool/win32-build.bat
+++ /dev/null
@@ -1,38 +0,0 @@
-setlocal
-
-set ROOTDIR=%~dp0..\..
-cd %ROOTDIR%
-
-set ZIPEXE=zip
-set PYTHON=c:\python26\python.exe
-set TRANSLATE=pypy/translator/goal/translate.py
-set TRANSLATEOPTS=--batch
-set TARGET=pypy/translator/goal/targetpypystandalone
-set TARGETOPTS=
-
-copy /y ..\expat-2.0.1\win32\bin\release\libexpat.dll .
-
-call :make_pypy pypy-1.2-win32.zip pypy.exe -Ojit
-call :make_pypy pypy-1.2-win32-nojit.zip pypy-nojit.exe
-call :make_pypy pypy-1.2-win32-stackless.zip pypy-stackless.exe --stackless
-REM call :make_pypy pypy-1.2-win32-sandbox.zip pypy-sandbox.exe --sandbox
-
-goto :EOF
-
-REM =========================================
-:make_pypy
-REM make_pypy subroutine
-REM %1 is the zip filename
-REM %2 is pypy.exe filename
-REM %3 and others are the translation options
-
-set ZIPFILE=%1
-set PYPYEXE=%2
-set EXTRAOPTS=%3 %4 %5 %6 %7 %8 %9
-
-%PYTHON% %TRANSLATE% --output=%PYPYEXE% %TRANSLATEOPTS% %EXTRAOPTS% %TARGET% %TARGETOPTS%
-del %ZIPFILE%
-del /s pypy\lib\*.pyc lib-python\*.pyc
-%ZIPEXE% %ZIPFILE% %PYPYEXE% *.dll
-%ZIPEXE% -r %ZIPFILE% pypy\lib lib-python
-%ZIPEXE% -d %ZIPFILE% lib-python\2.5.2\plat-*
diff --git a/pypy/objspace/std/objspace.py b/pypy/objspace/std/objspace.py
--- a/pypy/objspace/std/objspace.py
+++ b/pypy/objspace/std/objspace.py
@@ -344,7 +344,7 @@
else:
raise operationerrfmt(self.w_TypeError,
"%s.__new__(%s): only for the type %s",
- w_type.name, w_subtype.getname(self, '?'), w_type.name)
+ w_type.name, w_subtype.getname(self), w_type.name)
return instance
allocate_instance._annspecialcase_ = "specialize:arg(1)"
diff --git a/pypy/translator/goal/targetpypystandalone.py b/pypy/translator/goal/targetpypystandalone.py
--- a/pypy/translator/goal/targetpypystandalone.py
+++ b/pypy/translator/goal/targetpypystandalone.py
@@ -65,7 +65,7 @@
## con.interact()
except OperationError, e:
debug("OperationError:")
- debug(" operror-type: " + e.w_type.getname(space, '?'))
+ debug(" operror-type: " + e.w_type.getname(space))
debug(" operror-value: " + space.str_w(space.str(e.get_w_value(space))))
return 1
finally:
@@ -75,7 +75,7 @@
space.timer.stop("space.finish")
except OperationError, e:
debug("OperationError:")
- debug(" operror-type: " + e.w_type.getname(space, '?'))
+ debug(" operror-type: " + e.w_type.getname(space))
debug(" operror-value: " + space.str_w(space.str(e.get_w_value(space))))
return 1
space.timer.stop("Entrypoint")
More information about the Pypy-commit
mailing list