virt_test/bin/python testrunner/runner.py --logfile=testrun.log --config=pypy/testrunner_cfg.py '--config=~/machine_cfg.py' --root=pypy --timeout=4000 in dir /build_dir/own-linux-aarch64/build (timeout 4000 secs) watching logfiles {'pytestLog': 'testrun.log'} argv: ['virt_test/bin/python', 'testrunner/runner.py', '--logfile=testrun.log', '--config=pypy/testrunner_cfg.py', '--config=~/machine_cfg.py', '--root=pypy', '--timeout=4000'] environment: AUDITWHEEL_ARCH=aarch64 AUDITWHEEL_PLAT=manylinux2014_aarch64 AUDITWHEEL_POLICY=manylinux2014 DEVTOOLSET_ROOTPATH=/opt/rh/devtoolset-10/root HOME=/home/buildslave HOSTNAME=530e0d063b5c LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_ALL=en_US.UTF-8 LD_LIBRARY_PATH=/usr/local/lib:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/usr/local/lib64 LOGNAME=buildslave PATH=/python27_virt/bin:/opt/rh/devtoolset-10/root/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig PWD=/build_dir/own-linux-aarch64/build PYPYCHERRYPICK= PYPY_GC_NURSERY=16M PYPY_LOCALBASE=/usr/local PYPY_MAKE_PORTABLE=1 PYTHONPATH=.: SHELL=/bin/bash SHLVL=2 SSL_CERT_FILE=/opt/_internal/certs.pem TERM=xterm TMPDIR=/tmp/pytest USER=buildslave _=/python27_virt/bin/buildslave using PTY: False using config pypy/testrunner_cfg.py using config /home/buildslave/machine_cfg.py running 4 parallel test workers setting MAKEFLAGS to ' ' (space) -- config/test -- interpreter/astcompiler/test -- interpreter/pyparser/test -- interpreter/test -- module/__builtin__/test -- module/__pypy__/test -- module/_ast/test -- module/_cffi_backend/test -- module/_codecs/test -- module/_continuation/test -- module/_cppyy/test -- module/_csv/test -- module/_demo/test -- module/_file/test -- module/_io/test -- module/_jitlog/test -- module/_locale/test -- module/_lsprof/test -- module/_md5/test -- module/_minimal_curses/test -- module/_multibytecodec/test -- module/_multiprocessing/test -- module/_pypyjson/test -- module/_random/test -- module/_rawffi/alt/test -- module/_rawffi/test -- module/_sha/test -- module/_socket/test -- module/_sre/test -- module/_vmprof/test -- module/_warnings/test -- module/_weakref/test -- module/_winreg/test -- module/array/test -- module/binascii/test -- module/bz2/test -- module/cStringIO/test -- module/cmath/test -- module/cpyext/test/test_abstract.py -- module/cpyext/test/test_api.py -- module/cpyext/test/test_arraymodule.py -- module/cpyext/test/test_boolobject.py -- module/cpyext/test/test_borrow.py -- module/cpyext/test/test_bufferobject.py -- module/cpyext/test/test_bytearrayobject.py -- module/cpyext/test/test_bytesobject.py -- module/cpyext/test/test_capsule.py -- module/cpyext/test/test_cell.py -- module/cpyext/test/test_classobject.py -- module/cpyext/test/test_codecs.py -- module/cpyext/test/test_complexobject.py -- module/cpyext/test/test_cpyext.py -- module/cpyext/test/test_datetime.py -- module/cpyext/test/test_dictobject.py -- module/cpyext/test/test_eval.py -- module/cpyext/test/test_fileobject.py -- module/cpyext/test/test_floatobject.py -- module/cpyext/test/test_frameobject.py -- module/cpyext/test/test_funcobject.py -- module/cpyext/test/test_genobject.py -- module/cpyext/test/test_getargs.py -- module/cpyext/test/test_import.py -- module/cpyext/test/test_intobject.py -- module/cpyext/test/test_iterator.py -- module/cpyext/test/test_listobject.py -- module/cpyext/test/test_longobject.py -- module/cpyext/test/test_mapping.py -- module/cpyext/test/test_marshal.py -- module/cpyext/test/test_memoryobject.py -- module/cpyext/test/test_methodobject.py -- module/cpyext/test/test_misc.py -- module/cpyext/test/test_module.py -- module/cpyext/test/test_ndarrayobject.py -- module/cpyext/test/test_number.py -- module/cpyext/test/test_object.py -- module/cpyext/test/test_pycobject.py -- module/cpyext/test/test_pyerrors.py -- module/cpyext/test/test_pyfile.py -- module/cpyext/test/test_pysignals.py -- module/cpyext/test/test_pystate.py -- module/cpyext/test/test_pystrtod.py -- module/cpyext/test/test_sequence.py -- module/cpyext/test/test_setobject.py -- module/cpyext/test/test_sliceobject.py -- module/cpyext/test/test_structseq.py -- module/cpyext/test/test_sysmodule.py -- module/cpyext/test/test_thread.py -- module/cpyext/test/test_traceback.py -- module/cpyext/test/test_translate.py -- module/cpyext/test/test_tupleobject.py -- module/cpyext/test/test_typeobject.py -- module/cpyext/test/test_unicodeobject.py -- module/cpyext/test/test_userslots.py -- module/cpyext/test/test_version.py -- module/cpyext/test/test_weakref.py -- module/crypt/test -- module/errno/test -- module/exceptions/test -- module/faulthandler/test -- module/fcntl/test -- module/gc/test -- module/imp/test -- module/itertools/test -- module/marshal/test -- module/math/test -- module/micronumpy/test -- module/mmap/test -- module/operator/test -- module/parser/test -- module/posix/test -- module/pwd/test -- module/pyexpat/test -- module/pypyjit/test -- module/select/test -- module/signal/test -- module/struct/test -- module/sys/test -- module/termios/test -- module/test_lib_pypy -- module/thread/test -- module/time/test -- module/unicodedata/test -- module/zipimport/test -- module/zlib/test -- objspace/fake/test -- objspace/std/test -- objspace/test -- sandbox/test -- tool/bench/test -- tool/memusage/test -- tool/pytest/test -- tool/release/test -- tool/test -- total: 133 to run ++ 07:38:27 starting config/test [1 started in total] ++ 07:38:27 starting interpreter/pyparser/test [2 started in total] ++ 07:38:27 starting interpreter/astcompiler/test [3 started in total] ++ 07:38:27 starting interpreter/test [4 started in total] __ config/test [1 done in total, somefailed=False] ____________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.py rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 157 items / 1 skipped config/test/test_pypyoption.py ............................................................................................................................................................. ==================== 157 passed, 1 skipped in 7.93 seconds ===================== ++ 07:38:37 starting module/__builtin__/test [5 started in total] __ module/__builtin__/test [2 done in total, somefailed=True] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 305 items module/__builtin__/test/apptest_compile.py ........ module/__builtin__/test/test_abstractinst.py ............ module/__builtin__/test/test_apply.py ... module/__builtin__/test/test_builtin.py ..............................................s..................... module/__builtin__/test/test_classobj.py ........................................F..F............... module/__builtin__/test/test_descriptor.py .......................... module/__builtin__/test/test_filter.py ........... module/__builtin__/test/test_functional.py ................................................. module/__builtin__/test/test_minmax.py .......................... module/__builtin__/test/test_range.py ........................ module/__builtin__/test/test_rawinput.py ... module/__builtin__/test/test_reduce.py .... module/__builtin__/test/test_vars.py ... module/__builtin__/test/test_zip.py ......... =================================== FAILURES =================================== ___________________________ AppTestOldstyle.test_del ___________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc6e6eb450>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_del'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc739fcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc7223e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_del'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc7223e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_del'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc6f6b8820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e6fbeb0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e6fbeb0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc6e6fbf50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e6fb780> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e6fb780> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_del'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_del'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_del'>, space = StdObjSpace target = <function test_del at 0xfffc6e6eb650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) w_func = <Function test_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 pycode = <code object test_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00g\x00\x00\x89\x00\x00d\x02\x00f\x00\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...00\xca\x00\x00\x01\xcc\x18\x00\x88\x00\x00d\x04\x00d\x04\x00g\x02\x00k\x02\x00s\xce\x00t\x02\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00g\x00\x00\x89\x00\x00d\x02\x00f\x00\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...00\xca\x00\x00\x01\xcc\x18\x00\x88\x00\x00d\x04\x00d\x04\x00g\x02\x00k\x02\x00s\xce\x00t\x02\x00\x82\x01\x00d\x00\x00S' next_instr = 64L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...64/build/pypy/module/__builtin__/test/test_classobj.py:668]', line 1> at line 9 nameindex = 1, ignored = (64L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _________________________ AppTestOldstyle.test_weakref _________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc6e6eb2d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc739fcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc7223e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc7223e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc6e70b190> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e70ba00> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6e70ba00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc6dae3be0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6dae3b90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc6dae3b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_weakref'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref'>, space = StdObjSpace target = <function test_weakref at 0xfffc6e49d6d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) w_func = <Function test_weakref> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc6e78d090>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_weakref, file '[/build_dir/own-linux-aarch64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 pycode = <code object test_weakref, file '[/build_dir/own-linux-aarch64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00f\x00\x00d\x03\x00\x84\x00\x00\x83\x...xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\x97\x00t\x03\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00f\x00\x00d\x03\x00\x84\x00\x00\x83\x...xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\x97\x00t\x03\x00\x82\x01\x00d\x00\x00S' next_instr = 103L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc6eeeebd0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...64/build/pypy/module/__builtin__/test/test_classobj.py:725]', line 1> at line 9 nameindex = 4, ignored = (103L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6eeff950> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/__builtin__/test/test_classobj.py::AppTestOldstyle::()::test_del FAIL module/__builtin__/test/test_classobj.py::AppTestOldstyle::()::test_weakref =============== 2 failed, 302 passed, 1 skipped in 31.44 seconds =============== ++ 07:39:10 starting module/__pypy__/test [6 started in total] __ interpreter/astcompiler/test [3 done in total, somefailed=False] ___________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 447 items interpreter/astcompiler/test/apptest_misc.py . interpreter/astcompiler/test/test_ast.py ....... interpreter/astcompiler/test/test_astbuilder.py ..................................................... interpreter/astcompiler/test/test_compiler.py .......................................................................................................................................................................................................................................................................................................................................................................... interpreter/astcompiler/test/test_misc.py . interpreter/astcompiler/test/test_symtable.py ....................... ========================= 447 passed in 57.56 seconds ========================== ++ 07:39:25 starting module/_ast/test [7 started in total] __ module/__pypy__/test [4 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 68 items module/__pypy__/test/test_builders.py ..... module/__pypy__/test/test_bytebuffer.py .. module/__pypy__/test/test_debug.py ....... module/__pypy__/test/test_identitydict.py ...... module/__pypy__/test/test_intop.py ........... module/__pypy__/test/test_locals2fast.py ..... module/__pypy__/test/test_magic.py .....s. module/__pypy__/test/test_newmemoryview.py ... module/__pypy__/test/test_os.py . module/__pypy__/test/test_signal.py ....s module/__pypy__/test/test_special.py ............s module/__pypy__/test/test_time.py ... ==================== 65 passed, 3 skipped in 19.97 seconds ===================== ++ 07:39:33 starting module/_cffi_backend/test [8 started in total] __ module/_ast/test [5 done in total, somefailed=False] _______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 36 items module/_ast/test/test_ast.py .................................... ========================== 36 passed in 13.82 seconds ========================== ++ 07:39:40 starting module/_codecs/test [9 started in total] __ module/_codecs/test [6 done in total, somefailed=False] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 65 items module/_codecs/test/test_codecs.py ................................................................ module/_codecs/test/test_ztranslation.py . ========================== 65 passed in 24.67 seconds ========================== ++ 07:40:08 starting module/_continuation/test [10 started in total] __ module/_continuation/test [7 done in total, somefailed=False] ______________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 91 items / 1 skipped module/_continuation/test/test_generator.py .... module/_continuation/test/test_greenlet.py ............................ module/_continuation/test/test_stacklet.py ...................................s... module/_continuation/test/test_zpickle.py .................... ==================== 90 passed, 2 skipped in 61.28 seconds ===================== ++ 07:41:13 starting module/_cppyy/test [11 started in total] __ module/_cffi_backend/test [8 done in total, somefailed=True] _______________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 466 items module/_cffi_backend/test/test_c.py ....................................................................................s.....................F.....................F........s.....s.......................s..Exception KeyError: (<C object Array of Char {'nolength': True} at 0xfffdd86632e0>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7e5f510>> ignored F........FException KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '9', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927150>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '8', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927b50>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '7', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd79273d0>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '6', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd79276d0>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '5', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927050>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '4', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd795d350>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '3', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7933690>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '2', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd795dd10>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '1', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792e490>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '0', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7955710>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '9', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd79450d0>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '8', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792e310>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '7', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792e090>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '6', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792ba10>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '5', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792b950>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '4', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792b850>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '3', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd792b3d0>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '2', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927d90>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '1', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927f10>> ignored Exception KeyError: (<array [ 'h', 'i', ' ', 't', 'h', 'e', 'r', 'e', ' ', '0', '\x00' ]>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffdd7927b90>> ignored F..............F.s........................s...... module/_cffi_backend/test/test_fastpath.py .................. module/_cffi_backend/test/test_ffi_obj.py ..............................F.............. module/_cffi_backend/test/test_file.py s.. module/_cffi_backend/test/test_parse_c_type.py ..............s... module/_cffi_backend/test/test_re_python.py .................... module/_cffi_backend/test/test_recompiler.py .........................................................................................s..s............................... module/_cffi_backend/test/test_unicode_literals.py ....... module/_cffi_backend/test/test_wchar_helper.py . module/_cffi_backend/test/test_ztranslation.py s =================================== FAILURES =================================== ____________________________ AppTestC.test_weakref _____________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd8367e50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd6e479b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6e47b90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6e47b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd6e47140> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd836a9b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd836a9b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_weakref'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref'>, space = StdObjSpace target = <function test_weakref at 0xfffdd7eee7d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_weakref> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_weakref, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 pycode = <code object test_weakref, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref> code = <code object test_weakref, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:320]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 pycode = <code object test_weakref, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00d\x02\x00\x83\x01\x00}\x01\x00t\x02\x00|\x01\x00\x83\x01\x00}\x02\x00|\x...x00|\x03\x00\xcb\x00\x00D]\x0c\x00}\x06\x00d\x00\x00^\x02\x00q\xd9\x00k\x02\x00r\xf2\x00Pq\x9d\x00q\x9d\x00Wd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00d\x02\x00\x83\x01\x00}\x01\x00t\x02\x00|\x01\x00\x83\x01\x00}\x02\x00|\x...x00|\x03\x00\xcb\x00\x00D]\x0c\x00}\x06\x00d\x00\x00^\x02\x00q\xd9\x00k\x02\x00r\xf2\x00Pq\x9d\x00q\x9d\x00Wd\x00\x00S' next_instr = 181L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref,.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 1793> at line 1804 nameindex = 9, ignored = (181L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________________________ AppTestC.test_keepalive_struct ________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd72f2a50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keepalive_struct'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keepalive_struct'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keepalive_struct'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7ed3e60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7e2beb0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7e2beb0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7e2be60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7e2b8c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7e2b8c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keepalive_struct'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_keepalive_struct'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_keepalive_struct'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_keepalive_struct'>, space = StdObjSpace target = <function test_keepalive_struct at 0xfffdd7df62d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_keepalive_struct> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_keepalive_struct> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_keepalive_struct> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_keepalive_struct, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 pycode = <code object test_keepalive_struct, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_keepalive_struct>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_keepalive_struct>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_keepalive_struct> code = <code object test_keepalive_struct, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:386]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 pycode = <code object test_keepalive_struct, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 co_code = 't\x00\x00d\x01\x00\x83\x01\x00}\x00\x00t\x01\x00|\x00\x00\x83\x01\x00}\x01\x00t\x02\x00|\x00\x00d\x02\x00t\x03\x00d\x...\x02\x00sE\x01t\x06\x00\x82\x01\x00\xcc\x15\x00|\x03\x00j\x07\x00d\n\x00k\x02\x00s]\x01t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 co_code = 't\x00\x00d\x01\x00\x83\x01\x00}\x00\x00t\x01\x00|\x00\x00\x83\x01\x00}\x01\x00t\x02\x00|\x00\x00d\x02\x00t\x03\x00d\x...\x02\x00sE\x01t\x06\x00\x82\x01\x00\xcc\x15\x00|\x03\x00j\x07\x00d\n\x00k\x02\x00s]\x01t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 270L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 2303> at line 2321 nameindex = 11, ignored = (270L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________________________ AppTestC.test_buffer_keepalive ________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd795bcd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_keepalive'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_keepalive'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_keepalive'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7c92be0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c92500> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c92500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7c84460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c842d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c842d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_buffer_keepalive'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_buffer_keepalive'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_buffer_keepalive'>, space = StdObjSpace target = <function test_buffer_keepalive at 0xfffdd7931c50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_buffer_keepalive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_buffer_keepalive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_buffer_keepalive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_buffer_keepalive, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 pycode = <code object test_buffer_keepalive, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_buffer_keepalive>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_buffer_keepalive>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_buffer_keepalive> code = <code object test_buffer_keepalive, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:512]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 pycode = <code object test_buffer_keepalive, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> next_instr = 52 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 co_code = 't\x00\x00t\x01\x00d\x01\x00\x83\x01\x00\x83\x01\x00}\x00\x00t\x02\x00|\x00\x00d\x00\x00\x83\x02\x00}\x01\x00g\x00\x00...d\x00|\x06\x00\x1et\x05\x00d\x05\x00|\x03\x00\x16\x83\x01\x00k\x02\x00s\xbd\x00t\n\x00\x82\x01\x00q\x8d\x00Wd\x00\x00S' next_instr = 52 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 co_code = 't\x00\x00t\x01\x00d\x01\x00\x83\x01\x00\x83\x01\x00}\x00\x00t\x02\x00|\x00\x00d\x00\x00\x83\x02\x00}\x01\x00g\x00\x00...d\x00|\x06\x00\x1et\x05\x00d\x05\x00|\x03\x00\x16\x83\x01\x00k\x02\x00s\xbd\x00t\n\x00\x82\x01\x00q\x8d\x00Wd\x00\x00S' next_instr = 124L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3101> at line 3108 nameindex = 9, ignored = (124L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________________ AppTestC.test_new_handle ___________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd7efbad0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7c6caf0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c6c3c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c6c3c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7c6cb40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c6ce60> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7c6ce60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_new_handle'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_new_handle'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_new_handle'>, space = StdObjSpace target = <function test_new_handle at 0xfffdd77c7850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_new_handle> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_new_handle> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_new_handle, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 pycode = <code object test_new_handle, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_new_handle>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle> code = <code object test_new_handle, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:539]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 pycode = <code object test_new_handle, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00t\x02\x00\x83\x00\x00\x83\x01\x00}\x01\x00t\x01\x00t\x03\x00d\x02\x00\x8...07\x00\x82\x01\x00t\x0e\x00\xc9\x0f\x00t\x10\x00t\x08\x00t\t\x00|\x02\x00d\n\x00\x83\x02\x00\xca\x03\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00t\x02\x00\x83\x00\x00\x83\x01\x00}\x01\x00t\x01\x00t\x03\x00d\x02\x00\x8...07\x00\x82\x01\x00t\x0e\x00\xc9\x0f\x00t\x10\x00t\x08\x00t\t\x00|\x02\x00d\n\x00\x83\x02\x00\xca\x03\x00\x01d\x00\x00S' next_instr = 244L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3223> at line 3237 nameindex = 12, ignored = (244L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________________________ AppTestC.test_new_handle_cycle ________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd77c79d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle_cycle'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle_cycle'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_new_handle_cycle'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd6d7a500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ndle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6d7a7d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6d7a7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ndle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd6d7a550> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ndle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6d7a5a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6d7a5a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ndle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_new_handle_cycle'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_new_handle_cycle'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_new_handle_cycle'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_new_handle_cycle'>, space = StdObjSpace target = <function test_new_handle_cycle at 0xfffdd73ea850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_new_handle_cycle> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_new_handle_cycle> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle_cycle> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_new_handle_cycle, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 pycode = <code object test_new_handle_cycle, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_new_handle_cycle>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle_cycle>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_new_handle_cycle> code = <code object test_new_handle_cycle, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:542]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 pycode = <code object test_new_handle_cycle, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00t\x02\x00\x83\x00\x00\x83\x01\x00}\x01\x00d\x02\x00t\x03\x00f\x01\x00d\x...\xca\x00\x00\x01qk\x00qk\x00W\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00s\xb5\x00t\n\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00t\x01\x00t\x02\x00\x83\x00\x00\x83\x01\x00}\x01\x00d\x02\x00t\x03\x00f\x01\x00d\x...\xca\x00\x00\x01qk\x00qk\x00W\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00s\xb5\x00t\n\x00\x82\x01\x00d\x00\x00S' next_instr = 146L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3248> at line 3259 nameindex = 9, ignored = (146L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError __________________ AppTestC.test_from_buffer_not_str_unicode ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd77b9850>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, ...ticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, ...ticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, ...ticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7a79140> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...tr_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6eedaf0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd6eedaf0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...tr_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd6eeda00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...tr_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd70af640> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd70af640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...tr_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_from_buffer_not_str_unicode'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_from_buffer_not_str_unicode'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_from_buffer_not_str_unicode'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_from_buffer_not_str_unicode'>, space = StdObjSpace target = <function test_from_buffer_not_str_unicode at 0xfffdd7a3bd50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) w_func = <Function test_from_buffer_not_str_unicode> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_from_buffer_not_str_unicode> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_from_buffer_not_str_unicode> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd8dce7d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_from_buffer_not_str_unicode, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 pycode = <code object test_from_buffer_not_str_unicode, file '[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 oparg = 0, ignored = (21L,), n_args = 0, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_from_buffer_not_str_unicode> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 dropvalues = 2, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_from_buffer_not_str_unicode>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 dropvalues = 2, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_from_buffer_not_str_unicode> code = <code object test_from_buffer_not_str_unicode, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...[/tmp/pytest/usession-win-rpython-76/test_c/_test_c.py:587]', line 1> at line 3 dropvalues = 2 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 pycode = <code object test_from_buffer_not_str_unicode, file '/tmp/pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 co_code = 't\x00\x00d\x01\x00\x83\x01\x00}\x00\x00t\x01\x00|\x00\x00\x83\x01\x00}\x01\x00t\x02\x00|\x01\x00d\x00\x00\x83\x02\x00...}\x07\x00\xcc\x1a\x00|\x06\x00|\x07\x00\x19|\x03\x00|\x07\x00\x19k\x02\x00sR\x02t\x04\x00\x82\x01\x00q/\x02Wd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 co_code = 't\x00\x00d\x01\x00\x83\x01\x00}\x00\x00t\x01\x00|\x00\x00\x83\x01\x00}\x01\x00t\x02\x00|\x01\x00d\x00\x00\x83\x02\x00...}\x07\x00\xcc\x1a\x00|\x06\x00|\x07\x00\x19|\x03\x00|\x07\x00\x19k\x02\x00sR\x02t\x04\x00\x82\x01\x00q/\x02Wd\x00\x00S' next_instr = 102L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd8edc950> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf.../pytest/usession-win-rpython-76/test_c/_all_test_c.py', line 3706> at line 3712 nameindex = 6, ignored = (102L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd913ae90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________ AppTestFFIObj.test_ffi_gc_disable _______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdd7946850>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ffi_gc_disable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffddda1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ffi_gc_disable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffddc25ab40>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ffi_gc_disable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7895690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7895cd0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd7895cd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdd7895550> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd78957d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdd78957d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_ffi_gc_disable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_ffi_gc_disable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_ffi_gc_disable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_ffi_gc_disable'>, space = StdObjSpace target = <function test_ffi_gc_disable at 0xfffdd78853d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd734e550>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd734e550>,) w_func = <Function test_ffi_gc_disable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd734e550> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_ffi_gc_disable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd734e550>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_ffi_gc_disable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdd734e550>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_ffi_gc_disable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 pycode = <code object test_ffi_gc_disable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd78a0710> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00}\x02\x00|\x02\x00\xc9\x02\x00d\x02\x00d\x03\x00...\x00\xca\x00\x00\x01q\xe1\x00W\xcc\x15\x00\x88\x00\x00d\x08\x00g\x01\x00k\x02\x00s#\x01t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd78a0710> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00\xca\x00\x00}\x02\x00|\x02\x00\xc9\x02\x00d\x02\x00d\x03\x00...\x00\xca\x00\x00\x01q\xe1\x00W\xcc\x15\x00\x88\x00\x00d\x08\x00g\x01\x00k\x02\x00s#\x01t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 148L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdd78a0710> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_ffi_gc_d...4/build/pypy/module/_cffi_backend/test/test_ffi_obj.py:395]', line 1> at line 9 nameindex = 6, ignored = (148L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdd78a85d0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd78a85d0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdd78a85d0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_weakref FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_keepalive_struct FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_buffer_keepalive FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_new_handle FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_new_handle_cycle FAIL module/_cffi_backend/test/test_c.py::AppTestC::()::test_from_buffer_not_str_unicode FAIL module/_cffi_backend/test/test_ffi_obj.py::AppTestFFIObj::()::test_ffi_gc_disable ============== 7 failed, 448 passed, 11 skipped in 115.34 seconds ============== ++ 07:41:37 starting module/_csv/test [12 started in total] __ module/_csv/test [9 done in total, somefailed=False] _______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 23 items module/_csv/test/test_dialect.py ......... module/_csv/test/test_reader.py ......... module/_csv/test/test_writer.py .... module/_csv/test/test_ztranslation.py . ========================== 23 passed in 9.50 seconds =========================== ++ 07:41:47 starting module/_demo/test [13 started in total] __ module/_demo/test [10 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/_demo/test/test_import.py .. module/_demo/test/test_sieve.py . =========================== 3 passed in 5.22 seconds =========================== ++ 07:41:54 starting module/_file/test [14 started in total] __ interpreter/pyparser/test [11 done in total, somefailed=False] _____________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 119 items interpreter/pyparser/test/test_automata.py ... interpreter/pyparser/test/test_future.py ..................................... interpreter/pyparser/test/test_gendfa.py . interpreter/pyparser/test/test_metaparser.py ............... interpreter/pyparser/test/test_parser.py ............. interpreter/pyparser/test/test_parsestring.py ......... interpreter/pyparser/test/test_pyparse.py .................................... interpreter/pyparser/test/test_pytokenizer.py ..... ========================= 119 passed in 17.71 seconds ========================== ++ 07:42:00 starting module/_io/test [15 started in total] __ interpreter/test [12 done in total, somefailed=True] _______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 772 items interpreter/test/apptest_class.py ............... interpreter/test/apptest_exec.py ............................ interpreter/test/apptest_function.py ........................s.............................. interpreter/test/apptest_generator.py ......................F........... interpreter/test/apptest_nestedscope.py ............. interpreter/test/apptest_pyframe.py ............................. interpreter/test/apptest_raise.py ..................... interpreter/test/test_app_main.py ....ssssssssssssssssssssssssss.sssssss.............s...s..s...... interpreter/test/test_appinterp.py ............. interpreter/test/test_argument.py ................................... interpreter/test/test_buffer.py .. interpreter/test/test_cellfamily.py ....... interpreter/test/test_code.py ........ interpreter/test/test_compiler.py ......................................................................................................................... interpreter/test/test_descrtypecheck.py .. interpreter/test/test_error.py .......... interpreter/test/test_exceptcomp.py ........... interpreter/test/test_exec.py . interpreter/test/test_executioncontext.py ................ interpreter/test/test_extmodules.py . interpreter/test/test_function.py .......... interpreter/test/test_gateway.py ........................................ss............ interpreter/test/test_generator.py . interpreter/test/test_interpreter.py .......................... interpreter/test/test_main.py .... interpreter/test/test_mixedmodule.py ...... interpreter/test/test_module.py ........ interpreter/test/test_objspace.py .............................. interpreter/test/test_pycode.py . interpreter/test/test_pyframe.py .. interpreter/test/test_reverse_debugging.py .. interpreter/test/test_special.py .. interpreter/test/test_syntax.py .................................................................... interpreter/test/test_targetpypy.py .. interpreter/test/test_typedef.py ....F.......F..... interpreter/test/test_unicodehelper.py .......... interpreter/test/test_zpy.py ...... interpreter/test/test_zzpickle_and_slow.py ...............s................... =================================== FAILURES =================================== ____________________________ test_close_on_collect _____________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffe581018d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_close_on_collect'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe5cc9aed0> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe5b486d70>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_close_on_collect'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe5b486d70>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_close_on_collect'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe58076690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe580760a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe580760a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe58076e10> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe58076230> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe58076230> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_close_on_collect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_close_on_collect'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_close_on_collect'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_close_on_collect'>, space = StdObjSpace w_func = <Function test_close_on_collect> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_close_on_collect>, args_w = () nargs = 0, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_close_on_collect>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_close_on_collect, file '/build_dir/own-linux-aarch64/build/pypy/interpreter/test/apptest_generator.py', line 213> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 pycode = <code object test_close_on_collect, file '/build_dir/own-linux-aarch64/build/pypy/interpreter/test/apptest_generator.py', line 213> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe58c340d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00\x87\x00\x00f\x01\x00d\x02\x00\x86\x00\x00\x89\x00\x00\x88\x00\x00\x83\x00\x00}\x...x04\x00\xc9\x0b\x00|\x06\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x02\x00\x04}\x04\x00}\x03\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe58c340d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00\x87\x00\x00f\x01\x00d\x02\x00\x86\x00\x00\x89\x00\x00\x88\x00\x00\x83\x00\x00}\x...x04\x00\xc9\x0b\x00|\x06\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x02\x00\x04}\x04\x00}\x03\x00d\x00\x00S' next_instr = 55L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe58c340d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_close_on...arch64/build/pypy/interpreter/test/apptest_generator.py', line 213> at line 223 nameindex = 2, ignored = (55L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffe58f43fd0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe58f43fd0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe58f43fd0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _______________________ TestTypeDef.test_subclass_cache ________________________ self = <pypy.interpreter.test.test_typedef.TestTypeDef instance at 0xfffe562aedc0> def test_subclass_cache(self): # check that we don't create more than 6 subclasses of a # given W_XxxObject (instead of the 16 that follow from # all combinations) space = self.space sources = [] for hasdict in [False, True]: for wants_slots in [False, True]: for needsdel in [False, True]: for weakrefable in [False, True]: print 'Testing case', hasdict, wants_slots, print needsdel, weakrefable slots = [] checks = [] if hasdict: slots.append('__dict__') checks.append('x.foo=5; x.__dict__') else: checks.append('raises(AttributeError, "x.foo=5");' 'raises(AttributeError, "x.__dict__")') if wants_slots: slots.append('a') checks.append('x.a=5; assert X.a.__get__(x)==5') else: checks.append('') if weakrefable: slots.append('__weakref__') checks.append('import _weakref;_weakref.ref(x)') else: checks.append('') if needsdel: methodname = '__del__' checks.append('X();X();X();' 'import gc;gc.collect();' 'assert seen') else: methodname = 'spam' checks.append('assert "Del" not in irepr') assert len(checks) == 4 space.appexec([], """(): seen = [] class X(list): __slots__ = %r def %s(self): seen.append(1) x = X() import __pypy__ irepr = __pypy__.internal_repr(x) print irepr %s %s %s %s """ % (slots, methodname, checks[0], checks[1], > checks[2], checks[3])) interpreter/test/test_typedef.py:128: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ interpreter/baseobjspace.py:1479: in appexec return self.call_args(w_func, args) objspace/descroperation.py:186: in call_args return w_obj.call_args(args) interpreter/function.py:68: in call_args w_res = self.getcode().funcrun(self, args) interpreter/pycode.py:223: in funcrun return frame.run() interpreter/pyframe.py:253: in run return self.execute_frame() interpreter/pyframe.py:290: in execute_frame raise self._convert_unexpected_exception(e) interpreter/pyframe.py:943: in _convert_unexpected_exception operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:286: in execute_frame executioncontext) interpreter/pyopcode.py:63: in dispatch next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: in handle_bytecode next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:356: in dispatch_bytecode self.LOOKUP_METHOD(oparg, next_instr) objspace/std/callmethod.py:63: in LOOKUP_METHOD w_value = w_obj.getdictvalue(space, name) interpreter/mixedmodule.py:93: in getdictvalue return self._load_lazily(space, name) interpreter/mixedmodule.py:103: in _load_lazily w_value = loader(space) interpreter/mixedmodule.py:182: in ifileloader d[name] = __import__(pkgroot+'.'+name, None, None, [name]) module/gc/interp_gc.py:4: in <module> from pypy.module.gc.hook import W_GcCollectStepStats module/gc/hook.py:2: in <module> from rpython.memory.gc import incminimark _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ----------------------------- Captured stdout call ----------------------------- Testing case False False False False Testing case False False False True Testing case False False True False ________________________ AppTestTypeDef.test_destructor ________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffe568096d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe5cc9aed0> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe5b486d70>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe5b486d70>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe55b54320> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe55b54550> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe55b54550> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe55b542d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe56514910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe56514910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_destructor'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_destructor'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_destructor'>, space = StdObjSpace target = <function test_destructor at 0xfffe563c4450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe56402b90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe56402b90>,) w_func = <Function test_destructor> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe56402b90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_destructor> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe56402b90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_destructor> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe56402b90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_destructor, file '[/build_dir/own-linux-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 pycode = <code object test_destructor, file '[/build_dir/own-linux-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe570e5050> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00g\x00\x00\x89\x01\x00d\x02\x00t\x02\x00f\x...00s\xbd\x00t\x08\x00\x82\x01\x00t\t\x00t\n\x00\x88\x00\x00j\x06\x00|\x04\x00d\t\x00d\x06\x00\x83\x05\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe570e5050> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00g\x00\x00\x89\x01\x00d\x02\x00t\x02\x00f\x...00s\xbd\x00t\x08\x00\x82\x01\x00t\t\x00t\n\x00\x88\x00\x00j\x06\x00|\x04\x00d\t\x00d\x06\x00\x83\x05\x00\x01d\x00\x00S' next_instr = 128L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe570e5050> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...x-aarch64/build/pypy/interpreter/test/test_typedef.py:335]', line 1> at line 12 nameindex = 7, ignored = (128L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffe57f31110> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe57f31110> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe57f31110> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL interpreter/test/apptest_generator.py::test_close_on_collect FAIL interpreter/test/test_typedef.py::TestTypeDef::()::test_subclass_cache FAIL interpreter/test/test_typedef.py::AppTestTypeDef::()::test_destructor ============== 3 failed, 729 passed, 40 skipped in 211.89 seconds ============== ++ 07:42:05 starting module/_jitlog/test [16 started in total] __ module/_jitlog/test [13 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/_jitlog/test/test__jitlog.py . =========================== 1 passed in 4.31 seconds =========================== ++ 07:42:10 starting module/_locale/test [17 started in total] __ module/_locale/test [14 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 14 items module/_locale/test/test_locale.py ssssssssssssss ========================== 14 skipped in 3.43 seconds ========================== ++ 07:42:15 starting module/_lsprof/test [18 started in total] __ module/_lsprof/test [15 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/_lsprof/test/test_cprofile.py ...... =========================== 6 passed in 5.20 seconds =========================== ++ 07:42:21 starting module/_md5/test [19 started in total] __ module/_md5/test [16 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/_md5/test/test_md5.py .s.... ===================== 5 passed, 1 skipped in 7.86 seconds ====================== ++ 07:42:32 starting module/_minimal_curses/test [20 started in total] __ module/_minimal_curses/test [17 done in total, somefailed=False] ___________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/_minimal_curses/test/test_curses.py sss... ===================== 3 passed, 3 skipped in 14.67 seconds ===================== ++ 07:42:49 starting module/_multibytecodec/test [21 started in total] __ module/_cppyy/test [18 done in total, somefailed=True] _____________________ [platform:WARNING] cc1plus: warning: command-line option ‘-Wno-discarded-qualifiers’ is valid for C/ObjC but not for C++ [platform:WARNING] cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 191 items module/_cppyy/test/test_advancedcpp.py sssssssssssssssssssssssss module/_cppyy/test/test_boost.py sssss module/_cppyy/test/test_cpp11features.py s.s module/_cppyy/test/test_cppyy.py .....FFFFFF module/_cppyy/test/test_crossing.py ssss module/_cppyy/test/test_datatypes.py .......sssssssssssssss module/_cppyy/test/test_fragile.py sssssssssssss module/_cppyy/test/test_helper.py ...... module/_cppyy/test/test_operators.py sssssss module/_cppyy/test/test_overloads.py sssssss module/_cppyy/test/test_pythonify.py ..FFFsssssssssssss module/_cppyy/test/test_pythonization.py .ssssss module/_cppyy/test/test_regression.py ss module/_cppyy/test/test_stltypes.py sssssssssssssssssssssssss module/_cppyy/test/test_templates.py sssssssssssssssssssssssssssssssss module/_cppyy/test/test_zjit.py sss =================================== FAILURES =================================== __________________________ AppTestCPPYY.test05_memory __________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc5fe71750>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05_memory'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc677ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc6439a5a0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05_memory'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc6439a5a0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05_memory'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc5fe2baa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5fe2ba50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5fe2ba50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc5fe47280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5fe47aa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5fe47aa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05_memory'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test05_memory'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test05_memory'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test05_memory'>, space = StdObjSpace target = <function test05_memory at 0xfffc5fe5cd50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) w_func = <Function test05_memory> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test05_memory> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test05_memory> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test05_memory, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 pycode = <code object test05_memory, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00j\x02\x00}\x03\x00\xcc\x1e\x00|\x03\...1e\x00|\x03\x00\xc9\x03\x00d\x03\x00\xca\x01\x00\x83\x00\x00d\x04\x00k\x02\x00s\xd2\x01t\x04\x00\x82\x01\x00d\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00j\x02\x00}\x03\x00\xcc\x1e\x00|\x03\...1e\x00|\x03\x00\xc9\x03\x00d\x03\x00\xca\x01\x00\x83\x00\x00d\x04\x00k\x02\x00s\xd2\x01t\x04\x00\x82\x01\x00d\x02\x00S' next_instr = 219L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05_memory...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:129]', line 1> at line 18 nameindex = 6, ignored = (219L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _________________________ AppTestCPPYY.test05a_memory2 _________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc60443450>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05a_memory2'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc677ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc6439a5a0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05a_memory2'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc6439a5a0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test05a_memory2'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc5f76cb40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...5a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5f76c7d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5f76c7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...5a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc5f76ca00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...5a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5f76c8c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc5f76c8c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...5a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test05a_memory2'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test05a_memory2'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test05a_memory2'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test05a_memory2'>, space = StdObjSpace target = <function test05a_memory2 at 0xfffc5fc1ed50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) w_func = <Function test05a_memory2> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test05a_memory2> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test05a_memory2> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test05a_memory2, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 pycode = <code object test05a_memory2, file '[/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00j\x02\x00}\x03\x00\xcc\x1e\x00|\x03\...00k\x02\x00s\xc7\x00t\x04\x00\x82\x01\x00|\x03\x00\xc9\x03\x00d\x07\x00\xca\x01\x00d\x04\x00\x83\x01\x00\x01d\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00j\x02\x00}\x03\x00\xcc\x1e\x00|\x03\...00k\x02\x00s\xc7\x00t\x04\x00\x82\x01\x00|\x03\x00\xc9\x03\x00d\x07\x00\xca\x01\x00d\x04\x00\x83\x01\x00\x01d\x02\x00S' next_instr = 162L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc613b2690> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test05a_memor...x-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:161]', line 1> at line 15 nameindex = 9, ignored = (162L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc6254eed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________ AppTestCPPYY.test06_method_double _______________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def test06_method_double(self): """Test passing of a double and returning of double on a method.""" import _cppyy t = self.example01 e = self.instantiate(t, 13) res = t.get_overload("addDataToDouble")(e, 16) assert round(res-29, 8) == 0. e.__destruct__() e = self.instantiate(t, -13) res = t.get_overload("addDataToDouble")(e, 16) assert round(res-3, 8) == 0. e.__destruct__() > assert t.get_overload("getCount")() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>> = <CPPClassDecl object at 0x0000fffc60152350>.get_overload [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:182]:17: AssertionError ____________________ AppTestCPPYY.test07_method_constcharp _____________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def test07_method_constcharp(self): """Test passing of a C string and returning of a C string on a method.""" import _cppyy t = self.example01 e = self.instantiate(t, 42) res = t.get_overload("addDataToAtoi")(e, "13") assert res == 55 res = t.get_overload("addToStringValue")(e, "12") # TODO: this leaks assert res == "54" res = t.get_overload("addToStringValue")(e, "-12") # TODO: this leaks assert res == "30" e.__destruct__() > assert t.get_overload("getCount")() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>> = <CPPClassDecl object at 0x0000fffc60152350>.get_overload [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:200]:16: AssertionError __________________ AppTestCPPYY.test08_pass_object_by_pointer __________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def test08_pass_object_by_pointer(self): """Test passing of an instance as an argument.""" import _cppyy t1 = self.example01 t2 = self.payload pl = self.instantiate(t2, 3.14) assert round(t2.get_overload("getData")(pl)-3.14, 8) == 0 t1.get_overload("staticSetPayload")(pl, 41.) assert t2.get_overload("getData")(pl) == 41. e = self.instantiate(t1, 50) t1.get_overload("setPayload")(e, pl); assert round(t2.get_overload("getData")(pl)-50., 8) == 0 e.__destruct__() pl.__destruct__() > assert t1.get_overload("getCount")() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>> = <CPPClassDecl object at 0x0000fffc60152350>.get_overload [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:217]:19: AssertionError _________________ AppTestCPPYY.test09_return_object_by_pointer _________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc60152390> def test09_return_object_by_pointer(self): """Test returning of an instance as an argument.""" import _cppyy t1 = self.example01 t2 = self.payload pl1 = self.instantiate(t2, 3.14) assert round(t2.get_overload("getData")(pl1)-3.14, 8) == 0 pl2 = t1.get_overload("staticCyclePayload")(pl1, 38.) assert t2.get_overload("getData")(pl2) == 38. e = self.instantiate(t1, 50) pl2 = t1.get_overload("cyclePayload")(e, pl1); assert round(t2.get_overload("getData")(pl2)-50., 8) == 0 e.__destruct__() pl1.__destruct__() > assert t1.get_overload("getCount")() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffc60152350>> = <CPPClassDecl object at 0x0000fffc60152350>.get_overload [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_cppyy.py:237]:19: AssertionError _______________ AppTestPYTHONIFY.test03_constructing_and_calling _______________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5e334650> def test03_constructing_and_calling(self): """Test object and method calls.""" import _cppyy example01_class = _cppyy.gbl.example01 > assert example01_class.getCount() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <CPPStaticOverload object at 0x0000fffc5ff779d0> E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <class 'cppyy.gbl.example01'>.getCount [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_pythonify.py:68]:5: AssertionError ______________ AppTestPYTHONIFY.test04_passing_object_by_pointer _______________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5e334650> def test04_passing_object_by_pointer(self): import _cppyy example01_class = _cppyy.gbl.example01 payload_class = _cppyy.gbl.payload e = example01_class(14) pl = payload_class(3.14) assert round(pl.getData()-3.14, 8) == 0 example01_class.staticSetPayload(pl, 41.) assert pl.getData() == 41. example01_class.staticSetPayload(pl, 43.) assert pl.getData() == 43. e.staticSetPayload(pl, 45.) assert pl.getData() == 45. e.setPayload(pl) assert round(pl.getData()-14., 8) == 0 pl.__destruct__() e.__destruct__() > assert example01_class.getCount() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <CPPStaticOverload object at 0x0000fffc5ff779d0> E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <class 'cppyy.gbl.example01'>.getCount [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_pythonify.py:117]:22: AssertionError _____________ AppTestPYTHONIFY.test05_returning_object_by_pointer ______________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5e334650> def test05_returning_object_by_pointer(self): import _cppyy example01_class = _cppyy.gbl.example01 payload_class = _cppyy.gbl.payload pl = payload_class(3.14) assert round(pl.getData()-3.14, 8) == 0 pl2 = example01_class.staticCyclePayload(pl, 38.) assert pl2.getData() == 38. e = example01_class(14) pl2 = e.cyclePayload(pl) assert round(pl2.getData()-14., 8) == 0 pl.__destruct__() e.__destruct__() > assert example01_class.getCount() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <CPPStaticOverload object at 0x0000fffc5ff779d0>() E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <CPPStaticOverload object at 0x0000fffc5ff779d0> E + where <CPPStaticOverload object at 0x0000fffc5ff779d0> = <class 'cppyy.gbl.example01'>.getCount [/build_dir/own-linux-aarch64/build/pypy/module/_cppyy/test/test_pythonify.py:140]:19: AssertionError =========================== short test summary info ============================ FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test05_memory FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test05a_memory2 FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test06_method_double FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test07_method_constcharp FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test08_pass_object_by_pointer FAIL module/_cppyy/test/test_cppyy.py::AppTestCPPYY::()::test09_return_object_by_pointer FAIL module/_cppyy/test/test_pythonify.py::AppTestPYTHONIFY::()::test03_constructing_and_calling FAIL module/_cppyy/test/test_pythonify.py::AppTestPYTHONIFY::()::test04_passing_object_by_pointer FAIL module/_cppyy/test/test_pythonify.py::AppTestPYTHONIFY::()::test05_returning_object_by_pointer ============== 9 failed, 22 passed, 160 skipped in 95.24 seconds =============== ++ 07:43:10 starting module/_multiprocessing/test [22 started in total] __ module/_multibytecodec/test [19 done in total, somefailed=False] ___________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 51 items module/_multibytecodec/test/test_app_codecs.py ................ module/_multibytecodec/test/test_app_incremental.py ............ module/_multibytecodec/test/test_app_stream.py ..... module/_multibytecodec/test/test_c_codecs.py ................s module/_multibytecodec/test/test_translation.py . ==================== 50 passed, 1 skipped in 25.08 seconds ===================== ++ 07:43:17 starting module/_pypyjson/test [23 started in total] __ module/_pypyjson/test [20 done in total, somefailed=False] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 42 items / 1 skipped module/_pypyjson/test/test__pypyjson.py .......................................... ===================== 42 passed, 1 skipped in 5.99 seconds ===================== ++ 07:43:24 starting module/_random/test [24 started in total] __ module/_random/test [21 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 14 items module/_random/test/test_random.py ............. module/_random/test/test_ztranslation.py . ========================== 14 passed in 13.02 seconds ========================== ++ 07:43:38 starting module/_rawffi/alt/test [25 started in total] __ module/_rawffi/alt/test [22 done in total, somefailed=False] _______________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 73 items module/_rawffi/alt/test/test_ffitype.py ..... module/_rawffi/alt/test/test_funcptr.py ..................................ssssss.s module/_rawffi/alt/test/test_struct.py ............... module/_rawffi/alt/test/test_type_converter.py ........... ===================== 66 passed, 7 skipped in 7.59 seconds ===================== ++ 07:43:46 starting module/_rawffi/test [26 started in total] __ module/_rawffi/test [23 done in total, somefailed=True] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 83 items module/_rawffi/test/apptest_rawffi.py . module/_rawffi/test/test__rawffi.py .....s.............................................s..........s..n: 2 Arg 0: 3 Arg 1: 15 .FF module/_rawffi/test/test_exit.py . module/_rawffi/test/test_nested.py ...... module/_rawffi/test/test_struct.py ... module/_rawffi/test/test_tracker.py ... module/_rawffi/test/test_ztranslation.py . =================================== FAILURES =================================== ___________________ AppTestAutoFree.test_structure_autofree ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff5b2f8950>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_structure_autofree'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff6019cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff5e9de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_structure_autofree'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff5e9de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_structure_autofree'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff5b3ff280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...e_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5b336230> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5b336230> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...e_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff5b3368c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...e_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5b336b90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5b336b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...e_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_structure_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_structure_autofree'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_structure_autofree'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_structure_autofree'>, space = StdObjSpace target = <function test_structure_autofree at 0xffff5b303cd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) w_func = <Function test_structure_autofree> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_structure_autofree> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_structure_autofree> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_structure_autofree, file '[/build_dir/own-linux-aarch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 pycode = <code object test_structure_autofree, file '[/build_dir/own-linux-aarch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00\xca\x00\x00\x01|\x01\x0...ba\x00\xcc\x18\x00|\x04\x00|\x02\x00\xc9\x04\x00\xca\x00\x00k\x02\x00s\xb7\x00t\x08\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00\xca\x00\x00\x01|\x01\x0...ba\x00\xcc\x18\x00|\x04\x00|\x02\x00\xc9\x04\x00\xca\x00\x00k\x02\x00s\xb7\x00t\x08\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 30L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_structur...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1303]', line 1> at line 3 nameindex = 2, ignored = (30L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _____________________ AppTestAutoFree.test_array_autofree ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff5b899050>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_autofree'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff6019cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff5e9de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_autofree'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff5e9de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_autofree'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff5ac23820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...y_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5ac23870> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5ac23870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...y_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff5ac238c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...y_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5ac23b40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff5ac23b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...y_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_array_autofree'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_array_autofree'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_array_autofree'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_array_autofree'>, space = StdObjSpace target = <function test_array_autofree at 0xffff5b11d750> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) w_func = <Function test_array_autofree> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_array_autofree> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_array_autofree> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff5b31b190>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_array_autofree, file '[/build_dir/own-linux-aarch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 pycode = <code object test_array_autofree, file '[/build_dir/own-linux-aarch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00\xca\x00\x00\x01y\x10\x0...\xcb\x00\xcc\x18\x00|\x03\x00|\x02\x00\xc9\x03\x00\xca\x00\x00k\x02\x00s\xc8\x00t\t\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00\xca\x00\x00\x01y\x10\x0...\xcb\x00\xcc\x18\x00|\x03\x00|\x02\x00\xc9\x03\x00\xca\x00\x00k\x02\x00s\xc8\x00t\t\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 30L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff5bdd59d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_array_au...arch64/build/pypy/module/_rawffi/test/test__rawffi.py:1319]', line 1> at line 3 nameindex = 2, ignored = (30L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff5bd8ee10> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_rawffi/test/test__rawffi.py::AppTestAutoFree::()::test_structure_autofree FAIL module/_rawffi/test/test__rawffi.py::AppTestAutoFree::()::test_array_autofree =============== 2 failed, 78 passed, 3 skipped in 43.14 seconds ================ ++ 07:44:31 starting module/_sha/test [27 started in total] __ module/_io/test [24 done in total, somefailed=True] ________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 200 items module/_io/test/apptest_bytesio.py ...FF....... module/_io/test/apptest_io.py ........F....................... module/_io/test/apptest_stringio.py ......................... module/_io/test/apptest_textio.py .............F............. module/_io/test/test_bufferedio.py .......................................................F...................... module/_io/test/test_fileio.py ...................... module/_io/test/test_interp_textio.py .... =================================== FAILURES =================================== __________________________________ test_write __________________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbe252a950>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_write'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbe6e3cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_write'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_write'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe244d0f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe244ddc0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe244ddc0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe244d550> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe244d410> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe244d410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_write'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_write'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_write'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_write'>, space = StdObjSpace w_func = <Function test_write> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_write>, args_w = (), nargs = 0 Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_write>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_write, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 pycode = <code object test_write, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 co_code = 't\x00\x00\xc9\x01\x00\xca\x00\x00}\x00\x00|\x00\x00j\x02\x00}\x01\x00d\x01\x00}\x02\x00|\x01\x00|\x02\x00\x83\x01\x00...00\x82\x01\x00d\x00\x00\x04}\x01\x00\x04}\x02\x00\x04}\x03\x00}\x0b\x00|\x00\x00\xc9\x12\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 co_code = 't\x00\x00\xc9\x01\x00\xca\x00\x00}\x00\x00|\x00\x00j\x02\x00}\x01\x00d\x01\x00}\x02\x00|\x01\x00|\x02\x00\x83\x01\x00...00\x82\x01\x00d\x00\x00\x04}\x01\x00\x04}\x02\x00\x04}\x03\x00}\x0b\x00|\x00\x00\xc9\x12\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 881L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write, f...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 32> at line 38 nameindex = 16, ignored = (881L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError __________________________________ test_read ___________________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbe1b3b0d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_read'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbe6e3cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_read'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_read'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe24dcc30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe24dcfa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe24dcfa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe24dce10> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe24dcf50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe24dcf50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_read'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_read'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_read'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_read'>, space = StdObjSpace w_func = <Function test_read> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_read>, args_w = (), nargs = 0 Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_read>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_read, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 pycode = <code object test_read, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 co_code = 't\x00\x00\xc9\x01\x00d\x01\x00\xca\x01\x00}\x00\x00|\x00\x00j\x02\x00}\x01\x00|\x01\x00\x83\x00\x00}\x02\x00d\x01\x00...1\x00d\x00\x00\x04}\x01\x00\x04}\x02\x00\x04}\x04\x00\x04}\t\x00}\x08\x00|\x00\x00\xc9\r\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 co_code = 't\x00\x00\xc9\x01\x00d\x01\x00\xca\x01\x00}\x00\x00|\x00\x00j\x02\x00}\x01\x00|\x01\x00\x83\x00\x00}\x02\x00d\x01\x00...1\x00d\x00\x00\x04}\x01\x00\x04}\x02\x00\x04}\x04\x00\x04}\t\x00}\x08\x00|\x00\x00\xc9\r\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 271L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2c4c9d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read, fi...nux-aarch64/build/pypy/module/_io/test/apptest_bytesio.py', line 42> at line 45 nameindex = 12, ignored = (271L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2eaced0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _______________________________ test_destructor ________________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbe2969d50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbe6e3cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe1aab460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe1aab3c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe1aab3c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe1aab370> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe1aab4b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe1aab4b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_destructor'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_destructor'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_destructor'>, space = StdObjSpace w_func = <Function test_destructor> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_destructor>, args_w = (), nargs = 0 Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_destructor>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_destructor, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 pycode = <code object test_destructor, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2b0edd0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\x01g\x00\x00\x89\x01\x00d\x02\x00|\x00\x00j\x01...\x00t\n\x00t\x04\x00\xc9\x0b\x00|\x05\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x03\x00}\x02\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2b0edd0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\x01g\x00\x00\x89\x01\x00d\x02\x00|\x00\x00j\x01...\x00t\n\x00t\x04\x00\xc9\x0b\x00|\x05\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x03\x00}\x02\x00d\x00\x00S' next_instr = 87L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe2b0edd0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...n-linux-aarch64/build/pypy/module/_io/test/apptest_io.py', line 93> at line 108 nameindex = 3, ignored = (87L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbe2be1d90> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2be1d90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2be1d90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _______________________________ test_destructor ________________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbe141bb50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbe6e3cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_destructor'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe0861aa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe0861820> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe0861820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe0861cd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe0861c30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe0861c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_destructor'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_destructor'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_destructor'>, space = StdObjSpace w_func = <Function test_destructor> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_destructor>, args_w = (), nargs = 0 Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_destructor>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_destructor, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 pycode = <code object test_destructor, file '/build_dir/own-linux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe26d63d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 co_code = 'g\x00\x00\x89\x00\x00d\x01\x00t\x00\x00j\x01\x00f\x01\x00\x87\x00\x00f\x01\x00d\x02\x00\x86\x00\x00\x83\x00\x00Y}\x00...\x00t\x0c\x00t\x06\x00\xc9\r\x00|\x07\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x05\x00}\x04\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe26d63d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 co_code = 'g\x00\x00\x89\x00\x00d\x01\x00t\x00\x00j\x01\x00f\x01\x00\x87\x00\x00f\x01\x00d\x02\x00\x86\x00\x00\x83\x00\x00Y}\x00...\x00t\x0c\x00t\x06\x00\xc9\r\x00|\x07\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x05\x00}\x04\x00d\x00\x00S' next_instr = 101L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe26d63d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...ux-aarch64/build/pypy/module/_io/test/apptest_textio.py', line 140> at line 150 nameindex = 5, ignored = (101L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbe2892850> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2892850> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe2892850> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ____________________ AppTestBufferedWriter.test_destructor _____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbdcaea750>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbe6e3cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbe567e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_destructor'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbdfe863c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe2b7de10> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe2b7de10> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe2b7daf0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe2b7dc30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe2b7dc30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_destructor'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_destructor'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_destructor'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_destructor'>, space = StdObjSpace target = <function test_destructor at 0xfffbdc637d50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbdc6033d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbdc6033d0>,) w_func = <Function test_destructor> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbdc6033d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_destructor> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbdc6033d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_destructor> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbdc6033d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_destructor, file '[/build_dir/own-linux-aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 pycode = <code object test_destructor, file '[/build_dir/own-linux-aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbde9cfc90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00g\x00\x00\x89\x01\x00d\x02\x00|\x01\x00j\x01\x00f\x01\x00\x87\x00\x00\x87\x01\x00...0\x00\x01\xcc\x1b\x00\x88\x01\x00d\x05\x00d\x06\x00d\x07\x00g\x03\x00k\x02\x00s\x87\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbde9cfc90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00g\x00\x00\x89\x01\x00d\x02\x00|\x01\x00j\x01\x00f\x01\x00\x87\x00\x00\x87\x01\x00...0\x00\x01\xcc\x1b\x00\x88\x01\x00d\x05\x00d\x06\x00d\x07\x00g\x03\x00k\x02\x00s\x87\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 101L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbde9cfc90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_destruct...aarch64/build/pypy/module/_io/test/test_bufferedio.py:362]', line 1> at line 16 nameindex = 5, ignored = (101L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbde98ad10> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbde98ad10> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbde98ad10> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_io/test/apptest_bytesio.py::test_write FAIL module/_io/test/apptest_bytesio.py::test_read FAIL module/_io/test/apptest_io.py::test_destructor FAIL module/_io/test/apptest_textio.py::test_destructor FAIL module/_io/test/test_bufferedio.py::AppTestBufferedWriter::()::test_destructor ==================== 5 failed, 195 passed in 156.59 seconds ==================== ++ 07:44:40 starting module/_socket/test [28 started in total] __ module/_sha/test [25 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/_sha/test/test_sha.py .s.... ===================== 5 passed, 1 skipped in 9.45 seconds ====================== ++ 07:44:41 starting module/_sre/test [29 started in total] __ module/_sre/test [26 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 139 items module/_sre/test/test_app_sre.py ..............................................s...................................s.s.............................. module/_sre/test/test_sre_buf.py ........................ ==================== 136 passed, 3 skipped in 40.31 seconds ==================== ++ 07:45:25 starting module/_vmprof/test [30 started in total] __ module/_multiprocessing/test [27 done in total, somefailed=False] __________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 24 items module/_multiprocessing/test/test_connection.py ..sss...... module/_multiprocessing/test/test_interp_semaphore.py . module/_multiprocessing/test/test_memory.py .. module/_multiprocessing/test/test_semaphore.py ....... module/_multiprocessing/test/test_win32.py ss module/_multiprocessing/test/test_ztranslation.py . ==================== 19 passed, 5 skipped in 129.96 seconds ==================== ++ 07:45:27 starting module/_warnings/test [31 started in total] __ module/_file/test [28 done in total, somefailed=True] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 269 items module/_file/test/test_file.py .................FF......sss...... module/_file/test/test_file_extra.py ..................................................................................................................................................................ss..............ss..............ss..............ss..................... module/_file/test/test_large_file.py .. =================================== FAILURES =================================== _____________________ AppTestFile.test_exception_from_del ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdf10ff950>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_from_del'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdf5b4cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdf438e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_from_del'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdf438e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_exception_from_del'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf10fd9b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...n_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf10fdaa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf10fdaa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...n_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf10fd2d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...n_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf10fd0a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf10fd0a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...n_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_exception_from_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_exception_from_del'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_exception_from_del'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_exception_from_del'>, space = StdObjSpace target = <function test_exception_from_del at 0xfffdf10bf0d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) w_func = <Function test_exception_from_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_exception_from_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_exception_from_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_exception_from_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 pycode = <code object test_exception_from_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00d\x01\x00...00\x00j\x05\x00\x83\x01\x00|\x06\x00\xc9\x0e\x00\xca\x00\x00k\x06\x00s\xfa\x00t\x0f\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00d\x01\x00...00\x00j\x05\x00\x83\x01\x00|\x06\x00\xc9\x0e\x00\xca\x00\x00k\x06\x00s\xfa\x00t\x0f\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 130L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_exceptio...nux-aarch64/build/pypy/module/_file/test/test_file.py:255]', line 1> at line 10 nameindex = 10, ignored = (130L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _______________________ AppTestFile.test_track_resources _______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdf10ff850>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdf5b4cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdf438e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdf438e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf0a3f820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf0a3f910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf0a3f910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf0a3f7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf0a3f8c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf0a3f8c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_track_resources'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_track_resources'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_track_resources'>, space = StdObjSpace target = <function test_track_resources at 0xfffdf0fb76d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) w_func = <Function test_track_resources> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_track_resources> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_track_resources> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_track_resources, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] return new_frame.run() elif nargs >= 1 and fast_natural_arity == Code.PASSTHROUGHARGS1: assert isinstance(code, gateway.BuiltinCodePassThroughArguments1) return code.funcrun_obj(self, args_w[0], Arguments(self.space, list(args_w[1:]))) > return self.call_args(Arguments(self.space, list(args_w))) interpreter/function.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_track_resources> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>]) def call_args(self, args): # delegate activation to code > w_res = self.getcode().funcrun(self, args) interpreter/function.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <code object test_track_resources, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> func = <Function test_track_resources> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf1790d90>]) def funcrun(self, func, args): frame = self.space.createframe(self, func.w_func_globals, func) sig = self._signature # speed hack fresh_frame = jit.hint(frame, access_directly=True, fresh_virtualizable=True) args.parse_into_scope(None, fresh_frame.locals_cells_stack_w, func.name, sig, func.defs_w) fresh_frame.init_cells() > return frame.run() interpreter/pycode.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 pycode = <code object test_track_resources, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x01\x00d\x01\x00d\x00\x00l\x02\x00\x89\x03\x00d\x...xca\x02\x00s\xfd\x00t\x07\x00\x82\x01\x00\xcc\x12\x00d\t\x00|\x03\x00k\x07\x00s\x12\x01t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x01\x00d\x01\x00d\x00\x00l\x02\x00\x89\x03\x00d\x...xca\x02\x00s\xfd\x00t\x07\x00\x82\x01\x00\xcc\x12\x00d\t\x00|\x03\x00k\x07\x00s\x12\x01t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 118L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: > self.CALL_FUNCTION(oparg, next_instr) interpreter/pyopcode.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 oparg = 2, next_instr = 118L def CALL_FUNCTION(self, oparg, next_instr): # XXX start of hack for performance if (oparg >> 8) & 0xff == 0: # Only positional arguments nargs = oparg & 0xff w_function = self.peekvalue(nargs) > w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1) interpreter/pyopcode.py:1233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function fn>, nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function fn>, nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function fn> code = <code object fn, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 1> at line 23 defs_to_load = 1, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 pycode = <code object fn, file '[/build_dir/own-linux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 co_code = '\x88\x03\x00\xc9\x00\x00|\x00\x00\xca\x01\x00\x01\x88\x02\x00\xc9\x01\x00\x88\x02\x00j\x02\x00d\x01\x00\xca\x02\x00}\...\x00|\x05\x00\x88\x03\x00_\x04\x00\x88\x03\x00\xc9\x00\x00t\x07\x00\xca\x01\x00\x01X|\x04\x00\xc9\x08\x00\xca\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 co_code = '\x88\x03\x00\xc9\x00\x00|\x00\x00\xca\x01\x00\x01\x88\x02\x00\xc9\x01\x00\x88\x02\x00j\x02\x00d\x01\x00\xca\x02\x00}\...\x00|\x05\x00\x88\x03\x00_\x04\x00\x88\x03\x00\xc9\x00\x00t\x07\x00\xca\x01\x00\x01X|\x04\x00\xc9\x08\x00\xca\x00\x00S' next_instr = 108L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf178af90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...nux-aarch64/build/pypy/module/_file/test/test_file.py:273]', line 5> at line 16 nameindex = 6, ignored = (108L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf1a65ed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_file/test/test_file.py::AppTestFile::()::test_exception_from_del FAIL module/_file/test/test_file.py::AppTestFile::()::test_track_resources ============== 2 failed, 256 passed, 11 skipped in 210.29 seconds ============== ++ 07:45:31 starting module/_weakref/test [32 started in total] __ module/_socket/test [29 done in total, somefailed=True] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 60 items module/_socket/test/test_sock_app.py ...............................F...........s.....s......... module/_socket/test/test_ztranslation.py . =================================== FAILURES =================================== ______________________ AppTestSocket.test_track_resources ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbe75eae50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbebd9cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbea5de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbea5de550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_track_resources'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe7252910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe75a5eb0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe75a5eb0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbe75a5d70> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe75a5fa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbe75a5fa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_track_resources'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_track_resources'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_track_resources'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_track_resources'>, space = StdObjSpace target = <function test_track_resources at 0xfffbe71f9150> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbe76a70d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbe76a70d0>,) w_func = <Function test_track_resources> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbe76a70d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_track_resources> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbe76a70d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_track_resources> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbe76a70d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_track_resources, file '[/build_dir/own-linux-aarch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 pycode = <code object test_track_resources, file '[/build_dir/own-linux-aarch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x02\x00d\x01\x00d\x00\x00l\x02\x00\x89\x03\x00d\x...t\x05\x00t\x07\x00\x83\x02\x00}\x03\x00\xcc\x12\x00|\x03\x00d\x03\x00k\x02\x00s\xed\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x02\x00d\x01\x00d\x00\x00l\x02\x00\x89\x03\x00d\x...t\x05\x00t\x07\x00\x83\x02\x00}\x03\x00\xcc\x12\x00|\x03\x00d\x03\x00k\x02\x00s\xed\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 102L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: > self.CALL_FUNCTION(oparg, next_instr) interpreter/pyopcode.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 oparg = 2, next_instr = 102L def CALL_FUNCTION(self, oparg, next_instr): # XXX start of hack for performance if (oparg >> 8) & 0xff == 0: # Only positional arguments nargs = oparg & 0xff w_function = self.peekvalue(nargs) > w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1) interpreter/pyopcode.py:1233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function fn>, nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function fn>, nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function fn> code = <code object fn, file '[/build_dir/own-linux-aarch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> nargs = 2 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_track_re...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 1> at line 23 defs_to_load = 1, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 pycode = <code object fn, file '[/build_dir/own-linux-aarch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 co_code = '\x88\x03\x00\xc9\x00\x00|\x00\x00\xca\x01\x00\x01\x88\x00\x00\xc9\x01\x00\x88\x00\x00j\x02\x00\x88\x00\x00j\x03\x00d\...00\x00|\x05\x00\x88\x03\x00_\x05\x00\x88\x03\x00\xc9\x00\x00t\x08\x00\xca\x01\x00\x01X|\x04\x00\xc9\t\x00\xca\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 co_code = '\x88\x03\x00\xc9\x00\x00|\x00\x00\xca\x01\x00\x01\x88\x00\x00\xc9\x01\x00\x88\x00\x00j\x02\x00\x88\x00\x00j\x03\x00d\...00\x00|\x05\x00\x88\x03\x00_\x05\x00\x88\x03\x00\xc9\x00\x00t\x08\x00\xca\x01\x00\x01X|\x04\x00\xc9\t\x00\xca\x00\x00S' next_instr = 114L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbe76bee90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object fn, file '[/b...rch64/build/pypy/module/_socket/test/test_sock_app.py:401]', line 5> at line 16 nameindex = 7, ignored = (114L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbe76e3790> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe76e3790> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbe76e3790> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_socket/test/test_sock_app.py::AppTestSocket::()::test_track_resources =============== 1 failed, 57 passed, 2 skipped in 46.37 seconds ================ ++ 07:45:31 starting module/_winreg/test [33 started in total] __ module/_winreg/test [30 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 0 items / 1 skipped ========================== 1 skipped in 0.04 seconds =========================== ++ 07:45:32 starting module/array/test [34 started in total] __ module/_warnings/test [31 done in total, somefailed=False] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 12 items module/_warnings/test/apptest_warnings.py ........... module/_warnings/test/test_warnings.py . ========================== 12 passed in 8.58 seconds =========================== ++ 07:45:37 starting module/binascii/test [35 started in total] __ module/_vmprof/test [32 done in total, somefailed=True] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 7 items module/_vmprof/test/test__vmprof.py F.... module/_vmprof/test/test_direct.py .. =================================== FAILURES =================================== _______________________ AppTestVMProf.test_import_vmprof _______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc57b80550>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import_vmprof'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc5ad1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc5955c960>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import_vmprof'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc5955c960>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_import_vmprof'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc56768cd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ort_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc56768870> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc56768870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ort_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc567685f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ort_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc56769cd0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc56769cd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ort_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_import_vmprof'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_import_vmprof'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_import_vmprof'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_import_vmprof'>, space = StdObjSpace target = <function test_import_vmprof at 0xfffc567eead0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5683d790>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5683d790>,) w_func = <Function test_import_vmprof> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5683d790> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_import_vmprof> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5683d790>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_import_vmprof> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc5683d790>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_import_vmprof, file '[/build_dir/own-linux-aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): # indirection for the optional arguments > return my_execute_frame(self, w_inputvalue, operr) module/_vmprof/interp_vmprof.py:20: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (<pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51, None, None) unique_id = 180, x = <* DEAD Struct vmprof_stack_s { c_next, c_value, c_kind }> def decorated_function(*args): unique_id = get_code_fn(*args)._vmprof_unique_id unique_id = rffi.cast(lltype.Signed, unique_id) # ^^^ removes the "known non-negative" hint for annotation # # Signals can occur at the two places (1) and (2), that will # have added a stack entry, but the function __vmprof_eval_vmprof # is not entered. This behaviour will swallow one Python stack frame # # Current fix: vmprof will discard this sample. (happens # very infrequently) # if not jit.we_are_jitted(): x = enter_code(unique_id) # (1) signal here try: > return func(*args) ../rpython/rlib/rvmprof/rvmprof.py:240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 pycode = <code object test_import_vmprof, file '[/build_dir/own-linux-aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc5699c990> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 co_code = 'e\x00\x00|\x00\x00j\x01\x00d\x01\x00\x83\x02\x00}\x01\x00|\x01\x00\xc9\x02\x00\xca\x00\x00}\x02\x00e\x00\x00|\x00\x00...\x00s\x9e\x01t\r\x00\x82\x01\x00\xcc\x16\x00|\x0c\x00|\n\x00d\r\x00\x17k\x05\x00s\xb7\x01t\r\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc5699c990> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 co_code = 'e\x00\x00|\x00\x00j\x01\x00d\x01\x00\x83\x02\x00}\x01\x00|\x01\x00\xc9\x02\x00\xca\x00\x00}\x02\x00e\x00\x00|\x00\x00...\x00s\x9e\x01t\r\x00\x82\x01\x00\xcc\x16\x00|\x0c\x00|\n\x00d\r\x00\x17k\x05\x00s\xb7\x01t\r\x00\x82\x01\x00d\x00\x00S' next_instr = 147L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc5699c990> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_import_v...aarch64/build/pypy/module/_vmprof/test/test__vmprof.py:15]', line 1> at line 51 nameindex = 9, ignored = (147L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc56c27f50> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc56c27f50> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc56c27f50> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_vmprof/test/test__vmprof.py::AppTestVMProf::()::test_import_vmprof ===================== 1 failed, 6 passed in 15.35 seconds ====================== ++ 07:45:42 starting module/bz2/test [36 started in total] __ module/binascii/test [33 done in total, somefailed=False] __________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 14 items module/binascii/test/test_binascii.py .............. ========================== 14 passed in 5.87 seconds =========================== ++ 07:45:44 starting module/cStringIO/test [37 started in total] __ module/_weakref/test [34 done in total, somefailed=True] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 42 items module/_weakref/test/test_weakref.py F..FFFF.FF..FFFFFFF.sF.......FF...FF...... =================================== FAILURES =================================== __________________________ AppTestWeakref.test_simple __________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff20f6ae50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_simple'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_simple'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_simple'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1fb3c230> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fb3c370> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fb3c370> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1fb3cd20> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fb3cc80> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fb3cc80> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_simple'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_simple'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_simple'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_simple'>, space = StdObjSpace target = <function test_simple at 0xffff1fbc7dd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_simple> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_simple> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_simple> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_simple, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 pycode = <code object test_simple, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x07\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\xd7\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x07\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\xd7\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 187L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_simple, ...aarch64/build/pypy/module/_weakref/test/test_weakref.py:7]', line 1> at line 12 nameindex = 7, ignored = (187L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _________________________ AppTestWeakref.test_callback _________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1fbc7c50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1ef2cbe0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fd06be0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fd06be0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1fd06410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fd065a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1fd065a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_callback'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback'>, space = StdObjSpace target = <function test_callback at 0xffff1f8f90d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_callback> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_callback> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_callback> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_callback, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 pycode = <code object test_callback, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...b3\x00t\x05\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x03\x00d\x00\x00k\x08\x00s\xcb\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...b3\x00t\x05\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x03\x00d\x00\x00k\x08\x00s\xcb\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 151L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:31]', line 1> at line 13 nameindex = 6, ignored = (151L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________ AppTestWeakref.test_callback_order ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f3c6ad0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_order'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_order'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_order'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f8238c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...back_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f823960> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f823960> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...back_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f823820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...back_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f823a00> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f823a00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...back_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_order'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_callback_order'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_order'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_order'>, space = StdObjSpace target = <function test_callback_order at 0xffff1f3c6ed0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_callback_order> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_callback_order> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_callback_order> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_callback_order, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 pycode = <code object test_callback_order, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x05\x00d\x06\x00k\x02\x00s\xa7\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x05\x00d\x06\x00k\x02\x00s\xa7\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 139L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:47]', line 1> at line 14 nameindex = 4, ignored = (139L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________ AppTestWeakref.test_dont_callback_if_weakref_dead _______________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f3c6b50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>...call__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>...call__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>...call__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f251f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...akref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f251e60> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f251e60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...akref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1ea8ef00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...akref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ea8eeb0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ea8eeb0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...akref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_callback_if_weakref_dead'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_dont_callback_if_weakref_dead'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_dont_callback_if_weakref_dead'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_dont_callback_if_weakref_dead'>, space = StdObjSpace target = <function test_dont_callback_if_weakref_dead at 0xffff1f2415d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_dont_callback_if_weakref_dead> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_dont_callback_if_weakref_dead> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_dont_callback_if_weakref_dead> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_dont_callback_if_weakref_dead, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 pycode = <code object test_dont_callback_if_weakref_dead, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x07\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x03\x00d\x04\x00k\x02\x00s\xfc\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x07\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x03\x00d\x04\x00k\x02\x00s\xfc\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 178L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_cal...arch64/build/pypy/module/_weakref/test/test_weakref.py:63]', line 1> at line 14 nameindex = 7, ignored = (178L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________________ AppTestWeakref.test_callback_cannot_ressurect _________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f493ed0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_cannot_ressurect'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_cannot_ressurect'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_cannot_ressurect'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f685320> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6855f0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6855f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f6850f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f685370> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f685370> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_cannot_ressurect'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_callback_cannot_ressurect'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_cannot_ressurect'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_cannot_ressurect'>, space = StdObjSpace target = <function test_callback_cannot_ressurect at 0xffff1f3c6e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_callback_cannot_ressurect> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_callback_cannot_ressurect> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_callback_cannot_ressurect> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_callback_cannot_ressurect, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 pycode = <code object test_callback_cannot_ressurect, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x03\x00d\x00\x00k\x08\x00s\xa4\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00\x88\x00\x00j\x03\x00d\x00\x00k\x08\x00s\xa4\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 136L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...arch64/build/pypy/module/_weakref/test/test_weakref.py:82]', line 1> at line 13 nameindex = 5, ignored = (136L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _____________ AppTestWeakref.test_correct_weakrefcount_after_death _____________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1fa70bd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_deat...l__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_deat...l__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_deat...l__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f486410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...fter_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4864b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4864b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...fter_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f486280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...fter_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f486a50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f486a50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...fter_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_correct_weakrefcount_after_death'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_correct_weakrefcount_after_death'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_correct_weakrefcount_after_death'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_correct_weakrefcount_after_death'> space = StdObjSpace target = <function test_correct_weakrefcount_after_death at 0xffff1fa70c50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_correct_weakrefcount_after_death> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_correct_weakrefcount_after_death> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_correct_weakrefcount_after_death> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_correct_weakrefcount_after_death, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 pycode = <code object test_correct_weakrefcount_after_death, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\x01\xcc\x1b\x00|\x01\x00\xc9\x04\x00|\x04\x00\xca\x01\x00d\x05\x00k\x02\x00s\xc9\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\x01\xcc\x1b\x00|\x01\x00\xc9\x04\x00|\x04\x00\xca\x01\x00d\x05\x00k\x02\x00s\xc9\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 124L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_correct_...rch64/build/pypy/module/_weakref/test/test_weakref.py:110]', line 1> at line 10 nameindex = 6, ignored = (124L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _____________________ AppTestWeakref.test_weakref_equality _____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1fa70dd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_equality'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_equality'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_equality'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f41faa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...f_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f41fcd0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f41fcd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...f_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f41fd70> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...f_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f41fc30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f41fc30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...f_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_equality'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_weakref_equality'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_equality'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_equality'>, space = StdObjSpace target = <function test_weakref_equality at 0xffff1ee3e5d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_weakref_equality> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref_equality> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref_equality> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_weakref_equality, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 pycode = <code object test_weakref_equality, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\x00k\x02\x00r_\x01t\x04\x00\x82\x01\x00\xcc\x12\x00|\x06\x00g\x00\x00k\x03\x00st\x01t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\x00k\x02\x00r_\x01t\x04\x00\x82\x01\x00\xcc\x12\x00|\x06\x00g\x00\x00k\x03\x00st\x01t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 187L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:125]', line 1> at line 17 nameindex = 5, ignored = (187L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _________________________ AppTestWeakref.test_hashing __________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1fbc7c50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_hashing'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_hashing'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_hashing'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f561b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f561870> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f561870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f561dc0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f561aa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f561aa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_hashing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_hashing'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_hashing'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_hashing'>, space = StdObjSpace target = <function test_hashing at 0xffff1f75b750> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_hashing> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_hashing> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_hashing> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_hashing, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 pycode = <code object test_hashing, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...ca\x01\x00}\x05\x00|\x02\x00\xc9\x06\x00\xca\x00\x00\x01t\x07\x00t\x08\x00t\x04\x00|\x05\x00\x83\x03\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...ca\x01\x00}\x05\x00|\x02\x00\xc9\x06\x00\xca\x00\x00\x01t\x07\x00t\x08\x00t\x04\x00|\x05\x00\x83\x03\x00\x01d\x00\x00S' next_instr = 112L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_hashing,...rch64/build/pypy/module/_weakref/test/test_weakref.py:171]', line 1> at line 10 nameindex = 6, ignored = (112L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________ AppTestWeakref.test_weakref_subclassing ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1ee3e650>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclassing'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclassing'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclassing'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f8505f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ubclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850690> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ubclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f8504b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ubclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850730> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850730> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ubclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclassing'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_weakref_subclassing'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_subclassing'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_subclassing'>, space = StdObjSpace target = <function test_weakref_subclassing at 0xffff1f3b2e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_weakref_subclassing> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref_subclassing> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref_subclassing> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_weakref_subclassing, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 pycode = <code object test_weakref_subclassing, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...sz\x01t\x06\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x04\x00d\x0b\x00k\x02\x00s\x92\x01t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...sz\x01t\x06\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x04\x00d\x0b\x00k\x02\x00s\x92\x01t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 302L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:186]', line 1> at line 22 nameindex = 9, ignored = (302L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________ AppTestWeakref.test_function_weakrefable ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f3b2b50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_function_weakrefable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_function_weakrefable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_function_weakrefable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f676820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6768c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6768c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f6766e0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f676960> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f676960> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_function_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_function_weakrefable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_function_weakrefable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_function_weakrefable'>, space = StdObjSpace target = <function test_function_weakrefable at 0xffff1edd66d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_function_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_function_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_function_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_function_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 pycode = <code object test_function_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00\x84\x00\x00}\x03\x00|\x01\x00\xc9\x...00\xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00ss\x00t\x03\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00\x84\x00\x00}\x03\x00|\x01\x00\xc9\x...00\xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00ss\x00t\x03\x00\x82\x01\x00d\x00\x00S' next_instr = 87L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_function...arch64/build/pypy/module/_weakref/test/test_weakref.py:213]', line 1> at line 8 nameindex = 4, ignored = (87L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ____________________ AppTestWeakref.test_method_weakrefable ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1edd62d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_method_weakrefable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_method_weakrefable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_method_weakrefable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f850be0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850af0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f850af0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1e9dc780> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1e9dc640> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1e9dc640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_method_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_method_weakrefable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_method_weakrefable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_method_weakrefable'>, space = StdObjSpace target = <function test_method_weakrefable at 0xffff1f7368d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_method_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_method_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_method_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_method_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 pycode = <code object test_method_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...cb\x00t\x05\x00\x82\x01\x00\xcc\x15\x00|\x07\x00\x83\x00\x00d\x00\x00k\x08\x00s\xe3\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...cb\x00t\x05\x00\x82\x01\x00\xcc\x15\x00|\x07\x00\x83\x00\x00d\x00\x00k\x08\x00s\xe3\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 175L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_method_w...rch64/build/pypy/module/_weakref/test/test_weakref.py:223]', line 1> at line 14 nameindex = 6, ignored = (175L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _____________________ AppTestWeakref.test_set_weakrefable ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f736550>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_set_weakrefable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_set_weakrefable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_set_weakrefable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f77ac80> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f77ad20> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f77ad20> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f77ab40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f77adc0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f77adc0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_set_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_set_weakrefable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_set_weakrefable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_set_weakrefable'>, space = StdObjSpace target = <function test_set_weakrefable at 0xffff1edd6ad0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_set_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_set_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_set_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_set_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 pycode = <code object test_set_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00t\x02\x00d\x02\x00d\x03\x00d\x04\x00d\x05\x00...00\xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00s|\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00t\x02\x00d\x02\x00d\x03\x00d\x04\x00d\x05\x00...00\xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00|\x04\x00\x83\x00\x00d\x00\x00k\x08\x00s|\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 96L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_set_weak...arch64/build/pypy/module/_weakref/test/test_weakref.py:240]', line 1> at line 7 nameindex = 5, ignored = (96L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError __________________ AppTestWeakref.test_generator_weakrefable ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1eedced0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_generator_weakrefable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_generator_weakrefable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_generator_weakrefable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1ee73b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ee73c30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ee73c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1ee73a50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ee73cd0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1ee73cd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_generator_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_generator_weakrefable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_generator_weakrefable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_generator_weakrefable'>, space = StdObjSpace target = <function test_generator_weakrefable at 0xffff1eedc1d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_generator_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_generator_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_generator_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_generator_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 pycode = <code object test_generator_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00\x84\x00\x00}\x03\x00|\x03\x00d\x03\...xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\x07\x01t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00\x84\x00\x00}\x03\x00|\x03\x00d\x03\...xc9\x05\x00\xca\x00\x00\x01\xcc\x15\x00|\x05\x00\x83\x00\x00d\x00\x00k\x08\x00s\x07\x01t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 138L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_generato...rch64/build/pypy/module/_weakref/test/test_weakref.py:249]', line 1> at line 13 nameindex = 5, ignored = (138L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________________ AppTestWeakref.test_weakref_subclass_with_del _________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1eedcc50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclass_with_del'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclass_with_del'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_weakref_subclass_with_del'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f1c3af0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...s_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f1c3b90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f1c3b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...s_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f1c39b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...s_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f1c3c30> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f1c3c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...s_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_weakref_subclass_with_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_weakref_subclass_with_del'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_subclass_with_del'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_weakref_subclass_with_del'>, space = StdObjSpace target = <function test_weakref_subclass_with_del at 0xffff1eedf850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_weakref_subclass_with_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_weakref_subclass_with_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_weakref_subclass_with_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_weakref_subclass_with_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 pycode = <code object test_weakref_subclass_with_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00|\x01\x00j\x02\x00f\x01\x00\x87\x00\...8\x00|\x05\x00\xca\x01\x00d\x08\x00\x19\x83\x00\x00|\x05\x00k\x08\x00s\xd3\x00t\x06\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00|\x01\x00j\x02\x00f\x01\x00\x87\x00\...8\x00|\x05\x00\xca\x01\x00d\x08\x00\x19\x83\x00\x00|\x05\x00k\x08\x00s\xd3\x00t\x06\x00\x82\x01\x00n\x00\x00d\x00\x00S' next_instr = 125L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref_...rch64/build/pypy/module/_weakref/test/test_weakref.py:270]', line 1> at line 13 nameindex = 5, ignored = (125L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _____________________ AppTestWeakref.test_type_weakrefable _____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1eec8650>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type_weakrefable'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type_weakrefable'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type_weakrefable'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1ef68d20> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f8f8190> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f8f8190> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f8f80f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f8f8500> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f8f8500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...eakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_type_weakrefable'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_type_weakrefable'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_type_weakrefable'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_type_weakrefable'>, space = StdObjSpace target = <function test_type_weakrefable at 0xffff1eaba950> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) w_func = <Function test_type_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_type_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_type_weakrefable> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fc56650>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_type_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 pycode = <code object test_type_weakrefable, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00t\x03\x00\xca\x01\x00}\x...3\x00\x00t\x03\x00k\x08\x00sa\x00t\x04\x00\x82\x01\x00d\x00\x00S\x03\x00k\x08\x00sa\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00t\x03\x00\xca\x01\x00}\x...3\x00\x00t\x03\x00k\x08\x00sa\x00t\x04\x00\x82\x01\x00d\x00\x00S\x03\x00k\x08\x00sa\x00t\x04\x00\x82\x01\x00d\x00\x00S' next_instr = 69L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_type_wea...arch64/build/pypy/module/_weakref/test/test_weakref.py:334]', line 1> at line 5 nameindex = 5, ignored = (69L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ____________________ AppTestProxy.test_proxy_to_dead_object ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f5975d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_to_dead_object'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_to_dead_object'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_to_dead_object'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1efd6370> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1efd6730> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1efd6730> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1efd6460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1efd6a50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1efd6a50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_to_dead_object'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_proxy_to_dead_object'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_proxy_to_dead_object'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_proxy_to_dead_object'>, space = StdObjSpace target = <function test_proxy_to_dead_object at 0xffff1f597ad0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) w_func = <Function test_proxy_to_dead_object> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_proxy_to_dead_object> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_proxy_to_dead_object> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_proxy_to_dead_object, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 pycode = <code object test_proxy_to_dead_object, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...83\x02\x00\x01d\x00\x00S\x00|\x02\x00\xc9\x04\x00\xca\x00\x00\x01t\x05\x00t\x06\x00d\x04\x00\x83\x02\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...83\x02\x00\x01d\x00\x00S\x00|\x02\x00\xc9\x04\x00\xca\x00\x00\x01t\x05\x00t\x06\x00d\x04\x00\x83\x02\x00\x01d\x00\x00S' next_instr = 70L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_to...arch64/build/pypy/module/_weakref/test/test_weakref.py:407]', line 1> at line 6 nameindex = 4, ignored = (70L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ____________________ AppTestProxy.test_proxy_with_callback _____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f597dd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_with_callback'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_with_callback'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_proxy_with_callback'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f6f3640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...h_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6f33c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6f33c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...h_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f6f3410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...h_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6f3460> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f6f3460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...h_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_proxy_with_callback'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_proxy_with_callback'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_proxy_with_callback'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_proxy_with_callback'>, space = StdObjSpace target = <function test_proxy_with_callback at 0xffff1f580e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) w_func = <Function test_proxy_with_callback> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_proxy_with_callback> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_proxy_with_callback> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_proxy_with_callback, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 pycode = <code object test_proxy_with_callback, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00d\x05\x00\x83\x02\x00\x01\xcc\x15\x00\x88\x00\x00j\x07\x00|\x05\x00k\x08\x00s\x8a\x00t\x08\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00d\x05\x00\x83\x02\x00\x01\xcc\x15\x00\x88\x00\x00j\x07\x00|\x05\x00k\x08\x00s\x8a\x00t\x08\x00\x82\x01\x00d\x00\x00S' next_instr = 97L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_proxy_wi...arch64/build/pypy/module/_weakref/test/test_weakref.py:415]', line 1> at line 9 nameindex = 4, ignored = (97L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________ AppTestProxy.test_callback_raises _______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f0f7f50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_raises'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_raises'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_callback_raises'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f408230> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ack_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4084b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4084b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ack_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f4089b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ack_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4082d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4082d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ack_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_callback_raises'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_callback_raises'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_raises'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_callback_raises'>, space = StdObjSpace target = <function test_callback_raises at 0xffff1f33e6d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) w_func = <Function test_callback_raises> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_callback_raises> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_callback_raises> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_callback_raises, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 pycode = <code object test_callback_raises, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x06\x00\x83\x00\x00d\x00\x00k\x08\x00sw\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...00\xc9\x04\x00\xca\x00\x00\x01\xcc\x15\x00|\x06\x00\x83\x00\x00d\x00\x00k\x08\x00sw\x00t\x05\x00\x82\x01\x00d\x00\x00S' next_instr = 91L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_callback...rch64/build/pypy/module/_weakref/test/test_weakref.py:484]', line 1> at line 10 nameindex = 4, ignored = (91L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ----------------------------- Captured stderr call ----------------------------- Exception NameError: "global name 'explode' is not defined" in weakref callback <function callback at 0x0000ffff1f9da650> ignored ____________________________ AppTestProxy.test_init ____________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xffff1f580ad0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xffff23e1cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2265e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_init'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f4f8960> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4f8b90> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4f8b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xffff1f4f8c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4f8a50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xffff1f4f8a50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_init'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_init'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_init'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_init'>, space = StdObjSpace target = <function test_init at 0xffff1eabadd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) w_func = <Function test_init> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_init> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_init> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff1fba4a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_init, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 pycode = <code object test_init, file '[/build_dir/own-linux-aarch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00t\x03\x00\xca\x01\x00}\x...0S\x06\x00d\x02\x00d\x02\x00d\x02\x00d\x02\x00d\x02\x00\x83\x07\x00\x01|\x02\x00\xc9\x07\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00|\x01\x00\xc9\x02\x00t\x03\x00\xca\x01\x00}\x...0S\x06\x00d\x02\x00d\x02\x00d\x02\x00d\x02\x00d\x02\x00\x83\x07\x00\x01|\x02\x00\xc9\x07\x00\xca\x00\x00\x01d\x00\x00S' next_instr = 76L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xffff1fbfd810> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_init, fi...arch64/build/pypy/module/_weakref/test/test_weakref.py:496]', line 1> at line 8 nameindex = 7, ignored = (76L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xffff1fe49490> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_simple FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_callback FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_callback_order FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_dont_callback_if_weakref_dead FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_callback_cannot_ressurect FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_correct_weakrefcount_after_death FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_weakref_equality FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_hashing FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_weakref_subclassing FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_function_weakrefable FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_method_weakrefable FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_set_weakrefable FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_generator_weakrefable FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_weakref_subclass_with_del FAIL module/_weakref/test/test_weakref.py::AppTestWeakref::()::test_type_weakrefable FAIL module/_weakref/test/test_weakref.py::AppTestProxy::()::test_proxy_to_dead_object FAIL module/_weakref/test/test_weakref.py::AppTestProxy::()::test_proxy_with_callback FAIL module/_weakref/test/test_weakref.py::AppTestProxy::()::test_callback_raises FAIL module/_weakref/test/test_weakref.py::AppTestProxy::()::test_init =============== 19 failed, 22 passed, 1 skipped in 22.79 seconds =============== ++ 07:45:55 starting module/cmath/test [38 started in total] __ module/cStringIO/test [35 done in total, somefailed=False] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 16 items module/cStringIO/test/test_interp_stringio.py ............... module/cStringIO/test/test_ztranslation.py . ========================== 16 passed in 10.42 seconds ========================== ++ 07:45:57 starting module/cpyext/test/test_abstract.py [39 started in total] __ module/cmath/test [36 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 15 items module/cmath/test/test_cmath.py ............... ========================== 15 passed in 4.17 seconds =========================== ++ 07:46:00 starting module/cpyext/test/test_api.py [40 started in total] __ module/array/test [37 done in total, somefailed=True] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 49 items module/array/test/test_array.py ....................................s..F........ module/array/test/test_ztranslation.py . =================================== FAILURES =================================== ________________________ AppTestArray.test_subclass_del ________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffc83cf54d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_del'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffc893ccf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc87c0e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_del'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc87c0e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_del'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc83cfb050> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...bclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc83cfb460> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc83cfb460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...bclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffc83cfb690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...bclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc83cfb500> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffc83cfb500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...bclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_subclass_del'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_subclass_del'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_subclass_del'>, space = StdObjSpace target = <function test_subclass_del at 0xfffc83c6bdd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc85090150>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc85090150>,) w_func = <Function test_subclass_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc85090150> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_subclass_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc85090150>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_subclass_del> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc85090150>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_subclass_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 pycode = <code object test_subclass_del, file '[/build_dir/own-linux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc8521ff90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00g\x00\x00...8\x00s\xcc\x00t\x07\x00\x88\x00\x00d\x07\x00\x19\x83\x01\x00d\x07\x00k\x02\x00s\xcc\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc8521ff90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00g\x00\x00...8\x00s\xcc\x00t\x07\x00\x88\x00\x00d\x07\x00\x19\x83\x01\x00d\x07\x00k\x02\x00s\xcc\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 128L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffc8521ff90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ux-aarch64/build/pypy/module/array/test/test_array.py:919]', line 1> at line 12 nameindex = 5, ignored = (128L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffc8539c7d0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc8539c7d0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffc8539c7d0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/array/test/test_array.py::AppTestArray::()::test_subclass_del =============== 1 failed, 47 passed, 1 skipped in 40.66 seconds ================ ++ 07:46:16 starting module/cpyext/test/test_arraymodule.py [41 started in total] __ module/cpyext/test/test_api.py [38 done in total, somefailed=False] ________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 4 items module/cpyext/test/test_api.py .... ========================== 4 passed in 30.33 seconds =========================== ++ 07:46:38 starting module/cpyext/test/test_boolobject.py [42 started in total] __ module/bz2/test [39 done in total, somefailed=False] _______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 52 items module/bz2/test/test_bz2_compdecomp.py ..s...........s... module/bz2/test/test_bz2_file.py ................................. module/bz2/test/test_large.py s ==================== 49 passed, 3 skipped in 63.54 seconds ===================== ++ 07:46:48 starting module/cpyext/test/test_borrow.py [43 started in total] __ module/cpyext/test/test_abstract.py [40 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 7 items module/cpyext/test/test_abstract.py ....... ========================== 7 passed in 57.02 seconds =========================== ++ 07:47:02 starting module/cpyext/test/test_bufferobject.py [44 started in total] __ module/cpyext/test/test_boolobject.py [41 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 4 items module/cpyext/test/test_boolobject.py .... ========================== 4 passed in 42.95 seconds =========================== ++ 07:47:29 starting module/cpyext/test/test_bytearrayobject.py [45 started in total] __ module/cpyext/test/test_borrow.py [42 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/cpyext/test/test_borrow.py ... ========================== 3 passed in 45.91 seconds =========================== ++ 07:47:46 starting module/cpyext/test/test_bytesobject.py [46 started in total] __ module/cpyext/test/test_bufferobject.py [43 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 4 items module/cpyext/test/test_bufferobject.py .... ========================== 4 passed in 58.15 seconds =========================== ++ 07:48:08 starting module/cpyext/test/test_capsule.py [47 started in total] __ module/cpyext/test/test_bytearrayobject.py [44 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/cpyext/test/test_bytearrayobject.py ...... ========================== 6 passed in 53.10 seconds =========================== ++ 07:48:35 starting module/cpyext/test/test_cell.py [48 started in total] __ module/cpyext/test/test_arraymodule.py [45 done in total, somefailed=True] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 17 items module/cpyext/test/test_arraymodule.py ..........x.....F =================================== FAILURES =================================== _______________ AppTestArrayModule.test_subclass_with_attribute ________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdc7e6b850>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_with_attribute'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdcf35cf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdca9a3fa0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_with_attribute'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdca9a3fa0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_with_attribute'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdc7c99640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdc7c992d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdc7c992d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdc7c990f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdc7c99280> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdc7c99280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_subclass_with_attribute'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_subclass_with_attribute'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_subclass_with_attribute'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_subclass_with_attribute'>, space = StdObjSpace target = <function test_subclass_with_attribute at 0xfffdc7e45050> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdc9a2b150>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdc9a2b150>,) w_func = <Function test_subclass_with_attribute> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdc9a2b150> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_subclass_with_attribute> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdc9a2b150>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_subclass_with_attribute> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdc9a2b150>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_subclass_with_attribute, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 pycode = <code object test_subclass_with_attribute, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdc9a4fc90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00\xca\x00\x01}\x01\x00d\x03\x00|\x01\x00j\x01\x00f\x01\x00d\x04\x00\x84\x00\x00...cc\x15\x00|\x02\x00j\x05\x00t\x06\x00k\x02\x00sh\x00t\x07\x00\x82\x01\x00d\x00\x00S\x00t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdc9a4fc90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00\xca\x00\x01}\x01\x00d\x03\x00|\x01\x00j\x01\x00f\x01\x00d\x04\x00\x84\x00\x00...cc\x15\x00|\x02\x00j\x05\x00t\x06\x00k\x02\x00sh\x00t\x07\x00\x82\x01\x00d\x00\x00S\x00t\x07\x00\x82\x01\x00d\x00\x00S' next_instr = 76L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdc9a4fc90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: > self.LOAD_ATTR(oparg, next_instr) interpreter/pyopcode.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_subclass...ch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> at line 8 nameindex = 4, next_instr = 76L @always_inline def LOAD_ATTR(self, nameindex, next_instr): "obj.attributename" w_obj = self.popvalue() if not jit.we_are_jitted(): from pypy.objspace.std.mapdict import LOAD_ATTR_caching > w_value = LOAD_ATTR_caching(self.getcode(), w_obj, nameindex) interpreter/pyopcode.py:977: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pycode = <code object test_subclass_with_attribute, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdca83dc90> nameindex = 4 @objectmodel.always_inline def LOAD_ATTR_caching(pycode, w_obj, nameindex): # this whole mess is to make the interpreter quite a bit faster; it's not # used if we_are_jitted(). entry = pycode._mapdict_caches[nameindex] map = w_obj._get_mapdict_map() if entry.is_valid_for_map(map) and entry.w_method is None: # everything matches, it's incredibly fast attr = entry.attr_wref() if attr is not None: return attr._direct_read(w_obj) > return LOAD_ATTR_slowpath(pycode, w_obj, nameindex, map) objspace/std/mapdict.py:1420: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pycode = <code object test_subclass_with_attribute, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_arraymodule.py:192]', line 1> w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdca83dc90> nameindex = 4, map = None @objectmodel.dont_inline def LOAD_ATTR_slowpath(pycode, w_obj, nameindex, map): space = pycode.space w_name = pycode.co_names_w[nameindex] if map is not None: w_type = map.terminator.w_cls w_descr = w_type.getattribute_if_not_from_object() if w_descr is not None: return space._handle_getattribute(w_descr, w_obj, w_name) version_tag = w_type.version_tag() if version_tag is not None: name = space.text_w(w_name) # We need to care for obscure cases in which the w_descr is # a MutableCell, which may change without changing the version_tag _, w_descr = w_type._pure_lookup_where_with_method_cache( name, version_tag) # attrname, attrkind = ("", INVALID) if w_descr is None: attrname, attrkind = (name, DICT) # common case: no such attr in the class elif isinstance(w_descr, MutableCell): pass # we have a MutableCell in the class: give up elif space.is_data_descr(w_descr): # we have a data descriptor, which means the dictionary value # (if any) has no relevance. from pypy.interpreter.typedef import Member if isinstance(w_descr, Member): # it is a slot -- easy case attrname, attrkind = ("slot", SLOTS_STARTING_FROM + w_descr.index) elif not space.type(w_descr).is_heaptype(): # There is a non-data descriptor in the class. This would mean # we use the dict entry, however, the class of w_descr could be # changed to add a __get__/__set__ without the cache noticing, # so we can only use the cache if w_descr is an instance of an # immutable type. see # test_load_attr_bug_class_name_turns_into_descriptor attrname = name attrkind = DICT # if attrkind != INVALID: attr = map.find_map_attr(attrname, attrkind) if attr is not None: # Note that if map.terminator is a DevolvedDictTerminator # or the class provides its own dict, not using mapdict, then: # map.find_map_attr will always return None if attrkind==DICT. _fill_cache(pycode, nameindex, map, version_tag, attr, valid_for_store=w_type.setattr_if_not_from_object() is None) return attr._direct_read(w_obj) if space.config.objspace.std.withmethodcachecounter: INVALID_CACHE_ENTRY.failure_counter += 1 > return space.getattr(w_obj, w_name) objspace/std/mapdict.py:1471: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdca83dc90> w_name = W_BytesObject('collect') def getattr(self, w_obj, w_name): # an optional shortcut for performance w_type = self.type(w_obj) w_descr = w_type.getattribute_if_not_from_object() if w_descr is not None: return self._handle_getattribute(w_descr, w_obj, w_name) # fast path: XXX this is duplicating most of the logic # from the default __getattribute__ and the getattr() method... name = self.text_w(w_name) w_descr = w_type.lookup(name) e = None if w_descr is not None: w_get = None is_data = self.is_data_descr(w_descr) if is_data: w_get = self.lookup(w_descr, "__get__") if w_get is None: w_value = w_obj.getdictvalue(self, name) if w_value is not None: return w_value if not is_data: w_get = self.lookup(w_descr, "__get__") if w_get is not None: # __get__ is allowed to raise an AttributeError to trigger # use of __getattr__. try: return self.get_and_call_function(w_get, w_descr, w_obj, w_type) except OperationError as e: if not e.match(self, self.w_AttributeError): raise else: return w_descr else: > w_value = w_obj.getdictvalue(self, name) objspace/std/objspace.py:655: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdca83dc90> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdca83dc90> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ----------------------------- Captured stderr call ----------------------------- <function _Py_InitPyPyModule at 0xfffdcad1e350> DONE <function PyType_Ready at 0xfffdcac4a0d0> DONE <function PyType_Ready at 0xfffdcac4a0d0> DONE <function check at 0xfffdcadcb3d0> DONE <function PyModule_GetDict at 0xfffdcad1e550> DONE <function PyDict_SetItemString at 0xfffdcac79050> DONE <function check at 0xfffdcadcb3d0> DONE <function PyModule_GetDict at 0xfffdcad1e550> DONE <function PyDict_SetItemString at 0xfffdcac79050> DONE <function check at 0xfffdcadcb3d0> DONE <function PyModule_GetDict at 0xfffdcad1e550> DONE <function PyDict_SetItemString at 0xfffdcac79050> DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_arraymodule.py::AppTestArrayModule::()::test_subclass_with_attribute =============== 1 failed, 15 passed, 1 xfailed in 143.96 seconds =============== ++ 07:48:48 starting module/cpyext/test/test_classobject.py [49 started in total] __ module/cpyext/test/test_capsule.py [46 done in total, somefailed=True] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_capsule.py F =================================== FAILURES =================================== ______________________ AppTestCapsule.test_capsule_import ______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffe498c7350>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_capsule_import'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe4f77cf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe4adc2fa0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_capsule_import'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe4adc2fa0>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_capsule_import'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe498c65a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe498c62d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe498c62d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe498c66e0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe498c65f0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe498c65f0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_capsule_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_capsule_import'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_capsule_import'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_capsule_import'>, space = StdObjSpace target = <function test_capsule_import at 0xfffe498c74d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe49bef810>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe49bef810>,) w_func = <Function test_capsule_import> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe49bef810> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_capsule_import> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe49bef810>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_capsule_import> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe49bef810>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_capsule_import, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 pycode = <code object test_capsule_import, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe49bee390> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00g\x02\x00\xca\x02\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x04\x00\xca\x01\...\xcc\x18\x00|\x01\x00\xc9\x07\x00\xca\x00\x00d\x04\x00k\x02\x00st\x00t\x04\x00\x82\x01\x00|\x01\x00`\x03\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe49bee390> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00g\x02\x00\xca\x02\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x04\x00\xca\x01\...\xcc\x18\x00|\x01\x00\xc9\x07\x00\xca\x00\x00d\x04\x00k\x02\x00st\x00t\x04\x00\x82\x01\x00|\x01\x00`\x03\x00d\x00\x00S' next_instr = 85L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe49bee390> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_capsule_...x-aarch64/build/pypy/module/cpyext/test/test_capsule.py:4]', line 1> at line 24 nameindex = 6, ignored = (85L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffe4ac42250> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe4ac42250> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe4ac42250> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ----------------------------- Captured stderr call ----------------------------- <function _Py_InitPyPyModule at 0xfffe4b13e250> DONE <function PyLong_AsVoidPtr at 0xfffe4b0522d0> DONE <function PyErr_Occurred at 0xfffe4b1811d0> DONE <function PyErr_Occurred at 0xfffe4b1811d0> DONE <function PyImport_ImportModule at 0xfffe4b170f50> DONE <function check at 0xfffe4b1e72d0> DONE <function PyModule_GetDict at 0xfffe4b13e450> DONE <function PyDict_SetItemString at 0xfffe4b091ed0> DONE <function PyErr_Occurred at 0xfffe4b1811d0> DONE <function PyString_FromStringAndSize at 0xfffe4b0ed5d0> DONE <function PyString_AS_STRING at 0xfffe4b0edbd0> DONE <function PyString_AS_STRING at 0xfffe4b0edbd0> DONE <function _PyString_Resize at 0xfffe4b034050> <function bytes_dealloc at 0xfffe4b0ed450> DONE DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_capsule.py::AppTestCapsule::()::test_capsule_import ========================== 1 failed in 37.62 seconds =========================== ++ 07:48:52 starting module/cpyext/test/test_codecs.py [50 started in total] __ module/cpyext/test/test_cell.py [47 done in total, somefailed=False] _______ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_cell.py . ========================== 1 passed in 36.63 seconds =========================== ++ 07:49:19 starting module/cpyext/test/test_complexobject.py [51 started in total] __ module/cpyext/test/test_bytesobject.py [48 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 25 items module/cpyext/test/test_bytesobject.py ......................... ========================== 25 passed in 91.00 seconds ========================== ++ 07:49:28 starting module/cpyext/test/test_cpyext.py [52 started in total] __ module/cpyext/test/test_codecs.py [49 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 2 items module/cpyext/test/test_codecs.py .. ========================== 2 passed in 31.50 seconds =========================== ++ 07:49:30 starting module/cpyext/test/test_datetime.py [53 started in total] __ module/cpyext/test/test_classobject.py [50 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 5 items module/cpyext/test/test_classobject.py ..... ========================== 5 passed in 42.73 seconds =========================== ++ 07:49:39 starting module/cpyext/test/test_dictobject.py [54 started in total] __ module/cpyext/test/test_complexobject.py [51 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 5 items module/cpyext/test/test_complexobject.py ..... ========================== 5 passed in 47.14 seconds =========================== ++ 07:50:18 starting module/cpyext/test/test_eval.py [55 started in total] __ module/cpyext/test/test_datetime.py [52 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 14 items module/cpyext/test/test_datetime.py .............. ========================== 14 passed in 71.82 seconds ========================== ++ 07:50:50 starting module/cpyext/test/test_fileobject.py [56 started in total] __ module/cpyext/test/test_dictobject.py [53 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 18 items module/cpyext/test/test_dictobject.py .................. ========================== 18 passed in 83.07 seconds ========================== ++ 07:51:14 starting module/cpyext/test/test_floatobject.py [57 started in total] __ module/cpyext/test/test_cpyext.py [54 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 27 items module/cpyext/test/test_cpyext.py ...s.........s............. ==================== 25 passed, 2 skipped in 104.33 seconds ==================== ++ 07:51:24 starting module/cpyext/test/test_frameobject.py [58 started in total] __ module/cpyext/test/test_fileobject.py [55 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_fileobject.py . ========================== 1 passed in 36.33 seconds =========================== ++ 07:51:34 starting module/cpyext/test/test_funcobject.py [59 started in total] __ module/cpyext/test/test_eval.py [56 done in total, somefailed=False] _______ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 19 items module/cpyext/test/test_eval.py ................... ========================== 19 passed in 76.43 seconds ========================== ++ 07:51:45 starting module/cpyext/test/test_genobject.py [60 started in total] __ module/cpyext/test/test_frameobject.py [57 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 2 items module/cpyext/test/test_frameobject.py .. ========================== 2 passed in 43.05 seconds =========================== ++ 07:52:15 starting module/cpyext/test/test_getargs.py [61 started in total] __ module/cpyext/test/test_genobject.py [58 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_genobject.py . ========================== 1 passed in 30.36 seconds =========================== ++ 07:52:23 starting module/cpyext/test/test_import.py [62 started in total] __ module/cpyext/test/test_funcobject.py [59 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 7 items module/cpyext/test/test_funcobject.py ....... ========================== 7 passed in 39.67 seconds =========================== ++ 07:52:25 starting module/cpyext/test/test_intobject.py [63 started in total] __ module/cpyext/test/test_floatobject.py [60 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 15 items module/cpyext/test/test_floatobject.py ............... ========================== 15 passed in 69.55 seconds ========================== ++ 07:52:34 starting module/cpyext/test/test_iterator.py [64 started in total] __ module/cpyext/test/test_import.py [61 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/cpyext/test/test_import.py ...... ========================== 6 passed in 42.29 seconds =========================== ++ 07:53:14 starting module/cpyext/test/test_listobject.py [65 started in total] __ module/cpyext/test/test_iterator.py [62 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 5 items module/cpyext/test/test_iterator.py ....in sq_inplace_repeat, n=3 . ========================== 5 passed in 43.56 seconds =========================== ++ 07:53:25 starting module/cpyext/test/test_longobject.py [66 started in total] __ module/cpyext/test/test_intobject.py [63 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 10 items module/cpyext/test/test_intobject.py .......... ========================== 10 passed in 56.42 seconds ========================== ++ 07:53:31 starting module/cpyext/test/test_mapping.py [67 started in total] __ module/cpyext/test/test_getargs.py [64 done in total, somefailed=False] ____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 11 items module/cpyext/test/test_getargs.py ........... ========================== 11 passed in 71.83 seconds ========================== ++ 07:53:35 starting module/cpyext/test/test_marshal.py [68 started in total] __ module/cpyext/test/test_listobject.py [65 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 12 items module/cpyext/test/test_listobject.py ............ ========================== 12 passed in 55.03 seconds ========================== ++ 07:54:20 starting module/cpyext/test/test_memoryobject.py [69 started in total] __ module/cpyext/test/test_mapping.py [66 done in total, somefailed=False] ____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/cpyext/test/test_mapping.py ...... ========================== 6 passed in 40.23 seconds =========================== ++ 07:54:22 starting module/cpyext/test/test_methodobject.py [70 started in total] __ module/cpyext/test/test_marshal.py [67 done in total, somefailed=False] ____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 2 items module/cpyext/test/test_marshal.py .. ========================== 2 passed in 42.71 seconds =========================== ++ 07:54:27 starting module/cpyext/test/test_misc.py [71 started in total] __ module/cpyext/test/test_longobject.py [68 done in total, somefailed=False] _ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 20 items module/cpyext/test/test_longobject.py .................... ========================== 20 passed in 73.05 seconds ========================== ++ 07:54:45 starting module/cpyext/test/test_module.py [72 started in total] __ module/cpyext/test/test_misc.py [69 done in total, somefailed=False] _______ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_misc.py . ========================== 1 passed in 37.20 seconds =========================== ++ 07:55:11 starting module/cpyext/test/test_ndarrayobject.py [73 started in total] __ module/cpyext/test/test_module.py [70 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 2 items module/cpyext/test/test_module.py .. ========================== 2 passed in 32.49 seconds =========================== ++ 07:55:29 starting module/cpyext/test/test_number.py [74 started in total] __ module/cpyext/test/test_memoryobject.py [71 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 8 items module/cpyext/test/test_memoryobject.py .....s.. ===================== 7 passed, 1 skipped in 69.31 seconds ===================== ++ 07:55:40 starting module/cpyext/test/test_object.py [75 started in total] __ module/cpyext/test/test_methodobject.py [72 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 11 items module/cpyext/test/test_methodobject.py ........... ========================== 11 passed in 81.65 seconds ========================== ++ 07:55:57 starting module/cpyext/test/test_pycobject.py [76 started in total] __ module/cpyext/test/test_ndarrayobject.py [73 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 24 items module/cpyext/test/test_ndarrayobject.py ........................ ========================== 24 passed in 68.22 seconds ========================== ++ 07:56:31 starting module/cpyext/test/test_pyerrors.py [77 started in total] __ module/cpyext/test/test_number.py [74 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 11 items module/cpyext/test/test_number.py ..........got no exc got no exc got exc . ========================== 11 passed in 56.11 seconds ========================== ++ 07:56:35 starting module/cpyext/test/test_pyfile.py [78 started in total] __ module/cpyext/test/test_pycobject.py [75 done in total, somefailed=True] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_pycobject.py F =================================== FAILURES =================================== __________________ AppTestStringObject.test_pycobject_import ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffcce3c16d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_pycobject_import'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffcd41ccf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffccf812f50>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_pycobject_import'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffccf812f50>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_pycobject_import'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffcce3f7870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ect_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffcce3f75a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffcce3f75a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ect_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffcce3f79b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ect_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffcce3f78c0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffcce3f78c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ect_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_pycobject_import'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_pycobject_import'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_pycobject_import'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_pycobject_import'>, space = StdObjSpace target = <function test_pycobject_import at 0xfffcce3c1850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffccf6a8b90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffccf6a8b90>,) w_func = <Function test_pycobject_import> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffccf6a8b90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_pycobject_import> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffccf6a8b90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_pycobject_import> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffccf6a8b90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_pycobject_import, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 pycode = <code object test_pycobject_import, file '[/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffccf643910> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00g\x02\x00\xca\x02\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x04\x00\xca\x01\...\xcc\x18\x00|\x01\x00\xc9\x07\x00\xca\x00\x00d\x04\x00k\x02\x00st\x00t\x04\x00\x82\x01\x00|\x01\x00`\x03\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffccf643910> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 co_code = '|\x00\x00\xc9\x00\x00d\x01\x00d\x02\x00d\x03\x00g\x02\x00\xca\x02\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x04\x00\xca\x01\...\xcc\x18\x00|\x01\x00\xc9\x07\x00\xca\x00\x00d\x04\x00k\x02\x00st\x00t\x04\x00\x82\x01\x00|\x01\x00`\x03\x00d\x00\x00S' next_instr = 85L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffccf643910> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_pycobjec...aarch64/build/pypy/module/cpyext/test/test_pycobject.py:5]', line 1> at line 24 nameindex = 6, ignored = (85L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffccf6932d0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffccf6932d0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffccf6932d0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ----------------------------- Captured stderr call ----------------------------- <function _Py_InitPyPyModule at 0xfffccfb8f2d0> DONE <function PyLong_AsVoidPtr at 0xfffccfaa2350> DONE <function PyErr_Occurred at 0xfffccfbd2250> DONE <function PyErr_Occurred at 0xfffccfbd2250> DONE <function PyImport_ImportModule at 0xfffccfbca050> DONE <function check at 0xfffccfc37350> DONE <function PyModule_GetDict at 0xfffccfb8f4d0> DONE <function PyDict_SetItemString at 0xfffccfae2f50> DONE <function PyErr_Occurred at 0xfffccfbd2250> DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_pycobject.py::AppTestStringObject::()::test_pycobject_import ========================== 1 failed in 36.82 seconds =========================== ++ 07:56:41 starting module/cpyext/test/test_pysignals.py [79 started in total] __ module/cpyext/test/test_object.py [76 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 35 items module/cpyext/test/test_object.py ........................s.......... ==================== 34 passed, 1 skipped in 92.25 seconds ===================== ++ 07:57:22 starting module/cpyext/test/test_pystate.py [80 started in total] __ module/cpyext/test/test_pysignals.py [77 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_pysignals.py . ========================== 1 passed in 36.52 seconds =========================== ++ 07:57:25 starting module/cpyext/test/test_pystrtod.py [81 started in total] __ module/cpyext/test/test_pyfile.py [78 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 9 items module/cpyext/test/test_pyfile.py ....x.... ===================== 8 passed, 1 xfailed in 43.40 seconds ===================== ++ 07:57:26 starting module/cpyext/test/test_sequence.py [82 started in total] __ module/cpyext/test/test_pyerrors.py [79 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 27 items module/cpyext/test/test_pyerrors.py .........s.....s........s.. ==================== 24 passed, 3 skipped in 95.44 seconds ===================== ++ 07:58:13 starting module/cpyext/test/test_setobject.py [83 started in total] __ module/cpyext/test/test_pystrtod.py [80 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 18 items module/cpyext/test/test_pystrtod.py .................. ========================== 18 passed in 41.52 seconds ========================== ++ 07:58:16 starting module/cpyext/test/test_sliceobject.py [84 started in total] __ module/cpyext/test/test_sequence.py [81 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 23 items module/cpyext/test/test_sequence.py ....................... ========================== 23 passed in 73.78 seconds ========================== ++ 07:58:46 starting module/cpyext/test/test_structseq.py [85 started in total] __ module/cpyext/test/test_pystate.py [82 done in total, somefailed=True] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 13 items module/cpyext/test/test_pystate.py .........F... =================================== FAILURES =================================== _____________________ AppTestThreads.test_thread_interrupt _____________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe8d88bc90> def test_thread_interrupt(self): import signal # to initialize the signal infrastructure import thread, time, posix as os module = self.import_extension('disruptor', [ ("surprise", "METH_VARARGS", """ long tid; PyObject *exc; if (!PyArg_ParseTuple(args, "lO", &tid, &exc)) return NULL; return PyInt_FromLong(PyThreadState_SetAsyncExc(tid, exc)); """), ("nosurprise", "METH_VARARGS", """ long tid; if (!PyArg_ParseTuple(args, "l", &tid)) return NULL; return PyInt_FromLong(PyThreadState_SetAsyncExc(tid, NULL)); """), ]) # raise in another thread def f(): try: childstarted.append(thread.get_ident()) while 1: print "waiting in child" time.sleep(0.1) except KeyError: childstarted.pop() else: thread.interrupt_main() # to crash the test cancelled_exception = False for i in range(20): print i # first wait for the child to start childstarted = [] thread.start_new_thread(f, ()) for i in range(500): if childstarted: break time.sleep(0.1) # then interrupt it from the main thread res = module.surprise(childstarted[0], KeyError) assert res == 1 # try to cancel the interrupt # this is racing! the child could either have been terminated # already or not try: res = module.nosurprise(childstarted[0]) assert res in (0, 1) except IndexError: pass else: if res == 1: cancelled_exception = True # actually send exception res = module.surprise(childstarted[0], KeyError) assert res in (0, 1) # now wait for the exception to arrive in the child thread # which empties childstarted again for i in range(500): if not childstarted: break time.sleep(0.1) assert res == 1 > assert cancelled_exception # XXX I have no clue whether we can expect this to work or not E (application-level) AssertionError: assert False [/build_dir/own-linux-aarch64/build/pypy/module/cpyext/test/test_pystate.py:218]:69: AssertionError ----------------------------- Captured stdout call ----------------------------- NOTE: invoke_after_thread_switch() is meant to be translated and not called directly. Using some emulation. 0 waiting in child 1 waiting in child 2 waiting in child 3 waiting in child 4 waiting in child 5 waiting in child 6 waiting in child 7 waiting in child 8 waiting in child 9 waiting in child 10 waiting in child 11 waiting in child 12 waiting in child 13 waiting in child 14 waiting in child 15 waiting in child 16 waiting in child 17 waiting in child 18 waiting in child 19 waiting in child ----------------------------- Captured stderr call ----------------------------- <function _Py_InitPyPyModule at 0xfffe8e260250> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE <function PyInt_AsLong at 0xfffe8e288ed0> DONE <function PyThreadState_SetAsyncExc at 0xfffe8e0cfe50> DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_pystate.py::AppTestThreads::()::test_thread_interrupt ===================== 1 failed, 12 passed in 78.78 seconds ===================== ++ 07:58:49 starting module/cpyext/test/test_sysmodule.py [86 started in total] __ module/cpyext/test/test_setobject.py [83 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 9 items module/cpyext/test/test_setobject.py ......... ========================== 9 passed in 44.53 seconds =========================== ++ 07:59:04 starting module/cpyext/test/test_thread.py [87 started in total] __ module/cpyext/test/test_sliceobject.py [84 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/cpyext/test/test_sliceobject.py ...... ========================== 6 passed in 47.69 seconds =========================== ++ 07:59:15 starting module/cpyext/test/test_traceback.py [88 started in total] __ module/cpyext/test/test_structseq.py [85 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_structseq.py . ========================== 1 passed in 38.76 seconds =========================== ++ 07:59:38 starting module/cpyext/test/test_translate.py [89 started in total] __ module/cpyext/test/test_sysmodule.py [86 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/cpyext/test/test_sysmodule.py ... ========================== 3 passed in 44.03 seconds =========================== ++ 07:59:40 starting module/cpyext/test/test_tupleobject.py [90 started in total] __ module/cpyext/test/test_translate.py [87 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_translate.py . =========================== 1 passed in 3.85 seconds =========================== ++ 07:59:48 starting module/cpyext/test/test_typeobject.py [91 started in total] __ module/cpyext/test/test_traceback.py [88 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/cpyext/test/test_traceback.py . ========================== 1 passed in 32.49 seconds =========================== ++ 07:59:59 starting module/cpyext/test/test_unicodeobject.py [92 started in total] __ module/cpyext/test/test_thread.py [89 done in total, somefailed=False] _____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 4 items module/cpyext/test/test_thread.py .... ========================== 4 passed in 51.51 seconds =========================== ++ 08:00:02 starting module/cpyext/test/test_userslots.py [93 started in total] __ module/cpyext/test/test_tupleobject.py [90 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 10 items module/cpyext/test/test_tupleobject.py .......... ========================== 10 passed in 68.87 seconds ========================== ++ 08:01:00 starting module/cpyext/test/test_version.py [94 started in total] __ module/cpyext/test/test_userslots.py [91 done in total, somefailed=False] __ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 6 items module/cpyext/test/test_userslots.py ...... ========================== 6 passed in 61.23 seconds =========================== ++ 08:01:15 starting module/cpyext/test/test_weakref.py [95 started in total] __ module/cpyext/test/test_unicodeobject.py [92 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 47 items module/cpyext/test/test_unicodeobject.py .............................s................. ==================== 46 passed, 1 skipped in 100.09 seconds ==================== ++ 08:01:48 starting module/crypt/test [96 started in total] __ module/cpyext/test/test_version.py [93 done in total, somefailed=False] ____ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/cpyext/test/test_version.py ... ========================== 3 passed in 40.03 seconds =========================== ++ 08:01:51 starting module/errno/test [97 started in total] __ module/crypt/test [94 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items module/crypt/test/test_crypt.py . =========================== 1 passed in 3.46 seconds =========================== ++ 08:01:52 starting module/exceptions/test [98 started in total] __ module/errno/test [95 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/errno/test/test_errno.py ... =========================== 3 passed in 3.63 seconds =========================== ++ 08:01:56 starting module/faulthandler/test [99 started in total] __ module/exceptions/test [96 done in total, somefailed=False] ________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 24 items module/exceptions/test/test_exc.py ..........s............. ===================== 23 passed, 1 skipped in 7.04 seconds ===================== ++ 08:02:01 starting module/fcntl/test [100 started in total] __ module/faulthandler/test [97 done in total, somefailed=False] ______________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items module/faulthandler/test/test_faulthander.py .. module/faulthandler/test/test_ztranslation.py . =========================== 3 passed in 7.13 seconds =========================== ++ 08:02:04 starting module/gc/test [101 started in total] __ module/fcntl/test [98 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 8 items module/fcntl/test/test_fcntl.py ........ =========================== 8 passed in 9.52 seconds =========================== ++ 08:02:11 starting module/imp/test [102 started in total] __ module/gc/test [99 done in total, somefailed=True] _________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 13 items / 2 errors module/gc/test/test_app_referents.py .... module/gc/test/test_referents.py ........ module/gc/test/test_ztranslation.py F ==================================== ERRORS ==================================== _______________ ERROR collecting pypy/module/gc/test/test_gc.py ________________ ../_pytest/python.py:611: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) ../py/_path/local.py:650: in pyimport __import__(modname) module/gc/test/test_gc.py:6: in <module> from pypy.module.gc.interp_gc import StepCollector, W_GcCollectStepStats module/gc/interp_gc.py:4: in <module> from pypy.module.gc.hook import W_GcCollectStepStats module/gc/hook.py:2: in <module> from rpython.memory.gc import incminimark ../rpython/memory/gc/incminimark.py:70: in <module> from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ______________ ERROR collecting pypy/module/gc/test/test_hook.py _______________ ../_pytest/python.py:611: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) ../py/_path/local.py:650: in pyimport __import__(modname) module/gc/test/test_hook.py:3: in <module> from pypy.module.gc.hook import LowLevelGcHooks module/gc/hook.py:2: in <module> from rpython.memory.gc import incminimark ../rpython/memory/gc/incminimark.py:70: in <module> from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details =================================== FAILURES =================================== _______________________________ test_checkmodule _______________________________ def test_checkmodule(): # we need to ignore GcCollectStepStats, else checkmodule fails. I think # this happens because W_GcCollectStepStats.__init__ is only called from # GcCollectStepHookAction.perform() and the fake objspace doesn't know # about those: so, perform() is never annotated and the annotator thinks # W_GcCollectStepStats has no attributes > checkmodule('gc', ignore=['GcCollectStepStats']) module/gc/test/test_ztranslation.py:9: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ objspace/fake/checkmodule.py:23: in checkmodule seeobj_w.append(module._load_lazily(space, name)) interpreter/mixedmodule.py:103: in _load_lazily w_value = loader(space) interpreter/mixedmodule.py:182: in ifileloader d[name] = __import__(pkgroot+'.'+name, None, None, [name]) module/gc/interp_gc.py:4: in <module> from pypy.module.gc.hook import W_GcCollectStepStats module/gc/hook.py:2: in <module> from rpython.memory.gc import incminimark _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/gc/test/test_ztranslation.py::test_checkmodule ================= 1 failed, 12 passed, 2 error in 5.69 seconds ================= ++ 08:02:11 starting module/itertools/test [103 started in total] __ module/cpyext/test/test_weakref.py [100 done in total, somefailed=False] ___ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 5 items module/cpyext/test/test_weakref.py ..... ========================== 5 passed in 46.06 seconds =========================== ++ 08:02:14 starting module/marshal/test [104 started in total] __ module/marshal/test [101 done in total, somefailed=False] __________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 80 items module/marshal/test/test_marshal.py ................................................................... module/marshal/test/test_marshalimpl.py ............. ========================== 80 passed in 12.13 seconds ========================== ++ 08:02:28 starting module/math/test [105 started in total] __ module/math/test [102 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 182 items module/math/test/test_direct.py ...................................................................................................................................................................... module/math/test/test_factorial.py .s module/math/test/test_math.py .........s.... ==================== 180 passed, 2 skipped in 12.25 seconds ==================== ++ 08:02:43 starting module/micronumpy/test [106 started in total] __ module/itertools/test [103 done in total, somefailed=True] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 73 items module/itertools/test/test_itertools.py .................F...................................................... module/itertools/test/test_ztranslation.py . =================================== FAILURES =================================== _________________________ AppTestItertools.test_islice _________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffed25ad8d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_islice'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffed69ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffed522e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_islice'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffed522e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_islice'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffed26e3c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffed2533500> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffed2533500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffed2533fa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffed2533960> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffed2533960> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...est_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_islice'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_islice'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_islice'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_islice'>, space = StdObjSpace target = <function test_islice at 0xfffed2510750> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffed275a6d0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffed275a6d0>,) w_func = <Function test_islice> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffed275a6d0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_islice> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffed275a6d0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_islice> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffed275a6d0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_islice, file '[/build_dir/own-linux-aarch64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 pycode = <code object test_islice, file '[/build_dir/own-linux-aarch64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> next_instr = 549 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffed274f650> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00g\x00\x00d\x02\x00\xca\x02\x00}\x02\x00t\x02\x00t\x03\x00|\x...0d\x00\x00k\x08\x00s\xcf\x03t\x05\x00\x82\x01\x00t\x02\x00t\x03\x00t\x04\x00|\x02\x00\x83\x03\x00\x01qH\x03Wd\x00\x00S' next_instr = 549 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffed274f650> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00g\x00\x00d\x02\x00\xca\x02\x00}\x02\x00t\x02\x00t\x03\x00|\x...0d\x00\x00k\x08\x00s\xcf\x03t\x05\x00\x82\x01\x00t\x02\x00t\x03\x00t\x04\x00|\x02\x00\x83\x03\x00\x01qH\x03Wd\x00\x00S' next_instr = 947L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffed274f650> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_islice, ...64/build/pypy/module/itertools/test/test_itertools.py:204]', line 1> at line 52 nameindex = 12, ignored = (947L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffed2a06290> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffed2a06290> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffed2a06290> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/itertools/test/test_itertools.py::AppTestItertools::()::test_islice ===================== 1 failed, 72 passed in 30.64 seconds ===================== ++ 08:02:44 starting module/mmap/test [107 started in total] __ module/mmap/test [104 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 43 items module/mmap/test/test_mmap.py ......................s.................... ==================== 42 passed, 1 skipped in 32.30 seconds ===================== ++ 08:03:22 starting module/operator/test [108 started in total] __ module/operator/test [105 done in total, somefailed=False] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 27 items module/operator/test/test_operator.py .................. module/operator/test/test_tscmp.py ......... ========================== 27 passed in 5.08 seconds =========================== ++ 08:03:29 starting module/parser/test [109 started in total] __ module/parser/test [106 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 7 items module/parser/test/test_parser.py ....... =========================== 7 passed in 3.88 seconds =========================== ++ 08:03:34 starting module/posix/test [110 started in total] __ module/imp/test [107 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 124 items module/imp/test/test_app.py ................ module/imp/test/test_import.py ..............................s.........................................................s................... ==================== 122 passed, 2 skipped in 84.29 seconds ==================== ++ 08:03:38 starting module/pwd/test [111 started in total] __ module/pwd/test [108 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 4 items module/pwd/test/test_pwd.py ... module/pwd/test/test_ztranslation.py . =========================== 4 passed in 8.40 seconds =========================== ++ 08:03:48 starting module/pyexpat/test [112 started in total] __ module/pyexpat/test [109 done in total, somefailed=False] __________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 21 items module/pyexpat/test/test_build.py . module/pyexpat/test/test_parser.py .................... ========================== 21 passed in 38.24 seconds ========================== ++ 08:04:32 starting module/pypyjit/test [113 started in total] __ module/posix/test [110 done in total, somefailed=True] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 108 items module/posix/test/test_posix2.py .............................FFF...........................................s.........s................s module/posix/test/test_posix_libfile.py ..FF module/posix/test/test_ztranslation.py . =================================== FAILURES =================================== ___________________________ AppTestPosix.test_popen ____________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdb7f40650>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdbcfbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb82467d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb8246af0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb8246af0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb8246640> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb8246b40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb8246b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_popen'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen'>, space = StdObjSpace target = <function test_popen at 0xfffdb80c6e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) w_func = <Function test_popen> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_popen> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_popen> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_popen, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 pycode = <code object test_popen, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 co_code = '|\x00\x00j\x00\x00}\x01\x00x_\x00t\x01\x00d\x01\x00\x83\x01\x00D]Q\x00}\x02\x00|\x01\x00\xc9\x02\x00d\x02\x00\xca\x01...|\x03\x00\xc9\x05\x00\xca\x00\x00d\x00\x00k\x08\x00sg\x00t\x04\x00\x82\x01\x00q\x16\x00Wd\x00\x00Sq\x16\x00Wd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 co_code = '|\x00\x00j\x00\x00}\x01\x00x_\x00t\x01\x00d\x01\x00\x83\x01\x00D]Q\x00}\x02\x00|\x01\x00\xc9\x02\x00d\x02\x00\xca\x01...|\x03\x00\xc9\x05\x00\xca\x00\x00d\x00\x00k\x08\x00sg\x00t\x04\x00\x82\x01\x00q\x16\x00Wd\x00\x00Sq\x16\x00Wd\x00\x00S' next_instr = 40L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 oparg = 1, ignored = (40L,), n_args = 1, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen> code = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:494]', line 1> at line 4 defs_to_load = 2, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 pycode = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 115L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 nameindex = 5, ignored = (115L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _________________________ AppTestPosix.test_popen_with _________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdb7f545d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_with'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdbcfbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_with'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_with'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb79ef9b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb79efa00> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb79efa00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb79efa50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb79efcd0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb79efcd0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_with'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_popen_with'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_with'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_with'>, space = StdObjSpace target = <function test_popen_with at 0xfffdb815fc50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) w_func = <Function test_popen_with> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_popen_with> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_popen_with> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_popen_with, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 pycode = <code object test_popen_with, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 co_code = '|\x00\x00j\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x01\x00\xca\x01\x00}\x02\x00|\x02\x00\x8f(\x00}\x03\x00|\x03\x00\xc9\x02\x00\xca\x00\x00}\x04\x00\xcc\x12\x00|\x04\x00d\x02\x00k\x02\x00sB\x00t\x03\x00\x82\x01\x00Wd\x00\x00QXd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 co_code = '|\x00\x00j\x00\x00}\x01\x00|\x01\x00\xc9\x01\x00d\x01\x00\xca\x01\x00}\x02\x00|\x02\x00\x8f(\x00}\x03\x00|\x03\x00\xc9\x02\x00\xca\x00\x00}\x04\x00\xcc\x12\x00|\x04\x00d\x02\x00k\x02\x00sB\x00t\x03\x00\x82\x01\x00Wd\x00\x00QXd\x00\x00S' next_instr = 21L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 oparg = 1, ignored = (21L,), n_args = 1, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen> code = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_wi...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:502]', line 1> at line 3 defs_to_load = 2, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 pycode = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 115L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 nameindex = 5, ignored = (115L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________ AppTestPosix.test_popen_child_fds _______________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdb7f548d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_child_fds'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdbcfbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_child_fds'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_child_fds'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb779efa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb779e500> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb779e500> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb74553c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb7455280> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb7455280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_child_fds'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_popen_child_fds'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_child_fds'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_child_fds'>, space = StdObjSpace target = <function test_popen_child_fds at 0xfffdb7a1cbd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) w_func = <Function test_popen_child_fds> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_popen_child_fds> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_popen_child_fds> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb8a8ee90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_popen_child_fds, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 pycode = <code object test_popen_child_fds, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 co_code = '|\x00\x00j\x00\x00}\x01\x00t\x01\x00d\x01\x00\xc9\x02\x00|\x00\x00j\x03\x00d\x02\x00g\x02\x00\xca\x01\x00d\x03\x00\x8...\x01\x00n\x15\x00\xcc\x12\x00|\x04\x00d\x07\x00k\x02\x00s\x9d\x00t\t\x00\x82\x01\x00Wd\x00\x00QXWd\x00\x00QXd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 co_code = '|\x00\x00j\x00\x00}\x01\x00t\x01\x00d\x01\x00\xc9\x02\x00|\x00\x00j\x03\x00d\x02\x00g\x02\x00\xca\x01\x00d\x03\x00\x8...\x01\x00n\x15\x00\xcc\x12\x00|\x04\x00d\x07\x00k\x02\x00s\x9d\x00t\t\x00\x82\x01\x00Wd\x00\x00QXWd\x00\x00QXd\x00\x00S' next_instr = 79L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 oparg = 1, ignored = (79L,), n_args = 1, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen> code = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_ch...ux-aarch64/build/pypy/module/posix/test/test_posix2.py:509]', line 1> at line 4 defs_to_load = 2, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 pycode = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 115L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb8befa50> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 nameindex = 5, ignored = (115L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb8d98050> space = StdObjSpace, name = 'disable_finalizers' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________________ AppTestPosix.test_popen ____________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdb76d2c50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdbcfbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb76cee10> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb76d02d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb76d02d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb76d0d70> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb76d0f50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb76d0f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_popen'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen'>, space = StdObjSpace target = <function test_popen at 0xfffdb6f2d650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) w_func = <Function test_popen> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_popen> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_popen> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_popen, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 pycode = <code object test_popen, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00j\x01\x00\xc9\x02\x00d\x02\x00\xca\x01\x00r+\x00t\x03\x00d\x03\x00\x83\x...c9\x0c\x00\xca\x00\x00}\x08\x00\xcc\x16\x00|\x08\x00|\x07\x00\x18d\x0c\x00k\x05\x00s;\x01t\t\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00j\x01\x00\xc9\x02\x00d\x02\x00\xca\x01\x00r+\x00t\x03\x00d\x03\x00\x83\x...c9\x0c\x00\xca\x00\x00}\x08\x00\xcc\x16\x00|\x08\x00|\x07\x00\x18d\x0c\x00k\x05\x00s;\x01t\t\x00\x82\x01\x00d\x00\x00S' next_instr = 77L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 oparg = 1, ignored = (77L,), n_args = 1, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen> code = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen, f...ch64/build/pypy/module/posix/test/test_posix_libfile.py:32]', line 1> at line 8 defs_to_load = 2, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 pycode = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 115L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 nameindex = 5, ignored = (115L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> space = StdObjSpace, name = 'disable_finalizers' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> space = StdObjSpace, name = 'disable_finalizers' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ____________ AppTestPosix.test_popen_and_rebind_file_in___builtin__ ____________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdb8180ed0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___buil...: <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffdbcfbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___buil...: <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffdbb7fe550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___buil...: <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb70de050> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb70de230> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb70de230> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdb70de1e0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb70de410> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdb70de410> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_popen_and_rebind_file_in___builtin__'> space = StdObjSpace target = <function test_popen_and_rebind_file_in___builtin__ at 0xfffdb7cd3150> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) w_func = <Function test_popen_and_rebind_file_in___builtin__> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace w_func = <Function test_popen_and_rebind_file_in___builtin__> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_popen_and_rebind_file_in___builtin__> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdb7a63a50>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_popen_and_rebind_file_in___builtin__, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 pycode = <code object test_popen_and_rebind_file_in___builtin__, file '[/build_dir/own-linux-aarch64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00j\x01\x00\xc9\x02\x00d\x02\x00\xca\x01\x00r+\x00t\x03\x00d\x03\x00\x83\x...x00\x84\x00\x00|\x02\x00_\x06\x00|\x05\x00\xc9\x08\x00\xca\x00\x00\x01Wd\x00\x00|\x04\x00|\x02\x00_\x06\x00Xd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00|\x01\x00j\x01\x00\xc9\x02\x00d\x02\x00\xca\x01\x00r+\x00t\x03\x00d\x03\x00\x83\x...x00\x84\x00\x00|\x02\x00_\x06\x00|\x05\x00\xc9\x08\x00\xca\x00\x00\x01Wd\x00\x00|\x04\x00|\x02\x00_\x06\x00Xd\x00\x00S' next_instr = 85L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: > self.CALL_METHOD(oparg, next_instr) interpreter/pyopcode.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 oparg = 1, ignored = (85L,), n_args = 1, n_kwargs = 0, w_self = None @jit.unroll_safe def CALL_METHOD(f, oparg, *ignored): # opargs contains the arg, and kwarg count, excluding the implicit 'self' n_args = oparg & 0xff n_kwargs = (oparg >> 8) & 0xff w_self = f.peekvalue_maybe_none(n_args + (2 * n_kwargs)) n = n_args + (w_self is not None) if not n_kwargs: w_callable = f.peekvalue(n_args + (2 * n_kwargs) + 1) w_result = f.space.call_valuestack( > w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args + 2) objspace/std/callmethod.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 dropvalues = 3, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen>, nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 dropvalues = 3, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) return self._flat_pycall(code, nargs, frame, dropvalues) elif fast_natural_arity & Code.FLATPYCALL: natural_arity = fast_natural_arity & 0xff if natural_arity > nargs >= natural_arity - len(self.defs_w): assert isinstance(code, PyCode) return self._flat_pycall_defaults(code, nargs, frame, > natural_arity - nargs, dropvalues) interpreter/function.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <BuiltinFunction popen> code = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> nargs = 1 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_popen_an...h64/build/pypy/module/posix/test/test_posix_libfile.py:59]', line 1> at line 10 defs_to_load = 2, dropvalues = 3 @jit.unroll_safe def _flat_pycall_defaults(self, code, nargs, frame, defs_to_load, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) ndefs = len(self.defs_w) start = ndefs - defs_to_load i = nargs for j in xrange(start, ndefs): new_frame.locals_cells_stack_w[i] = self.defs_w[j] i += 1 frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:218: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 pycode = <code object popen, file '/build_dir/own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 co_code = 'd\x01\x00d\x02\x00l\x00\x00\x89\x00\x00d\x01\x00d\x02\x00l\x01\x00}\x03\x00\x87\x00\x00f\x01\x00d\x03\x00\x86\x00\x00...1\x01}\x0b\x00\x01|\x04\x00|\x06\x00\x83\x01\x00\x01|\x04\x00|\x05\x00\x83\x01\x00\x01|\x0b\x00\x82\x01\x00Xd\x02\x00S' next_instr = 115L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdb79ad6d0> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object popen, file '.../own-linux-aarch64/build/pypy/module/posix/app_posix.py', line 155> at line 173 nameindex = 5, ignored = (115L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> space = StdObjSpace, name = 'disable_finalizers' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdb81d0250> space = StdObjSpace, name = 'disable_finalizers' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/posix/test/test_posix2.py::AppTestPosix::()::test_popen FAIL module/posix/test/test_posix2.py::AppTestPosix::()::test_popen_with FAIL module/posix/test/test_posix2.py::AppTestPosix::()::test_popen_child_fds FAIL module/posix/test/test_posix_libfile.py::AppTestPosix::()::test_popen FAIL module/posix/test/test_posix_libfile.py::AppTestPosix::()::test_popen_and_rebind_file_in___builtin__ =============== 5 failed, 100 passed, 3 skipped in 70.82 seconds =============== ++ 08:04:47 starting module/select/test [114 started in total] __ module/pypyjit/test [111 done in total, somefailed=False] __________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 29 items module/pypyjit/test/test_jit_hook.py ........s module/pypyjit/test/test_jit_not_in_trace.py .. module/pypyjit/test/test_jit_setup.py .... module/pypyjit/test/test_policy.py ............ module/pypyjit/test/test_pyframe.py . module/pypyjit/test/test_ztranslation.py . ==================== 28 passed, 1 skipped in 11.88 seconds ===================== ++ 08:04:47 starting module/signal/test [115 started in total] __ module/signal/test [112 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 18 items module/signal/test/test_signal.py .................. ========================== 18 passed in 28.19 seconds ========================== ++ 08:05:20 starting module/struct/test [116 started in total] __ module/select/test [113 done in total, somefailed=True] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 41 items module/select/test/test_epoll.py ........ module/select/test/test_kqueue.py sssss module/select/test/test_select.py .....FF.............FF..... module/select/test/test_ztranslation.py . =================================== FAILURES =================================== ___________________ AppTestSelectWithPipes.test_write_close ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbed63bdd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbf24dcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbed6471e0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed647b40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed647b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbed647e60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed6470a0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed6470a0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_write_close'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_write_close'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_write_close'>, space = StdObjSpace target = <function test_write_close at 0xfffbed63bf50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) w_func = <Function test_write_close> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_write_close> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_write_close> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_write_close, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 pycode = <code object test_write_close, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00\xc9\x02\x00\xca\x00\x00\\\x02\x00}\...x00|\x07\x00|\x05\x00k\x02\x00s\xa1\x01t\x08\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x05\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00\xc9\x02\x00\xca\x00\x00\\\x02\x00}\...x00|\x07\x00|\x05\x00k\x02\x00s\xa1\x01t\x08\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x05\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 114L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 nameindex = 7, ignored = (114L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________ AppTestSelectWithPipes.test_read_closed ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbed63b7d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbf24dcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbecf55c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecf55b40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecf55b40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbecf55f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecf55e60> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecf55e60> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_read_closed'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_read_closed'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_read_closed'>, space = StdObjSpace target = <function test_read_closed at 0xfffbed537cd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) w_func = <Function test_read_closed> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_read_closed> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_read_closed> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed8e0950>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_read_closed, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 pycode = <code object test_read_closed, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\\\x02\x00}\x02\x00}\x03\x00z\x85\x00|\x02\x00\x...\x00k\x02\x00n\x02\x00\x02\x01s\xa2\x00t\x05\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x02\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\\\x02\x00}\x02\x00}\x03\x00z\x85\x00|\x02\x00\x...\x00k\x02\x00n\x02\x00\x02\x01s\xa2\x00t\x05\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x02\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 61L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed9f3c90> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 nameindex = 4, ignored = (61L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbed950690> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError __________________ AppTestSelectWithSockets.test_write_close ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbecacfad0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbf24dcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_write_close'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbecad4f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecad4370> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecad4370> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbecad44b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecad4050> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbecad4050> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rite_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_write_close'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_write_close'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_write_close'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_write_close'>, space = StdObjSpace target = <function test_write_close at 0xfffbed42f7d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) w_func = <Function test_write_close> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_write_close> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_write_close> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_write_close, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 pycode = <code object test_write_close, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00\xc9\x02\x00\xca\x00\x00\\\x02\x00}\...x00|\x07\x00|\x05\x00k\x02\x00s\xa1\x01t\x08\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x05\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00d\x01\x00d\x02\x00l\x01\x00}\x02\x00|\x00\x00\xc9\x02\x00\xca\x00\x00\\\x02\x00}\...x00|\x07\x00|\x05\x00k\x02\x00s\xa1\x01t\x08\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x05\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 114L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_write_cl...-aarch64/build/pypy/module/select/test/test_select.py:104]', line 1> at line 16 nameindex = 7, ignored = (114L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError __________________ AppTestSelectWithSockets.test_read_closed ___________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffbed5cc250>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffbf24dcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbf0d1e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_read_closed'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbed108b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed108f50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed108f50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffbed108fa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed108e10> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffbed108e10> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ead_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_read_closed'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_read_closed'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_read_closed'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_read_closed'>, space = StdObjSpace target = <function test_read_closed at 0xfffbed42f4d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) w_func = <Function test_read_closed> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_read_closed> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_read_closed> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbed438bd0>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_read_closed, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 pycode = <code object test_read_closed, file '[/build_dir/own-linux-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\\\x02\x00}\x02\x00}\x03\x00z\x85\x00|\x02\x00\x...\x00k\x02\x00n\x02\x00\x02\x01s\xa2\x00t\x05\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x02\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 co_code = 'd\x01\x00d\x02\x00l\x00\x00}\x01\x00|\x00\x00\xc9\x01\x00\xca\x00\x00\\\x02\x00}\x02\x00}\x03\x00z\x85\x00|\x02\x00\x...\x00k\x02\x00n\x02\x00\x02\x01s\xa2\x00t\x05\x00\x82\x01\x00Wd\x02\x00|\x03\x00\xc9\x02\x00\xca\x00\x00\x01Xd\x02\x00S' next_instr = 61L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffbed518110> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_read_clo...-aarch64/build/pypy/module/select/test/test_select.py:138]', line 1> at line 11 nameindex = 4, ignored = (61L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffbecccb250> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/select/test/test_select.py::AppTestSelectWithPipes::()::test_write_close FAIL module/select/test/test_select.py::AppTestSelectWithPipes::()::test_read_closed FAIL module/select/test/test_select.py::AppTestSelectWithSockets::()::test_write_close FAIL module/select/test/test_select.py::AppTestSelectWithSockets::()::test_read_closed =============== 4 failed, 32 passed, 5 skipped in 44.60 seconds ================ ++ 08:05:38 starting module/sys/test [117 started in total] __ module/struct/test [114 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 41 items module/struct/test/test_struct.py ........................................ module/struct/test/test_ztranslation.py . ========================== 41 passed in 22.09 seconds ========================== ++ 08:05:43 starting module/termios/test [118 started in total] __ module/sys/test [115 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 65 items module/sys/test/apptest_initpath.py . module/sys/test/test_encoding.py . module/sys/test/test_initpath.py ....... module/sys/test/test_sysmodule.py ...............................s.................... module/sys/test/test_version.py .... ==================== 64 passed, 1 skipped in 13.38 seconds ===================== ++ 08:05:53 starting module/test_lib_pypy [119 started in total] __ module/termios/test [116 done in total, somefailed=False] __________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 8 items module/termios/test/test_termios.py sssss... ===================== 3 passed, 5 skipped in 8.54 seconds ====================== ++ 08:05:54 starting module/thread/test [120 started in total] __ module/test_lib_pypy [117 done in total, somefailed=False] _________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 200 items / 7 skipped module/test_lib_pypy/test_collections.py ..................... module/test_lib_pypy/test_marshal_extra.py ....................................................................................................................................................... module/test_lib_pypy/test_md5_extra.py ...... module/test_lib_pypy/test_msvcrt.py s module/test_lib_pypy/test_pickle_extra.py s module/test_lib_pypy/test_sha_extra.py ... module/test_lib_pypy/test_site_extra.py . module/test_lib_pypy/test_structseq.py ......... module/test_lib_pypy/test_tputil.py ..s.... =================== 197 passed, 10 skipped in 69.48 seconds ==================== ++ 08:07:06 starting module/time/test [121 started in total] __ module/time/test [118 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 18 items module/time/test/test_time.py .................. ========================== 18 passed in 35.48 seconds ========================== ++ 08:07:44 starting module/unicodedata/test [122 started in total] __ module/thread/test [119 done in total, somefailed=True] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 48 items module/thread/test/test_fork.py s.. module/thread/test/test_gil.py ..FF module/thread/test/test_import_lock.py ..... module/thread/test/test_local.py F....F. module/thread/test/test_lock.py ................. module/thread/test/test_thread.py .F.......... =================================== FAILURES =================================== ______________________ TestUsingFramework.test_one_thread ______________________ self = <pypy.module.thread.test.test_gil.TestUsingFramework object at 0xfffe8e4ccd10> skew = 25000 def test_one_thread(self, skew=+1): from rpython.rlib.debug import debug_print if self.bigtest: N = 100000 skew *= 25000 else: N = 100 skew *= 25 space = FakeSpace() class State: pass state = State() def runme(main=False): j = 0 for i in range(N + [-skew, skew][main]): state.datalen1 += 1 # try to crash if the GIL is not state.datalen2 += 1 # correctly acquired state.data.append((thread.get_ident(), i)) state.datalen3 += 1 state.datalen4 += 1 assert state.datalen1 == len(state.data) assert state.datalen2 == len(state.data) assert state.datalen3 == len(state.data) assert state.datalen4 == len(state.data) debug_print(main, i, state.datalen4) rgil.yield_thread() assert i == j j += 1 def bootstrap(): try: runme() except Exception as e: assert 0 thread.gc_thread_die() my_gil_threadlocals = gil.GILThreadLocals(space) def f(): state.data = [] state.datalen1 = 0 state.datalen2 = 0 state.datalen3 = 0 state.datalen4 = 0 state.threadlocals = my_gil_threadlocals state.threadlocals.setup_threads(space) subident = thread.start_new_thread(bootstrap, ()) mainident = thread.get_ident() runme(True) still_waiting = 3000 while len(state.data) < 2*N: debug_print(len(state.data)) if not still_waiting: llop.debug_print(lltype.Void, "timeout. progress: " "%d of %d (= %f%%)" % \ (len(state.data), 2*N, 100*len(state.data)/(2.0*N))) raise ValueError("time out") still_waiting -= 1 if not we_are_translated(): rgil.release() time.sleep(0.1) if not we_are_translated(): rgil.acquire() debug_print("leaving!") i1 = i2 = 0 for tid, i in state.data: if tid == mainident: assert i == i1; i1 += 1 elif tid == subident: assert i == i2; i2 += 1 else: assert 0 assert i1 == N + skew assert i2 == N - skew return len(state.data) > fn = self.getcompiled(f, []) module/thread/test/test_gil.py:107: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../rpython/translator/c/test/test_boehm.py:40: in getcompiled thread=self.use_threads, **extra_options) ../rpython/translator/c/test/test_genc.py:124: in compile t.compile_c() ../rpython/translator/interactive.py:123: in compile_c self.driver.compile_c() ../rpython/translator/driver.py:108: in proc return self.proceed(backend_goal) ../rpython/translator/driver.py:568: in proceed result = self._execute(goals, task_skip = self._maybe_skip()) ../rpython/translator/tool/taskengine.py:114: in _execute res = self._do(goal, taskcallable, *args, **kwds) ../rpython/translator/driver.py:278: in _do res = func() ../rpython/translator/driver.py:435: in task_database_c database = cbuilder.build_database() ../rpython/translator/c/genc.py:102: in build_database self.config.translation.reverse_debugger) ../rpython/translator/c/database.py:64: in __init__ self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks) ../rpython/translator/c/gc.py:452: in gettransformer return shadowstack.ShadowStackFrameworkGCTransformer(translator, gchooks) ../rpython/memory/gctransform/framework.py:132: in __init__ GCClass, GC_PARAMS = choose_gc_from_config(translator.config) ../rpython/memory/gc/base.py:593: in choose_gc_from_config globals(), locals(), [classname]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ import sys from rpython.memory.gc.semispace import SemiSpaceGC from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/generation.py:5: SyntaxError ----------------------------- Captured stderr call ----------------------------- [flowgraph] (rpython.translator.c.test.test_genc:66)entry_point [translation:info] Annotating&simplifying... [translation:info] with policy: rpython.annotator.policy.AnnotatorPolicy [flowgraph] (pypy.module.thread.test.test_gil:71)f [flowgraph] (pypy.module.thread.gil:25)GILThreadLocals.setup_threads [flowgraph] (rpython.rlib.rgil:153)allocate [flowgraph] (rpython.rlib.rthread:130)start_new_thread [flowgraph] (rpython.rlib.rthread:99)ll_start_new_thread [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)RPyThreadStart [flowgraph] (?:6)wrapper [flowgraph] (rpython.rlib.rgil:183)acquire_maybe_in_new_thread [flowgraph] (rpython.rlib.rthread:124)get_or_make_ident [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_RPyThreadStart [flowgraph] (rpython.rlib.rthread:356)get_or_make_raw [flowgraph] (rpython.rlib.rgil:160)release [flowgraph] (rpython.rlib.rgil:171)acquire [flowgraph] (rpython.rlib.rthread:282)gc_thread_run [flowgraph] (pypy.module.thread.test.test_gil:64)bootstrap [flowgraph] (pypy.module.thread.test.test_gil:48)runme [flowgraph] (rpython.rlib.rposix:500)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1427)scoped_nonmovingbuffer.__init__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1431)scoped_nonmovingbuffer.__enter__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:873)get_nonmovingbuffer_ll [flowgraph] (rpython.rlib.rthread:114)get_ident [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.objectmodel:315)we_are_translated_to_c [flowgraph] (rpython.rlib.rthread:297)gc_thread_die [flowgraph] (rpython.rtyper.lltypesystem.rstr:116)copy_string_to_raw [flowgraph] (rpython.rtyper.lltypesystem.rstr:63)_get_raw_buf [flowgraph] (rpython.rtyper.lltypesystem.rstr:57)_str_ofs [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1433)scoped_nonmovingbuffer.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:937)free_nonmovingbuffer_ll [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_write [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rgil:201)yield_thread [flowgraph] (rpython.rlib.rtime:282)sleep [flowgraph] (rpython.rtyper.lltypesystem.lltype:2296)scoped_alloc [flowgraph] (rpython.rtyper.lltypesystem.lltype:2280)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__init__ [flowgraph] (rpython.rtyper.lltypesystem.lltype:2286)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__enter__ [flowgraph] (rpython.flowspace.specialcase:76)rpython_print_item [flowgraph] (rpython.translator.c.test.test_genc:39)llrepr_out [flowgraph] (rpython.rtyper.lltypesystem.lltype:2289)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1362)setintfield [flowgraph] (rpython.rtyper.lltypesystem.rffi:1362)setintfield [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)select [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_select [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:113)get_saved_errno [flowgraph] (rpython.flowspace.specialcase:95)rpython_print_newline [flowgraph] (rpython.flowspace.specialcase:85)rpython_print_end [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rlib.rarithmetic:139)widen [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__make_wrapper_for_0 [flowgraph] (?:1)memo_offsetof_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__make_scoped_allocator_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__should_widen_type_0 [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] RTyping... [flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:218)ll_math_fmod [flowgraph] (rpython.rtyper.lltypesystem.rstr:350)ll_strlen [flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:11)ll_join_chars_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:821)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)mallocstr [flowgraph] (rpython.rtyper.lltypesystem.rstr:36)mallocstr [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_chars_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (?:11)ll_listdelslice_startonly_look_inside_iff [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rtyper.rlist:912)<lambda> [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:295)_ll_list_resize_le [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:2)ll_listdelslice_startonly_trampoline [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (rpython.rtyper.lltypesystem.rstr:1293)ll_striter [flowgraph] (rpython.rtyper.lltypesystem.rlist:476)ll_listnext [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:384)ll_fixed_newlist [flowgraph] (rpython.rtyper.rlist:726)ll_setitem_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:407)ll_fixed_setitem_fast [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:721)ll_getitem_foldable_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:402)ll_fixed_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rrange:70)ll_newrange [flowgraph] (rpython.rtyper.lltypesystem.rrange:91)ll_rangeiter [rtyper] specializing: 100 / 560 blocks (17%) [flowgraph] (rpython.rtyper.rclass:870)ll_str [flowgraph] (rpython.rtyper.lltypesystem.rstr:425)ll_strconcat [flowgraph] (rpython.rtyper.lltypesystem.rstr:416)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rstr:78)copy_string_contents [flowgraph] (rpython.rtyper.lltypesystem.ll_str:47)ll_int2hex [flowgraph] (rpython.rtyper.lltypesystem.ll_str:7)ll_unsigned [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (rpython.rtyper.rstr:425)ll_str [flowgraph] (?:1)memo_ll_constant_0 [flowgraph] (?:11)ll_join_strs_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.lltypesystem.rstr:785)<lambda> [flowgraph] (rpython.rlib.jit:294)loop_unrolling_heuristic [flowgraph] (rpython.rtyper.lltypesystem.llmemory:1037)cast_any_ptr [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_strs_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.rint:149)ll_str [flowgraph] (rpython.rtyper.lltypesystem.ll_str:13)ll_int2dec [flowgraph] (rpython.rtyper.lltypesystem.ll_str:7)ll_unsigned [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [flowgraph] (rpython.rtyper.lltypesystem.rlist:470)ll_listiter [rtyper] specializing: 200 / 704 blocks (28%) [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.rfloat:60)ll_str [flowgraph] (?:2)formatd [flowgraph] (rpython.rlib.rfloat:105)formatd [flowgraph] (rpython.rlib.rdtoa:290)dtoa_formatd [flowgraph] (rpython.rlib.rdtoa:248)dtoa [flowgraph] (rpython.rlib.objectmodel:397)revdb_flag_io_disabled [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)_PyPy_dg_dtoa [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)_PyPy_dg_freedtoa [flowgraph] (rpython.rlib.rdtoa:82)format_nonfinite [flowgraph] (rpython.rlib.rdtoa:97)format_number [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [rtyper] specializing: 300 / 882 blocks (34%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:856)ll_stringslice_startonly [flowgraph] (rpython.rtyper.lltypesystem.rstr:840)_ll_stringslice [flowgraph] (?:1)memo_emptystrfun_0 [rtyper] specializing: 400 / 893 blocks (44%) [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:328)ll_append_charpsize [flowgraph] (rpython.rtyper.lltypesystem.rstr:145)copy_raw_to_string [flowgraph] (?:2)ll_grow_by [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:94)ll_grow_by [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:178)ll_append_char [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:11)ll_build_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)<lambda> [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:374)ll_fold_pieces [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:346)ll_getlength [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:365)ll_shrink_final [flowgraph] (?:2)ll_shrink_array [flowgraph] (rpython.rlib.rgc:468)ll_shrink_array [flowgraph] (?:2)ll_build_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rtyper.rstr:930)ll_lower_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:275)ll_append_multiple_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:282)_ll_append_multiple_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:299)ll_jit_try_append_multiple_char [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:721)ll_getitem_foldable_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:402)ll_fixed_getitem_fast [rtyper] specializing: 500 / 1005 blocks (49%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:860)ll_stringslice_startstop [flowgraph] (rpython.rtyper.lltypesystem.rstr:362)ll_chr2str [rtyper] specializing: 600 / 1016 blocks (59%) [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:445)ll_new [rtyper] specializing: 700 / 1022 blocks (68%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1046)ll_contains [flowgraph] (rpython.rtyper.rstr:890)ll_char_isdigit [flowgraph] (rpython.rtyper.lltypesystem.rstr:354)ll_stritem_nonneg [rtyper] specializing: 800 / 1032 blocks (77%) [rtyper] specializing: 900 / 1032 blocks (87%) [flowgraph] (rpython.rtyper.rbuiltin:240)ll_min [rtyper] specializing: 1000 / 1034 blocks (96%) [rtyper] -=- specialized 1034 blocks -=- [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)fmod [flowgraph] (rpython.rtyper.lltypesystem.rffi:2)ccall_fmod [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rfloat:567)_likely_raise [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)fabs [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:106)ll_math_isfinite [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:91)ll_math_isnan [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:98)ll_math_isinf [rtyper] -=- specialized 46 more blocks -=- [rtyper] -=- specialized 9 more blocks -=- [flowgraph] (rpython.rtyper.rclass:1133)ll_issubclass [flowgraph] (rpython.rtyper.rclass:1130)ll_type [rtyper] -=- specialized 4 more blocks -=- [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] lltype back-end optimisations... [backendopt:removecasts] removed 6 cast_pointers in f [backendopt:removecasts] removed 1 cast_pointers in ll_start_new_thread__bootstrap [backendopt:removecasts] removed 1 cast_pointers in bootstrap [backendopt:removecasts] removed 5 cast_pointers in runme [backendopt:removecasts] removed 1 cast_pointers in _get_raw_buf__rpy_string [backendopt:removecasts] removed 3 cast_pointers in sleep [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__write [backendopt:removecasts] removed 1 cast_pointers in ll_rangenext_up__rangePtr_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_listnext__listiterPtr [backendopt:removecasts] removed 1 cast_pointers in copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v38___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v44___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in ll_strnext__stringiterPtr [backendopt:removecasts] removed 2 cast_pointers in dtoa_formatd__Float_Char_Signed_Signed [backendopt:removecasts] removed 3 cast_pointers in dtoa__Float_Char_Signed_Signed_Signed_SomeList_Bool [backendopt:removecasts] removed 1 cast_pointers in format_nonfinite__arrayPtr_Signed_Signed_SomeList [backendopt:removecasts] removed 4 cast_pointers in format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool [backendopt:removecasts] removed 1 cast_pointers in _ll_stringslice__rpy_stringPtr_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_grow_by__stringbuilderPtr_Signed [backendopt:removecasts] removed 3 cast_pointers in _likely_raise [backendopt:inlining] phase with threshold factor: 32.4 [backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic [backendopt:inlining] 0.00 conditional_call__v50___simple_call__function_co_star_2 [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_Signed [backendopt:inlining] 0.00 ll_append_char__stringbuilderPtr_Char [backendopt:inlining] 0.00 isconstant__v48___simple_call__function_is [backendopt:inlining] 0.00 ll_append_multiple_char__stringbuilderPtr_Char_Signed [backendopt:inlining] 0.00 fmod__Float_Float_star_2 [backendopt:inlining] 0.00 isconstant__v58___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v60___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v46___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v41___simple_call__function_is [backendopt:inlining] 0.00 memo_conststr_0 [backendopt:inlining] 0.00 isvirtual__v18___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v35___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v27___simple_call__function_is [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 isvirtual__v24___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v52___simple_call__function_is [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 ll_getlength__stringbuilderPtr [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 isvirtual__v42___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isconstant__v17___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v26___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v6___simple_call__function_con_star_3 [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:inlining] 0.00 RPyThreadStart__bootstrapConst_star_1 [backendopt:inlining] 0.00 _PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6 [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 isconstant__v11___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v28___simple_call__function_co_star_3 [backendopt:inlining] 0.00 select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5 [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 isconstant__v34___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v7___simple_call__function_isc [backendopt:inlining] 0.00 isconstant__v5___simple_call__function_isc [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 _PyPy_dg_freedtoa__arrayPtr_star_1 [backendopt:inlining] 0.00 conditional_call__v47___simple_call__function_co_star_3 [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 isconstant__v56___simple_call__function_is [backendopt:inlining] 0.00 ll_unsigned__Unsigned [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 fabs__Float_star_1 [backendopt:inlining] 0.00 isconstant__v23___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v12___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 0.00 gc_thread_die [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 ll_strlen__rpy_stringPtr [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_uint_py_mod__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_uint_py_div__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_math_isnan__Float [backendopt:inlining] 2.00 ll_unsigned__Signed [backendopt:inlining] 2.00 ll_length__rpy_stringPtr [backendopt:inlining] 2.00 ll_fixed_newlist__GcArray_SignedLlT_Signed [backendopt:inlining] 2.00 ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__enter__ [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 get_or_make_raw [backendopt:inlining] 4.00 ll_str__StringR_Ptr_GcStruct_rpy_strin_rpy_stringPtr [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 ll_math_isfinite__Float [backendopt:inlining] 4.00 ll_min__Unsigned_Unsigned [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_Signed [backendopt:inlining] 4.00 loop_unrolling_heuristic__v40___simple_call__function_lo [backendopt:inlining] 4.00 ll_fixed_setitem_fast__arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 setintfield__timevalPtr_c_tv_sec_Signed [backendopt:inlining] 4.00 setintfield__timevalPtr_c_tv_usec_Signed [backendopt:inlining] 5.00 release [backendopt:inlining] 5.00 allocate [backendopt:inlining] 2.00 get_ident [backendopt:inlining] 2.00 get_or_make_ident [backendopt:inlining] 5.50 ll_math_isinf__Float [backendopt:inlining] 6.00 _str_ofs__rpy_string [backendopt:inlining] 6.00 ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__init__ [backendopt:inlining] 7.00 mallocstr__Signed [backendopt:inlining] 4.00 get_saved_errno [backendopt:inlining] 7.00 ll_str__IntegerR_SignedConst_Signed [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 ll_build_look_inside_iff__stringbuilderPtr [backendopt:inlining] 7.00 ll_shrink_array__rpy_stringPtr_Signed [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_Signed [backendopt:inlining] 7.00 rpython_print_newline [backendopt:inlining] 7.00 start_new_thread__bootstrap [backendopt:inlining] 7.00 llrepr_out__int [backendopt:inlining] 7.50 ll_char_isdigit__Char [backendopt:inlining] 7.50 mallocstr__Signed [backendopt:inlining] 8.00 ll_newrange__Ptr_GcStruct_rangeLlT_Signed_Signed [backendopt:inlining] 8.00 ll_listiter__Ptr_GcStruct_listiterLlT_listPtr [backendopt:inlining] 8.00 ll_newemptylist__GcStruct_listLlT [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 9.00 ll_join_strs_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 9.00 ll_str__FloatR_FloatConst_Float [backendopt:inlining] 9.00 formatd__Float_Char_Signed_Signed [backendopt:inlining] 9.00 formatd__Float_Char_Signed_Signed [backendopt:inlining] 9.00 ll_join_chars_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.50 ll_chr2str__Char [backendopt:inlining] 7.00 acquire [backendopt:inlining] 10.75 GILThreadLocals.setup_threads [backendopt:inlining] 10.75 ll_lower_char__Char [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 11.00 ll_stringslice_startonly__rpy_stringPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_Char [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_GCREFPtr [backendopt:inlining] 12.00 ll_rangeiter__Ptr_GcStruct_rangeLlT_rangePtr [backendopt:inlining] 12.00 ll_striter__rpy_stringPtr [backendopt:inlining] 12.00 bootstrap [backendopt:inlining] 12.50 ll_rangenext_up__rangePtr_Signed [backendopt:inlining] 12.00 scoped_alloc__timeval_False [backendopt:inlining] 13.00 free_nonmovingbuffer_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v30___simple_call__function_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v21___simple_call__function_ll [backendopt:inlining] 9.00 acquire_maybe_in_new_thread [backendopt:inlining] 15.50 ll_strnext__stringiterPtr [backendopt:inlining] 17.00 ll_contains__rpy_stringPtr_Char [backendopt:inlining] 18.12 ll_stringslice_startstop__rpy_stringPtr_Signed_Signed [backendopt:inlining] 19.00 ll_shrink_final__stringbuilderPtr [backendopt:inlining] 21.00 ccall_fmod [backendopt:inlining] 22.00 ll_shrink_array__rpy_stringPtr_Signed [backendopt:inlining] 19.00 ll_listnext__listiterPtr [backendopt:inlining] 17.00 ll_append__listPtr_Char [backendopt:inlining] 17.00 ll_append__listPtr_GCREFPtr [backendopt:inlining] 19.25 _errno_after__v62___simple_call__function__e [backendopt:inlining] 19.25 _errno_after__v3___simple_call__function__er [backendopt:inlining] 19.25 _errno_after__v1___simple_call__function__er [backendopt:inlining] 26.16 ll_join_chars__v16___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v20___simple_call__function_ll [backendopt:inlining] 27.50 ll_new__Signed [backendopt:inlining] 27.50 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 31.75 handle_posix_error__write [backendopt:inlining] 31.87 _errno_before__v61___simple_call__function__e [backendopt:inlining] 31.87 _errno_before__v2___simple_call__function__er [backendopt:inlining] 31.87 _errno_before__v0___simple_call__function__er [backendopt:inlining] inlined 329 callsites. [backendopt:malloc] starting malloc removal [backendopt:malloc] 2 simple mallocs removed in 'f' [backendopt:malloc] 2 simple mallocs removed in 'll_start_new_thread__bootstrap' [backendopt:malloc] 2 simple mallocs removed in 'RPyThreadStart__bootstrapConst_star_1' [backendopt:malloc] 1 simple mallocs removed in 'wrapper' [backendopt:malloc] 2 simple mallocs removed in 'runme' [backendopt:malloc] 3 simple mallocs removed in 'write' [backendopt:malloc] 2 simple mallocs removed in 'scoped_nonmovingbuffer.__init__' [backendopt:malloc] 7 simple mallocs removed in 'write__Signed_arrayPtr_Signed_star_3' [backendopt:malloc] 1 simple mallocs removed in 'sleep' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_item' [backendopt:malloc] 8 simple mallocs removed in 'select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_end' [backendopt:malloc] 5 simple mallocs removed in 'll_math_fmod__Float_Float' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v6___simple_call__function_con_star_3' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v28___simple_call__function_co_star_3' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v47___simple_call__function_co_star_3' [backendopt:malloc] 13 simple mallocs removed in '_PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6' [backendopt:malloc] 3 simple mallocs removed in '_PyPy_dg_freedtoa__arrayPtr_star_1' [backendopt:malloc] 7 simple mallocs removed in 'format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool' [backendopt:malloc] 1 simple mallocs removed in 'll_append_char__stringbuilderPtr_Char' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v50___simple_call__function_co_star_2' [backendopt:malloc] 4 simple mallocs removed in '_ll_append_multiple_char__stringbuilderPtr_Char_Signed' [backendopt:malloc] 5 simple mallocs removed in 'fmod__Float_Float_star_2' [backendopt:malloc] 3 simple mallocs removed in '_likely_raise' [backendopt:malloc] 3 simple mallocs removed in 'fabs__Float_star_1' [backendopt:malloc] removed 83 simple mallocs in total [backendopt:mergeifblocks] starting to merge if blocks [backendopt] merging blocks in dtoa_formatd__Float_Char_Signed_Signed [backendopt] merging blocks in format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] already done: lltype back-end optimisations [translation:info] inserting stack checks... [flowgraph] (rpython.rlib.rstack:42)stack_check [flowgraph] (rpython.rlib.rstack:67)stack_check_slowpath [rtyper] specializing: 1100 / 1101 blocks (99%) [rtyper] -=- specialized 8 more blocks -=- [translation:info] inserted 0 stack checks. [translation:info] Creating database for generating c source... [flowgraph] (rpython.translator.exceptiontransform:100)rpyexc_occurred [flowgraph] (rpython.translator.exceptiontransform:104)rpyexc_fetch_type [flowgraph] (rpython.translator.exceptiontransform:107)rpyexc_fetch_value [flowgraph] (rpython.translator.exceptiontransform:110)rpyexc_clear [flowgraph] (rpython.translator.exceptiontransform:114)rpyexc_raise [flowgraph] (rpython.translator.exceptiontransform:128)rpyexc_reraise [flowgraph] (rpython.translator.exceptiontransform:133)rpyexc_fetch_exception [flowgraph] (rpython.translator.exceptiontransform:138)rpyexc_restore_exception [flowgraph] (rpython.translator.exceptiontransform:539)rpyexc_get_exception_addr [flowgraph] (rpython.translator.exceptiontransform:543)rpyexc_get_exc_value_addr [flowgraph] (rpython.rtyper.rclass:1173)ll_inst_type [rtyper] -=- specialized 25 more blocks -=- [flowgraph] (rpython.memory.gctransform.transform:447)_ll_malloc_fixedsize [flowgraph] (rpython.memory.gctransform.transform:454)_ll_malloc_fixedsize_zero [flowgraph] (rpython.memory.gctransform.transform:470)_ll_malloc_varsize_no_length [flowgraph] (rpython.memory.gctransform.transform:487)ll_malloc_varsize [flowgraph] (rpython.memory.gctransform.transform:493)_ll_malloc_varsize_no_length_zero ____________________ TestUsingFramework.test_one_thread_rev ____________________ self = <pypy.module.thread.test.test_gil.TestUsingFramework object at 0xfffe8c27d150> def test_one_thread_rev(self): > self.test_one_thread(skew=-1) module/thread/test/test_gil.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ module/thread/test/test_gil.py:107: in test_one_thread fn = self.getcompiled(f, []) ../rpython/translator/c/test/test_boehm.py:40: in getcompiled thread=self.use_threads, **extra_options) ../rpython/translator/c/test/test_genc.py:124: in compile t.compile_c() ../rpython/translator/interactive.py:123: in compile_c self.driver.compile_c() ../rpython/translator/driver.py:108: in proc return self.proceed(backend_goal) ../rpython/translator/driver.py:568: in proceed result = self._execute(goals, task_skip = self._maybe_skip()) ../rpython/translator/tool/taskengine.py:114: in _execute res = self._do(goal, taskcallable, *args, **kwds) ../rpython/translator/driver.py:278: in _do res = func() ../rpython/translator/driver.py:435: in task_database_c database = cbuilder.build_database() ../rpython/translator/c/genc.py:102: in build_database self.config.translation.reverse_debugger) ../rpython/translator/c/database.py:64: in __init__ self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks) ../rpython/translator/c/gc.py:452: in gettransformer return shadowstack.ShadowStackFrameworkGCTransformer(translator, gchooks) ../rpython/memory/gctransform/framework.py:132: in __init__ GCClass, GC_PARAMS = choose_gc_from_config(translator.config) ../rpython/memory/gc/base.py:593: in choose_gc_from_config globals(), locals(), [classname]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ import sys from rpython.memory.gc.semispace import SemiSpaceGC from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/generation.py:5: SyntaxError ----------------------------- Captured stderr call ----------------------------- [flowgraph] (rpython.translator.c.test.test_genc:66)entry_point [translation:info] Annotating&simplifying... [translation:info] with policy: rpython.annotator.policy.AnnotatorPolicy [flowgraph] (pypy.module.thread.test.test_gil:71)f [flowgraph] (pypy.module.thread.gil:25)GILThreadLocals.setup_threads [flowgraph] (rpython.rlib.rgil:153)allocate [flowgraph] (rpython.rlib.rthread:130)start_new_thread [flowgraph] (rpython.rlib.rthread:99)ll_start_new_thread [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)RPyThreadStart [flowgraph] (?:6)wrapper [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_RPyThreadStart [flowgraph] (rpython.rlib.rgil:160)release [flowgraph] (rpython.rlib.rgil:183)acquire_maybe_in_new_thread [flowgraph] (rpython.rlib.rthread:124)get_or_make_ident [flowgraph] (rpython.rlib.rthread:356)get_or_make_raw [flowgraph] (rpython.rlib.rgil:171)acquire [flowgraph] (rpython.rlib.rthread:282)gc_thread_run [flowgraph] (pypy.module.thread.test.test_gil:64)bootstrap [flowgraph] (pypy.module.thread.test.test_gil:48)runme [flowgraph] (rpython.rlib.rposix:500)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1427)scoped_nonmovingbuffer.__init__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1431)scoped_nonmovingbuffer.__enter__ [flowgraph] (rpython.rlib.rthread:114)get_ident [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rtyper.lltypesystem.rffi:873)get_nonmovingbuffer_ll [flowgraph] (rpython.rlib.objectmodel:315)we_are_translated_to_c [flowgraph] (rpython.rlib.rthread:297)gc_thread_die [flowgraph] (rpython.rtyper.lltypesystem.rstr:116)copy_string_to_raw [flowgraph] (rpython.rtyper.lltypesystem.rstr:63)_get_raw_buf [flowgraph] (rpython.rtyper.lltypesystem.rstr:57)_str_ofs [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1433)scoped_nonmovingbuffer.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:937)free_nonmovingbuffer_ll [flowgraph] (rpython.rlib.rgil:201)yield_thread [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_write [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rtime:282)sleep [flowgraph] (rpython.rtyper.lltypesystem.lltype:2296)scoped_alloc [flowgraph] (rpython.rtyper.lltypesystem.lltype:2280)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__init__ [flowgraph] (rpython.rtyper.lltypesystem.lltype:2286)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__enter__ [flowgraph] (rpython.flowspace.specialcase:76)rpython_print_item [flowgraph] (rpython.translator.c.test.test_genc:39)llrepr_out [flowgraph] (rpython.rtyper.lltypesystem.lltype:2289)ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1362)setintfield [flowgraph] (rpython.rtyper.lltypesystem.rffi:1362)setintfield [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)select [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_select [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:113)get_saved_errno [flowgraph] (rpython.flowspace.specialcase:95)rpython_print_newline [flowgraph] (rpython.flowspace.specialcase:85)rpython_print_end [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rlib.rarithmetic:139)widen [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__make_wrapper_for_0 [flowgraph] (?:1)memo_offsetof_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__make_scoped_allocator_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__should_widen_type_0 [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] RTyping... [flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [flowgraph] (rpython.rtyper.rstr:425)ll_str [flowgraph] (?:1)memo_ll_constant_0 [flowgraph] (?:11)ll_join_strs_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.lltypesystem.rstr:785)<lambda> [flowgraph] (rpython.rlib.jit:294)loop_unrolling_heuristic [flowgraph] (rpython.rtyper.lltypesystem.llmemory:1037)cast_any_ptr [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)mallocstr [flowgraph] (rpython.rtyper.lltypesystem.rstr:36)mallocstr [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_strs_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:78)copy_string_contents [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.lltypesystem.rlist:470)ll_listiter [flowgraph] (rpython.rtyper.lltypesystem.rstr:1293)ll_striter [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.rclass:870)ll_str [flowgraph] (rpython.rtyper.lltypesystem.rstr:425)ll_strconcat [flowgraph] (rpython.rtyper.lltypesystem.rstr:416)ll_length [flowgraph] (rpython.rtyper.lltypesystem.ll_str:47)ll_int2hex [flowgraph] (rpython.rtyper.lltypesystem.ll_str:7)ll_unsigned [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (?:1)memo_conststr_0 [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [rtyper] specializing: 100 / 590 blocks (16%) [flowgraph] (rpython.rtyper.lltypesystem.ll_str:13)ll_int2dec [flowgraph] (rpython.rtyper.lltypesystem.ll_str:7)ll_unsigned [flowgraph] (rpython.rtyper.rfloat:60)ll_str [flowgraph] (?:2)formatd [flowgraph] (rpython.rlib.rfloat:105)formatd [flowgraph] (rpython.rlib.rdtoa:290)dtoa_formatd [flowgraph] (rpython.rlib.rdtoa:248)dtoa [flowgraph] (rpython.rlib.objectmodel:397)revdb_flag_io_disabled [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)_PyPy_dg_dtoa [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)_PyPy_dg_freedtoa [flowgraph] (rpython.rlib.rdtoa:97)format_number [flowgraph] (rpython.rlib.rdtoa:82)format_nonfinite [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:218)ll_math_fmod [flowgraph] (rpython.rtyper.lltypesystem.rstr:350)ll_strlen [rtyper] specializing: 200 / 784 blocks (25%) [flowgraph] (?:11)ll_join_chars_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (rpython.rtyper.lltypesystem.rstr:821)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_chars_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (?:11)ll_listdelslice_startonly_look_inside_iff [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [flowgraph] (rpython.rtyper.rlist:912)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rtyper.lltypesystem.rlist:295)_ll_list_resize_le [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)ll_listdelslice_startonly_trampoline [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rtyper.rint:149)ll_str [flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rlist:384)ll_fixed_newlist [flowgraph] (rpython.rtyper.rlist:726)ll_setitem_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:407)ll_fixed_setitem_fast [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:721)ll_getitem_foldable_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:402)ll_fixed_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rrange:70)ll_newrange [flowgraph] (rpython.rtyper.lltypesystem.rrange:91)ll_rangeiter [flowgraph] (rpython.rtyper.lltypesystem.rlist:476)ll_listnext [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [rtyper] specializing: 300 / 882 blocks (34%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:362)ll_chr2str [rtyper] specializing: 400 / 885 blocks (45%) [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:721)ll_getitem_foldable_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:402)ll_fixed_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:275)ll_append_multiple_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:282)_ll_append_multiple_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:299)ll_jit_try_append_multiple_char [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)ll_grow_by [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:94)ll_grow_by [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:178)ll_append_char [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rtyper.lltypesystem.rstr:1046)ll_contains [flowgraph] (rpython.rtyper.lltypesystem.rstr:860)ll_stringslice_startstop [flowgraph] (rpython.rtyper.lltypesystem.rstr:840)_ll_stringslice [flowgraph] (?:1)memo_emptystrfun_0 [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:445)ll_new [rtyper] specializing: 500 / 964 blocks (51%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:354)ll_stritem_nonneg [rtyper] specializing: 600 / 966 blocks (62%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:856)ll_stringslice_startonly [flowgraph] (rpython.rtyper.rstr:890)ll_char_isdigit [rtyper] specializing: 700 / 971 blocks (72%) [flowgraph] (rpython.rtyper.rstr:930)ll_lower_char [flowgraph] (?:11)ll_build_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:365)ll_shrink_final [flowgraph] (?:2)ll_shrink_array [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:374)ll_fold_pieces [flowgraph] (rpython.rlib.rgc:468)ll_shrink_array [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:346)ll_getlength [flowgraph] (?:2)ll_build_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:328)ll_append_charpsize [flowgraph] (rpython.rtyper.lltypesystem.rstr:145)copy_raw_to_string [rtyper] specializing: 800 / 1032 blocks (77%) [rtyper] specializing: 900 / 1032 blocks (87%) [flowgraph] (rpython.rtyper.rbuiltin:240)ll_min [rtyper] specializing: 1000 / 1034 blocks (96%) [rtyper] -=- specialized 1034 blocks -=- [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)fmod [flowgraph] (rpython.rtyper.lltypesystem.rffi:2)ccall_fmod [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rfloat:567)_likely_raise [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)fabs [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:91)ll_math_isnan [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:98)ll_math_isinf [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:106)ll_math_isfinite [rtyper] -=- specialized 46 more blocks -=- [rtyper] -=- specialized 9 more blocks -=- [flowgraph] (rpython.rtyper.rclass:1133)ll_issubclass [flowgraph] (rpython.rtyper.rclass:1130)ll_type [rtyper] -=- specialized 4 more blocks -=- [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] lltype back-end optimisations... [backendopt:removecasts] removed 6 cast_pointers in f [backendopt:removecasts] removed 1 cast_pointers in ll_start_new_thread__bootstrap [backendopt:removecasts] removed 1 cast_pointers in bootstrap [backendopt:removecasts] removed 5 cast_pointers in runme [backendopt:removecasts] removed 1 cast_pointers in _get_raw_buf__rpy_string [backendopt:removecasts] removed 3 cast_pointers in sleep [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__write [backendopt:removecasts] removed 1 cast_pointers in ll_strnext__stringiterPtr [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v67___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v73___simple_call__function_ll [backendopt:removecasts] removed 2 cast_pointers in dtoa_formatd__Float_Char_Signed_Signed [backendopt:removecasts] removed 3 cast_pointers in dtoa__Float_Char_Signed_Signed_Signed_SomeList_Bool [backendopt:removecasts] removed 4 cast_pointers in format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool [backendopt:removecasts] removed 1 cast_pointers in format_nonfinite__arrayPtr_Signed_Signed_SomeList [backendopt:removecasts] removed 1 cast_pointers in ll_rangenext_up__rangePtr_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_listnext__listiterPtr [backendopt:removecasts] removed 1 cast_pointers in ll_grow_by__stringbuilderPtr_Signed [backendopt:removecasts] removed 1 cast_pointers in _ll_stringslice__rpy_stringPtr_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:removecasts] removed 3 cast_pointers in _likely_raise [backendopt:inlining] phase with threshold factor: 32.4 [backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic [backendopt:inlining] 0.00 ll_unsigned__Unsigned [backendopt:inlining] 0.00 isconstant__v110___simple_call__function_i [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 _PyPy_dg_freedtoa__arrayPtr_star_1 [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 isconstant__v104___simple_call__function_i [backendopt:inlining] 0.00 conditional_call__v109___simple_call__function_c_star_3 [backendopt:inlining] 0.00 fmod__Float_Float_star_2 [backendopt:inlining] 0.00 memo_conststr_0 [backendopt:inlining] 0.00 isconstant__v93___simple_call__function_is [backendopt:inlining] 0.00 ll_getlength__stringbuilderPtr [backendopt:inlining] 0.00 isvirtual__v71___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v86___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v77___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v70___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v114___simple_call__function_i [backendopt:inlining] 0.00 ll_append_char__stringbuilderPtr_Char [backendopt:inlining] 0.00 isconstant__v76___simple_call__function_is [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 _PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6 [backendopt:inlining] 0.00 fabs__Float_star_1 [backendopt:inlining] 0.00 isconstant__v107___simple_call__function_i [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 isconstant__v92___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v121___simple_call__function_i [backendopt:inlining] 0.00 conditional_call__v118___simple_call__function_c_star_2 [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5 [backendopt:inlining] 0.00 isconstant__v81___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v82___simple_call__function_is [backendopt:inlining] 0.00 ll_append_multiple_char__stringbuilderPtr_Char_Signed [backendopt:inlining] 0.00 isconstant__v112___simple_call__function_i [backendopt:inlining] 0.00 isconstant__v116___simple_call__function_i [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_Signed [backendopt:inlining] 0.00 copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 isconstant__v88___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 conditional_call__v87___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v98___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v99___simple_call__function_is [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 gc_thread_die [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 0.00 RPyThreadStart__bootstrapConst_star_1 [backendopt:inlining] 0.00 isvirtual__v105___simple_call__function_i [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 isconstant__v75___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 ll_strlen__rpy_stringPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_length__rpy_stringPtr [backendopt:inlining] 2.00 ll_math_isnan__Float [backendopt:inlining] 2.00 ll_uint_py_mod__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_uint_py_div__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_unsigned__Signed [backendopt:inlining] 2.00 ll_fixed_newlist__GcArray_SignedLlT_Signed [backendopt:inlining] 2.00 get_or_make_raw [backendopt:inlining] 2.00 ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__enter__ [backendopt:inlining] 2.00 getraw [backendopt:inlining] 4.00 ll_fixed_setitem_fast__arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ll_math_isfinite__Float [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ll_min__Unsigned_Unsigned [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 setintfield__timevalPtr_c_tv_sec_Signed [backendopt:inlining] 4.00 setintfield__timevalPtr_c_tv_usec_Signed [backendopt:inlining] 5.00 release [backendopt:inlining] 5.00 allocate [backendopt:inlining] 2.00 get_ident [backendopt:inlining] 2.00 get_or_make_ident [backendopt:inlining] 5.50 ll_math_isinf__Float [backendopt:inlining] 6.00 _str_ofs__rpy_string [backendopt:inlining] 6.00 ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__init__ [backendopt:inlining] 6.75 loop_unrolling_heuristic__v69___simple_call__function_lo [backendopt:inlining] 7.00 mallocstr__Signed [backendopt:inlining] 4.00 get_saved_errno [backendopt:inlining] 7.00 acquire [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 7.00 ll_str__IntegerR_SignedConst_Signed [backendopt:inlining] 7.00 ll_build_look_inside_iff__stringbuilderPtr [backendopt:inlining] 7.00 ll_shrink_array__rpy_stringPtr_Signed [backendopt:inlining] 7.00 rpython_print_newline [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_Signed [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 start_new_thread__bootstrap [backendopt:inlining] 7.00 llrepr_out__int [backendopt:inlining] 7.50 ll_char_isdigit__Char [backendopt:inlining] 7.50 mallocstr__Signed [backendopt:inlining] 8.00 ll_newrange__Ptr_GcStruct_rangeLlT_Signed_Signed [backendopt:inlining] 8.00 ll_newemptylist__GcStruct_listLlT [backendopt:inlining] 8.00 ll_listiter__Ptr_GcStruct_listiterLlT_listPtr [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 9.00 ll_join_strs_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 9.00 ll_join_chars_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.00 ll_str__FloatR_FloatConst_Float [backendopt:inlining] 9.00 formatd__Float_Char_Signed_Signed [backendopt:inlining] 9.00 formatd__Float_Char_Signed_Signed [backendopt:inlining] 4.00 ll_str__StringR_Ptr_GcStruct_rpy_strin_rpy_stringPtr [backendopt:inlining] 9.50 ll_chr2str__Char [backendopt:inlining] 10.75 GILThreadLocals.setup_threads [backendopt:inlining] 10.75 ll_lower_char__Char [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_GCREFPtr [backendopt:inlining] 11.00 ll_stringslice_startonly__rpy_stringPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_Char [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 12.00 ll_rangeiter__Ptr_GcStruct_rangeLlT_rangePtr [backendopt:inlining] 12.00 ll_striter__rpy_stringPtr [backendopt:inlining] 12.00 bootstrap [backendopt:inlining] 12.50 ll_rangenext_up__rangePtr_Signed [backendopt:inlining] 12.00 scoped_alloc__timeval_False [backendopt:inlining] 13.00 free_nonmovingbuffer_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v111___simple_call__function_l [backendopt:inlining] 9.00 ll_listdelslice_startonly__v102___simple_call__function_l [backendopt:inlining] 9.00 acquire_maybe_in_new_thread [backendopt:inlining] 15.50 ll_strnext__stringiterPtr [backendopt:inlining] 17.00 ll_contains__rpy_stringPtr_Char [backendopt:inlining] 18.12 ll_stringslice_startstop__rpy_stringPtr_Signed_Signed [backendopt:inlining] 19.00 ll_shrink_final__stringbuilderPtr [backendopt:inlining] 21.00 ccall_fmod [backendopt:inlining] 22.00 ll_shrink_array__rpy_stringPtr_Signed [backendopt:inlining] 19.00 ll_listnext__listiterPtr [backendopt:inlining] 17.00 ll_append__listPtr_Char [backendopt:inlining] 17.00 ll_append__listPtr_GCREFPtr [backendopt:inlining] 19.25 _errno_after__v125___simple_call__function__ [backendopt:inlining] 19.25 _errno_after__v66___simple_call__function__e [backendopt:inlining] 19.25 _errno_after__v64___simple_call__function__e [backendopt:inlining] 26.16 ll_join_chars__v96___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v101___simple_call__function_l [backendopt:inlining] 27.50 ll_new__Signed [backendopt:inlining] 27.50 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 31.75 handle_posix_error__write [backendopt:inlining] 31.87 _errno_before__v124___simple_call__function__ [backendopt:inlining] 31.87 _errno_before__v65___simple_call__function__e [backendopt:inlining] 31.87 _errno_before__v63___simple_call__function__e [backendopt:inlining] inlined 347 callsites. [backendopt:malloc] starting malloc removal [backendopt:malloc] 2 simple mallocs removed in 'f' [backendopt:malloc] 2 simple mallocs removed in 'll_start_new_thread__bootstrap' [backendopt:malloc] 2 simple mallocs removed in 'RPyThreadStart__bootstrapConst_star_1' [backendopt:malloc] 1 simple mallocs removed in 'wrapper' [backendopt:malloc] 2 simple mallocs removed in 'runme' [backendopt:malloc] 3 simple mallocs removed in 'write' [backendopt:malloc] 2 simple mallocs removed in 'scoped_nonmovingbuffer.__init__' [backendopt:malloc] 7 simple mallocs removed in 'write__Signed_arrayPtr_Signed_star_3' [backendopt:malloc] 1 simple mallocs removed in 'sleep' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_item' [backendopt:malloc] 8 simple mallocs removed in 'select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_end' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v77___simple_call__function_co_star_3' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v87___simple_call__function_co_star_3' [backendopt:malloc] 13 simple mallocs removed in '_PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6' [backendopt:malloc] 3 simple mallocs removed in '_PyPy_dg_freedtoa__arrayPtr_star_1' [backendopt:malloc] 7 simple mallocs removed in 'format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool' [backendopt:malloc] 5 simple mallocs removed in 'll_math_fmod__Float_Float' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v109___simple_call__function_c_star_3' [backendopt:malloc] 4 simple mallocs removed in '_ll_append_multiple_char__stringbuilderPtr_Char_Signed' [backendopt:malloc] 1 simple mallocs removed in 'll_append_char__stringbuilderPtr_Char' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v118___simple_call__function_c_star_2' [backendopt:malloc] 5 simple mallocs removed in 'fmod__Float_Float_star_2' [backendopt:malloc] 3 simple mallocs removed in '_likely_raise' [backendopt:malloc] 3 simple mallocs removed in 'fabs__Float_star_1' [backendopt:malloc] removed 83 simple mallocs in total [backendopt:mergeifblocks] starting to merge if blocks [backendopt] merging blocks in dtoa_formatd__Float_Char_Signed_Signed [backendopt] merging blocks in format_number__arrayPtr_Signed_Signed_Signed_Char_Signed_Signed_Bool [translation:info] usession directory: /tmp/pytest/usession-win-rpython-200 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] already done: lltype back-end optimisations [translation:info] inserting stack checks... [flowgraph] (rpython.rlib.rstack:42)stack_check [flowgraph] (rpython.rlib.rstack:67)stack_check_slowpath [rtyper] specializing: 1100 / 1101 blocks (99%) [rtyper] -=- specialized 8 more blocks -=- [translation:info] inserted 0 stack checks. [translation:info] Creating database for generating c source... [flowgraph] (rpython.translator.exceptiontransform:100)rpyexc_occurred [flowgraph] (rpython.translator.exceptiontransform:104)rpyexc_fetch_type [flowgraph] (rpython.translator.exceptiontransform:107)rpyexc_fetch_value [flowgraph] (rpython.translator.exceptiontransform:110)rpyexc_clear [flowgraph] (rpython.translator.exceptiontransform:114)rpyexc_raise [flowgraph] (rpython.translator.exceptiontransform:128)rpyexc_reraise [flowgraph] (rpython.translator.exceptiontransform:133)rpyexc_fetch_exception [flowgraph] (rpython.translator.exceptiontransform:138)rpyexc_restore_exception [flowgraph] (rpython.translator.exceptiontransform:539)rpyexc_get_exception_addr [flowgraph] (rpython.translator.exceptiontransform:543)rpyexc_get_exc_value_addr [flowgraph] (rpython.rtyper.rclass:1173)ll_inst_type [rtyper] -=- specialized 25 more blocks -=- [flowgraph] (rpython.memory.gctransform.transform:447)_ll_malloc_fixedsize [flowgraph] (rpython.memory.gctransform.transform:454)_ll_malloc_fixedsize_zero [flowgraph] (rpython.memory.gctransform.transform:470)_ll_malloc_varsize_no_length [flowgraph] (rpython.memory.gctransform.transform:487)ll_malloc_varsize [flowgraph] (rpython.memory.gctransform.transform:493)_ll_malloc_varsize_no_length_zero __________________________ AppTestLocal.test_local_1 ___________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffe8c1cdbd0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_1'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe92e2cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe9166e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_1'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe9166e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_1'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe7fdb3690> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe7fdb3aa0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe7fdb3aa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe7fdb3c30> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe7f8e79b0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe7f8e79b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...st_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_1'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_local_1'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_local_1'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_local_1'>, space = StdObjSpace target = <function test_local_1 at 0xfffe7fcf88d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) w_func = <Function test_local_1> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_local_1> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_local_1> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_local_1, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] return new_frame.run() elif nargs >= 1 and fast_natural_arity == Code.PASSTHROUGHARGS1: assert isinstance(code, gateway.BuiltinCodePassThroughArguments1) return code.funcrun_obj(self, args_w[0], Arguments(self.space, list(args_w[1:]))) > return self.call_args(Arguments(self.space, list(args_w))) interpreter/function.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_local_1> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>]) def call_args(self, args): # delegate activation to code > w_res = self.getcode().funcrun(self, args) interpreter/function.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <code object test_local_1, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> func = <Function test_local_1> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>]) def funcrun(self, func, args): frame = self.space.createframe(self, func.w_func_globals, func) sig = self._signature # speed hack fresh_frame = jit.hint(frame, access_directly=True, fresh_virtualizable=True) args.parse_into_scope(None, fresh_frame.locals_cells_stack_w, func.name, sig, func.defs_w) fresh_frame.init_cells() > return frame.run() interpreter/pycode.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 pycode = <code object test_local_1, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> next_instr = 144 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x02\x00l\x00\x00m\x02\x00}\x03\x00...x00s:\x01t\x08\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x03\x00d\x05\x00k\x02\x00sR\x01t\x08\x00\x82\x01\x00d\x00\x00S' next_instr = 144 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x02\x00l\x00\x00m\x02\x00}\x03\x00...x00s:\x01t\x08\x00\x82\x01\x00\xcc\x15\x00\x88\x00\x00j\x03\x00d\x05\x00k\x02\x00sR\x01t\x08\x00\x82\x01\x00d\x00\x00S' next_instr = 235L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_1,...nux-aarch64/build/pypy/module/thread/test/test_local.py:6]', line 1> at line 33 nameindex = 9, ignored = (235L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________ AppTestLocal.test_local_is_not_immortal ____________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffe7f8111d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_is_not_immortal'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe92e2cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe9166e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_is_not_immortal'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe9166e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_local_is_not_immortal'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe8c72caa0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe8c72cbe0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe8c72cbe0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffe8c72c7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe8c72c870> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffe8c72c870> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...t_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_local_is_not_immortal'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_local_is_not_immortal'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_local_is_not_immortal'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_local_is_not_immortal'>, space = StdObjSpace target = <function test_local_is_not_immortal at 0xfffe8c54f450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) w_func = <Function test_local_is_not_immortal> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_local_is_not_immortal> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_local_is_not_immortal> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_local_is_not_immortal, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] return new_frame.run() elif nargs >= 1 and fast_natural_arity == Code.PASSTHROUGHARGS1: assert isinstance(code, gateway.BuiltinCodePassThroughArguments1) return code.funcrun_obj(self, args_w[0], Arguments(self.space, list(args_w[1:]))) > return self.call_args(Arguments(self.space, list(args_w))) interpreter/function.py:124: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_local_is_not_immortal> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>]) def call_args(self, args): # delegate activation to code > w_res = self.getcode().funcrun(self, args) interpreter/function.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <code object test_local_is_not_immortal, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> func = <Function test_local_is_not_immortal> args = Arguments([<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe7fdac210>]) def funcrun(self, func, args): frame = self.space.createframe(self, func.w_func_globals, func) sig = self._signature # speed hack fresh_frame = jit.hint(frame, access_directly=True, fresh_virtualizable=True) args.parse_into_scope(None, fresh_frame.locals_cells_stack_w, func.name, sig, func.defs_w) fresh_frame.init_cells() > return frame.run() interpreter/pycode.py:223: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 pycode = <code object test_local_is_not_immortal, file '[/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00d\x02\x00...\x00d\x0b\x00g\x02\x00k\x02\x00s\xc7\x00t\x08\x00\x82\x01\x00\x88\x00\x00\xc9\t\x00d\x0c\x00\xca\x01\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x01\x00d\x00\x00l\x02\x00}\x03\x00d\x02\x00...\x00d\x0b\x00g\x02\x00k\x02\x00s\xc7\x00t\x08\x00\x82\x01\x00\x88\x00\x00\xc9\t\x00d\x0c\x00\xca\x01\x00\x01d\x00\x00S' next_instr = 168L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffe8e894410> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_local_is...x-aarch64/build/pypy/module/thread/test/test_local.py:111]', line 1> at line 17 nameindex = 7, ignored = (168L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffe8eda8ed0> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError _______________________ AppTestThread.test_thread_count ________________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffe8c1ffc50> def test_thread_count(self): import thread, time feedback = [] please_start = [] def f(): feedback.append(42) self.waitfor(lambda: please_start) > assert thread._count() == 0 E (application-level) AssertionError: assert 1 == 0 E + where 1 = <built-in function _count>() E + where <built-in function _count> = <built-in function _count> E + where <built-in function _count> = <module 'thread' (built-in)>._count [/build_dir/own-linux-aarch64/build/pypy/module/thread/test/test_thread.py:21]:8: AssertionError =========================== short test summary info ============================ FAIL module/thread/test/test_gil.py::TestUsingFramework::()::test_one_thread FAIL module/thread/test/test_gil.py::TestUsingFramework::()::test_one_thread_rev FAIL module/thread/test/test_local.py::AppTestLocal::()::test_local_1 FAIL module/thread/test/test_local.py::AppTestLocal::()::test_local_is_not_immortal FAIL module/thread/test/test_thread.py::AppTestThread::()::test_thread_count =============== 5 failed, 42 passed, 1 skipped in 110.18 seconds =============== ++ 08:07:50 starting module/zipimport/test [123 started in total] __ module/micronumpy/test [120 done in total, somefailed=True] ________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 705 items / 1 skipped module/micronumpy/test/test_appbridge.py .. module/micronumpy/test/test_arrayops.py .................... module/micronumpy/test/test_broadcast.py ....... module/micronumpy/test/test_casting.py ........ module/micronumpy/test/test_compile.py .............................s........ module/micronumpy/test/test_complex.py ......................... module/micronumpy/test/test_deprecations.py . module/micronumpy/test/test_dtypes.py .............................................................................s...... module/micronumpy/test/test_flagsobj.py ....... module/micronumpy/test/test_iterators.py ... module/micronumpy/test/test_ndarray.py ...................................................................................................................................................................................................................................................................................................... module/micronumpy/test/test_nditer.py .......s......ss..s module/micronumpy/test/test_object_arrays.py ......sF.s..s module/micronumpy/test/test_outarg.py ..... module/micronumpy/test/test_scalar.py ................................... module/micronumpy/test/test_selection.py ........s.sss..... module/micronumpy/test/test_subtype.py ......................... module/micronumpy/test/test_support.py . module/micronumpy/test/test_support_app.py .... module/micronumpy/test/test_ufuncs.py ................................................................................................ =================================== FAILURES =================================== __________________ AppTestObjectDtypes.test_keep_object_alive __________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffdf6b50a50>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keep_object_alive'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffe0601cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe0485cb90>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keep_object_alive'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffe0485cb90>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_keep_object_alive'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf6b488c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ject_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf6b48d20> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf6b48d20> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ject_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffdf6b48b90> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ject_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf6b48910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffdf6b48910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...ject_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_keep_object_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_keep_object_alive'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_keep_object_alive'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_keep_object_alive'>, space = StdObjSpace target = <function test_keep_object_alive at 0xfffdf6adcad0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf6b17a90>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf6b17a90>,) w_func = <Function test_keep_object_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf6b17a90> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_keep_object_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf6b17a90>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_keep_object_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffdf6b17a90>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_keep_object_alive, file '[/build_dir/own-linux-aarch64/build/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 pycode = <code object test_keep_object_alive, file '[/build_dir/own-linux-aarch64/build/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf8eb5190> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...01\xcc\x1c\x00|\x05\x00d\x06\x00\x19\xc9\x05\x00\xca\x00\x00d\x07\x00k\x02\x00s\x7f\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf8eb5190> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x01\x00d\x01\x00d\x00\x00l\x01\x00}\x02\x00d\x02\x00t\x02\x00f\x01\x00d\x03\x00\x84\x00\...01\xcc\x1c\x00|\x05\x00d\x06\x00\x19\xc9\x05\x00\xca\x00\x00d\x07\x00k\x02\x00s\x7f\x00t\x06\x00\x82\x01\x00d\x00\x00S' next_instr = 92L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffdf8eb5190> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keep_obj...ild/pypy/module/micronumpy/test/test_object_arrays.py:102]', line 1> at line 11 nameindex = 4, ignored = (92L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffdf8e69690> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf8e69690> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffdf8e69690> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL module/micronumpy/test/test_object_arrays.py::AppTestObjectDtypes::()::test_keep_object_alive ============== 1 failed, 691 passed, 14 skipped in 309.38 seconds ============== ++ 08:08:00 starting module/zlib/test [124 started in total] __ module/zlib/test [121 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 31 items module/zlib/test/test_zlib.py ............................s.. ==================== 30 passed, 1 skipped in 30.36 seconds ===================== ++ 08:08:33 starting objspace/fake/test [125 started in total] __ objspace/fake/test [122 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 21 items objspace/fake/test/test_checkmodule.py ........ objspace/fake/test/test_objspace.py ............. ========================== 21 passed in 12.11 seconds ========================== ++ 08:08:48 starting objspace/std/test [126 started in total] __ module/cpyext/test/test_typeobject.py [123 done in total, somefailed=False] ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 68 items module/cpyext/test/test_typeobject.py ...............s................................................s... ==================== 66 passed, 2 skipped in 559.62 seconds ==================== ++ 08:09:18 starting objspace/test [127 started in total] __ objspace/test [124 done in total, somefailed=False] ________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 59 items objspace/test/apptest_binop_overriding.py . objspace/test/apptest_descriptor.py ........ objspace/test/apptest_descroperation.py ............s.......................... objspace/test/test_descroperation.py ........... ==================== 58 passed, 1 skipped in 10.40 seconds ===================== ++ 08:09:30 starting sandbox/test [128 started in total] __ sandbox/test [125 done in total, somefailed=True] __________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 1 items sandbox/test/test_pypy_interact.py E ==================================== ERRORS ==================================== __________________________ ERROR at setup of test_run __________________________ mod = <module 'test_pypy_interact' from '/build_dir/own-linux-aarch64/build/pypy/sandbox/test/test_pypy_interact.py'> def setup_module(mod): t = Translation(mini_pypy_like_entry_point, backend='c', sandbox=True, lldebug=True) > mod.executable = str(t.compile()) sandbox/test/test_pypy_interact.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../rpython/translator/interactive.py:117: in compile getattr(self.driver, 'compile_' + backend)() ../rpython/translator/driver.py:108: in proc return self.proceed(backend_goal) ../rpython/translator/driver.py:568: in proceed result = self._execute(goals, task_skip = self._maybe_skip()) ../rpython/translator/tool/taskengine.py:114: in _execute res = self._do(goal, taskcallable, *args, **kwds) ../rpython/translator/driver.py:278: in _do res = func() ../rpython/translator/driver.py:435: in task_database_c database = cbuilder.build_database() ../rpython/translator/c/genc.py:102: in build_database self.config.translation.reverse_debugger) ../rpython/translator/c/database.py:64: in __init__ self.gctransformer = self.gcpolicy.gettransformer(translator, gchooks) ../rpython/translator/c/gc.py:452: in gettransformer return shadowstack.ShadowStackFrameworkGCTransformer(translator, gchooks) ../rpython/memory/gctransform/framework.py:132: in __init__ GCClass, GC_PARAMS = choose_gc_from_config(translator.config) ../rpython/memory/gc/base.py:593: in choose_gc_from_config globals(), locals(), [classname]) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ import sys from rpython.memory.gc.semispace import SemiSpaceGC from rpython.memory.gc.semispace import GCFLAG_EXTERNAL, GCFLAG_FORWARDED from rpython.memory.gc.semispace import GC_HASH_TAKEN_ADDR > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/generation.py:5: SyntaxError ---------------------------- Captured stderr setup ----------------------------- [flowgraph] (test_pypy_interact:20)mini_pypy_like_entry_point [translation:info] Annotating&simplifying... [translation:info] with policy: rpython.annotator.policy.AnnotatorPolicy [flowgraph] (test_pypy_interact:15)assert_ [flowgraph] (rpython.flowspace.specialcase:76)rpython_print_item [flowgraph] (rpython.flowspace.specialcase:95)rpython_print_newline [flowgraph] (rpython.rtyper.controllerentry:80)getattr [flowgraph] (rpython.rlib.rposix_environ:61)get_items [flowgraph] (rpython.flowspace.specialcase:85)rpython_print_end [flowgraph] (rpython.rlib.rposix:500)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1427)scoped_nonmovingbuffer.__init__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1431)scoped_nonmovingbuffer.__enter__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:873)get_nonmovingbuffer_ll [flowgraph] (rpython.rlib.objectmodel:315)we_are_translated_to_c [flowgraph] (rpython.rtyper.lltypesystem.rstr:116)copy_string_to_raw [flowgraph] (rpython.rtyper.lltypesystem.rstr:63)_get_raw_buf [flowgraph] (rpython.rtyper.lltypesystem.rstr:57)_str_ofs [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)write [flowgraph] (rpython.rtyper.lltypesystem.rffi:1433)scoped_nonmovingbuffer.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:937)free_nonmovingbuffer_ll [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_write [flowgraph] (rpython.rlib.rgil:160)release [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix_stat:637)lstat [flowgraph] (rpython.rtyper.lltypesystem.lltype:2296)scoped_alloc [flowgraph] (rpython.rtyper.lltypesystem.lltype:2280)ScopedAlloc_Struct stat { c_st_dev, c_st_ino, c_st_mode, c_st_nlink, c_st_uid, c_st_gid, c_st_rdev, c__pad0, c__pad1, c__pad2, c__pad3, c__pad4, c__pad5, c__pad6, c__pad7, c_st_size, c_st_blksize, c__pad8, c__pad9, c__pad10, c__pad11, c_st_blocks, c_st_atim, c_st_mtim, c_st_ctim, c__pad12, c__pad13, c__pad14, c__pad15, c__pad16, c__pad17, c__pad18, c__pad19 }.__init__ [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rtyper.lltypesystem.lltype:2286)ScopedAlloc_Struct stat { c_st_dev, c_st_ino, c_st_mode, c_st_nlink, c_st_uid, c_st_gid, c_st_rdev, c__pad0, c__pad1, c__pad2, c__pad3, c__pad4, c__pad5, c__pad6, c__pad7, c_st_size, c_st_blksize, c__pad8, c__pad9, c__pad10, c__pad11, c_st_blocks, c_st_atim, c_st_mtim, c_st_ctim, c__pad12, c__pad13, c__pad14, c__pad15, c__pad16, c__pad17, c__pad18, c__pad19 }.__enter__ [flowgraph] (rpython.rlib.rposix:385)_as_bytes0 [flowgraph] (rpython.rlib.rposix:371)_as_bytes [flowgraph] (rpython.rtyper.lltypesystem.lltype:2289)ScopedAlloc_Struct stat { c_st_dev, c_st_ino, c_st_mode, c_st_nlink, c_st_uid, c_st_gid, c_st_rdev, c__pad0, c__pad1, c__pad2, c__pad3, c__pad4, c__pad5, c__pad6, c__pad7, c_st_size, c_st_blksize, c__pad8, c__pad9, c__pad10, c__pad11, c_st_blocks, c_st_atim, c_st_mtim, c_st_ctim, c__pad12, c__pad13, c__pad14, c__pad15, c__pad16, c__pad17, c__pad18, c__pad19 }.__exit__ [flowgraph] (rpython.rlib.rgil:171)acquire [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)lstat [flowgraph] (rpython.rlib.rthread:282)gc_thread_run [flowgraph] (rpython.rtyper.lltypesystem.rffi:926)get_nonmovingbuffer_ll_final_null [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_lstat [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rlib.rarithmetic:139)widen [flowgraph] (rpython.rlib.rposix:113)get_saved_errno [flowgraph] (rpython.rlib.rposix_stat:501)build_stat_result [flowgraph] (stat:49)S_ISREG [flowgraph] (stat:24)S_IFMT [flowgraph] (rpython.rtyper.controllerentry:80)getattr [flowgraph] (rpython.rlib.rposix_stat:624)stat [flowgraph] (rpython.rlib.rposix_environ:66)get_get [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)stat [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_stat [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:461)open [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)open [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_open [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (stat:40)S_ISDIR [flowgraph] (rpython.rlib.rposix:490)read [flowgraph] (rpython.rtyper.lltypesystem.rffi:1469)scoped_alloc_buffer.__init__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1471)scoped_alloc_buffer.__enter__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:953)alloc_buffer [flowgraph] (?:2)mallocstr [flowgraph] (rpython.rtyper.lltypesystem.rstr:36)mallocstr [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)read [flowgraph] (rpython.rtyper.lltypesystem.rffi:1474)scoped_alloc_buffer.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1008)keep_buffer_alive_until_here [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_read [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rtyper.lltypesystem.rffi:1476)scoped_alloc_buffer.str [flowgraph] (?:2)str_from_buffer [flowgraph] (rpython.rtyper.lltypesystem.rffi:988)str_from_buffer [flowgraph] (rpython.rtyper.lltypesystem.rstr:145)copy_raw_to_string [flowgraph] (rpython.rlib.rposix:508)close [flowgraph] (rpython.rlib.rposix:268)SuppressIPH.__init__ [flowgraph] (rpython.rlib.rposix:271)SuppressIPH.__enter__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)close [flowgraph] (rpython.rlib.rposix:274)SuppressIPH.__exit__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:2)ccall_close [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rlib.rposix:730)getcwd [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)getcwd [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_getcwd [flowgraph] (rpython.rlib.rposix:151)_errno_before [flowgraph] (rpython.rlib.rposix:170)_errno_after [flowgraph] (rpython.rtyper.lltypesystem.rffi:854)charp2str [flowgraph] (rpython.rtyper.lltypesystem.rffi:1030)charpsize2str [flowgraph] (rpython.rlib.rposix:1182)strerror [flowgraph] (rpython.rlib.rposix:430)handle_posix_error [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)strerror [flowgraph] (rpython.rlib.rposix:1162)isatty [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)isatty [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_isatty [flowgraph] (?:1)memo_offsetof_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__make_scoped_allocator_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__should_widen_type_0 [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_envitems [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_getenv [flowgraph] (rpython.rlib.rmarshal:223)dump_string_or_none [flowgraph] (rpython.rlib.rmarshal:129)dump_none [flowgraph] (rpython.rlib.rmarshal:119)w_long [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.translator.sandbox.rsandbox:72)sandboxed_io [flowgraph] (rpython.rtyper.lltypesystem.lltype:2296)scoped_alloc [flowgraph] (rpython.rtyper.lltypesystem.lltype:2280)ScopedAlloc_Array of Char {'nolength': True} .__init__ [flowgraph] (rpython.rtyper.lltypesystem.lltype:2286)ScopedAlloc_Array of Char {'nolength': True} .__enter__ [flowgraph] (rpython.translator.sandbox.rsandbox:40)writeall_not_sandboxed [flowgraph] (rpython.rtyper.lltypesystem.lltype:2289)ScopedAlloc_Array of Char {'nolength': True} .__exit__ [flowgraph] (rpython.translator.sandbox.rsandbox:55)FdLoader.__init__ [flowgraph] (rpython.rlib.rmarshal:173)load_int [flowgraph] (rpython.rlib.rmarshal:312)readchr [flowgraph] (rpython.rlib.rmarshal:284)Loader.__init__ [flowgraph] (rpython.translator.sandbox.rsandbox:60)FdLoader.need_more_data [flowgraph] (rpython.rlib.rmarshal:325)readlong [flowgraph] (rpython.translator.sandbox.rsandbox:90)reraise_error [flowgraph] (rpython.rlib.rmarshal:266)load_string_or_none [flowgraph] (rpython.rlib.rmarshal:408)load_list_or_none [flowgraph] (rpython.rlib.rmarshal:298)readstr [flowgraph] (rpython.rlib.rmarshal:487)load_tuple [flowgraph] (rpython.rlib.rmarshal:246)load_string [flowgraph] (rpython.rlib.rmarshal:288)Loader.check_finished [flowgraph] (?:1)memo__make_scoped_allocator_0 [translation:info] RTyping... [flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info [flowgraph] (rpython.rtyper.lltypesystem.rstr:425)ll_strconcat [flowgraph] (rpython.rtyper.lltypesystem.rstr:416)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rstr:78)copy_string_contents [flowgraph] (rpython.rtyper.rstr:425)ll_str [flowgraph] (?:1)memo_ll_constant_0 [flowgraph] (?:11)ll_join_strs_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.lltypesystem.rstr:785)<lambda> [flowgraph] (rpython.rlib.jit:294)loop_unrolling_heuristic [flowgraph] (rpython.rtyper.lltypesystem.llmemory:1037)cast_any_ptr [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_strs_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (rpython.rtyper.lltypesystem.rstr:860)ll_stringslice_startstop [flowgraph] (rpython.rtyper.lltypesystem.rstr:840)_ll_stringslice [flowgraph] (?:1)memo_emptystrfun_0 [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.lltypesystem.rstr:350)ll_strlen [rtyper] specializing: 100 / 835 blocks (11%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:354)ll_stritem_nonneg [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_open [flowgraph] (rpython.rtyper.rlist:588)ll_append [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rlist:280)_ll_list_resize_ge [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:11)_ll_list_resize_hint_really_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:2)ll_arraycopy [flowgraph] (rpython.rlib.rgc:362)ll_arraycopy [flowgraph] (rpython.rlib.rgc:342)copy_item [flowgraph] (rpython.rtyper.lltypesystem.llmemory:411)sizeof [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)_ll_list_resize_hint_really_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (?:11)ll_join_chars_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rstr:821)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_chars_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:820)ll_join_chars [flowgraph] (?:11)ll_listdelslice_startonly_look_inside_iff [flowgraph] (rpython.rtyper.rlist:912)<lambda> [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rtyper.lltypesystem.rlist:295)_ll_list_resize_le [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (?:2)ll_listdelslice_startonly_trampoline [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_write [rtyper] specializing: 200 / 989 blocks (20%) [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rrange:70)ll_newrange [flowgraph] (rpython.rtyper.lltypesystem.rrange:91)ll_rangeiter [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:717)ll_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [rtyper] specializing: 300 / 1010 blocks (29%) [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [flowgraph] (rpython.rtyper.lltypesystem.rstr:601)ll_streq [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.rlist:688)ll_getitem_nonneg [flowgraph] (rpython.rtyper.rlist:717)ll_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_lstat [flowgraph] (rpython.rtyper.lltypesystem.rlist:384)ll_fixed_newlist [flowgraph] (rpython.rtyper.rlist:726)ll_setitem_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:407)ll_fixed_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:470)ll_listiter [flowgraph] (rpython.rtyper.rlist:792)ll_extend_with_str [flowgraph] (rpython.rtyper.rlist:795)ll_extend_with_str_slice_startonly [flowgraph] (rpython.rtyper.rlist:547)listItemType [rtyper] specializing: 400 / 1052 blocks (38%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1293)ll_striter [flowgraph] (rpython.rtyper.lltypesystem.rlist:484)ll_listnext_foldable [flowgraph] (rpython.rtyper.lltypesystem.rlist:395)ll_fixed_length [flowgraph] (rpython.rtyper.rlist:721)ll_getitem_foldable_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rlist:402)ll_fixed_getitem_fast [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_read [flowgraph] (rpython.rtyper.rstr:944)ll_str_is_true [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [rtyper] specializing: 500 / 1069 blocks (46%) [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_close [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_getcwd [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_strerror [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_isatty [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_open [rtyper] specializing: 600 / 1069 blocks (56%) [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [rtyper] specializing: 700 / 1071 blocks (65%) [rtyper] specializing: 800 / 1071 blocks (74%) [rtyper] specializing: 900 / 1071 blocks (84%) [rtyper] specializing: 1000 / 1071 blocks (93%) [rtyper] -=- specialized 1071 blocks -=- [flowgraph] (rpython.rlib.rmarshal:379)load_with_custom_recreate [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:157)dump_int [flowgraph] (rpython.rlib.rmarshal:487)load_tuple [flowgraph] (rpython.rlib.rmarshal:184)dump_longlong [flowgraph] (rpython.rlib.rmarshal:215)load_float [flowgraph] (rpython.rlib.rfloat:87)rstring_to_float [flowgraph] (rpython.rlib.rdtoa:54)strtod [flowgraph] (rpython.rlib.objectmodel:397)revdb_flag_io_disabled [flowgraph] (rpython.rtyper.lltypesystem.rffi:278)_PyPy_dg_strtod [flowgraph] (rpython.rlib.rmarshal:133)load_none [flowgraph] (rpython.rlib.rmarshal:166)load_int_nonneg [flowgraph] (rpython.rlib.rmarshal:147)load_bool [flowgraph] (rpython.rlib.rposix_stat:187)stat_result_recreate [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_0 [rtyper] specializing: 1100 / 1194 blocks (92%) [flowgraph] (rpython.rtyper.lltypesystem.ll_str:13)ll_int2dec [flowgraph] (rpython.rtyper.lltypesystem.ll_str:7)ll_unsigned [rtyper] specializing: 1200 / 1210 blocks (99%) [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [rtyper] -=- specialized 143 more blocks -=- [flowgraph] (rpython.rtyper.rclass:1133)ll_issubclass [flowgraph] (rpython.rtyper.rclass:1130)ll_type [rtyper] -=- specialized 4 more blocks -=- [translation:info] lltype back-end optimisations... [backendopt:removecasts] removed 1 cast_pointers in assert_ [backendopt:removecasts] removed 1 cast_pointers in _get_raw_buf__rpy_string [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__lstat [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__open [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__stat [backendopt:removecasts] removed 3 cast_pointers in read [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__read [backendopt:removecasts] removed 1 cast_pointers in str_from_buffer [backendopt:removecasts] removed 1 cast_pointers in copy_raw_to_string [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__close [backendopt:removecasts] removed 6 cast_pointers in getcwd [backendopt:removecasts] removed 1 cast_pointers in charpsize2str [backendopt:removecasts] removed 1 cast_pointers in strerror [backendopt:removecasts] removed 3 cast_pointers in handle_posix_error__write [backendopt:removecasts] removed 2 cast_pointers in isatty [backendopt:removecasts] removed 2 cast_pointers in writeall_not_sandboxed [backendopt:removecasts] removed 1 cast_pointers in load_int [backendopt:removecasts] removed 4 cast_pointers in FdLoader.need_more_data [backendopt:removecasts] removed 12 cast_pointers in reraise_error [backendopt:removecasts] removed 1 cast_pointers in load_string_or_none [backendopt:removecasts] removed 1 cast_pointers in load_list_or_none [backendopt:removecasts] removed 2 cast_pointers in readstr [backendopt:removecasts] removed 2 cast_pointers in load_tuple [backendopt:removecasts] removed 1 cast_pointers in load_string [backendopt:removecasts] removed 1 cast_pointers in Loader.check_finished [backendopt:removecasts] removed 1 cast_pointers in copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v14___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in ll_join_strs__v20___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in ll_rangenext_up__rangePtr_Signed [backendopt:removecasts] removed 1 cast_pointers in _ll_stringslice__rpy_stringPtr_Signed_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_strnext__stringiterPtr [backendopt:removecasts] removed 1 cast_pointers in ll_getitem_nonneg__dum_checkidxConst_ll_getitem_fastConst_listPtr_Signed [backendopt:removecasts] removed 2 cast_pointers in ll_extend_with_str_slice_startonly__listPtr_rpy_stringPtr_ll_strlenConst_ll_stritem_nonnegConst_Signed [backendopt:removecasts] removed 1 cast_pointers in ll_listnext_foldable__listiterPtr [backendopt:removecasts] removed 2 cast_pointers in load_tuple [backendopt:removecasts] removed 1 cast_pointers in load_float [backendopt:removecasts] removed 2 cast_pointers in strtod [backendopt:removecasts] removed 1 cast_pointers in load_none [backendopt:removecasts] removed 1 cast_pointers in load_int_nonneg [backendopt:removecasts] removed 1 cast_pointers in load_bool [backendopt:inlining] phase with threshold factor: 32.4 [backendopt:inlining] heuristic: rpython.translator.backendopt.inline.inlining_heuristic [backendopt:inlining] 0.00 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_checkidxConst_ll_getitem_fastConst_listPtr_Signed [backendopt:inlining] 0.00 isconstant__v17___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v24___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v45___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v35___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v28___simple_call__function_is [backendopt:inlining] 0.00 isatty__Signed_star_1 [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_GCREFPtr [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 isvirtual__v52___simple_call__function_is [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isconstant__v34___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_fastConst_listPtr_Signed [backendopt:inlining] 0.00 isconstant__v39___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v29___simple_call__function_is [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 alloc_buffer [backendopt:inlining] 0.00 isconstant__v54___simple_call__function_is [backendopt:inlining] 0.00 strerror__Signed_star_1 [backendopt:inlining] 0.00 get_get [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 isconstant__v23___simple_call__function_is [backendopt:inlining] 0.00 copy_raw_to_string [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 0.00 isconstant__v56___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v33___simple_call__function_is [backendopt:inlining] 0.00 close__Signed_star_1 [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 open__SomeString_Signed_Signed_star_3 [backendopt:inlining] 0.00 read__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 _PyPy_dg_strtod__arrayPtr_arrayPtr_star_2 [backendopt:inlining] 0.00 isconstant__v40___simple_call__function_is [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 isconstant__v22___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 _as_bytes__str [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 isvirtual__v46___simple_call__function_is [backendopt:inlining] 0.00 conditional_call__v57___simple_call__function_co_star_3 [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 isconstant__v51___simple_call__function_is [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 getcwd__arrayPtr_Signed_star_2 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 _as_bytes0__str [backendopt:inlining] 0.00 isvirtual__v18___simple_call__function_is [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 get_items [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 2.00 ll_strlen__rpy_stringPtr [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 ScopedAlloc_Array of Char {'nolength': True} .__enter__ [backendopt:inlining] 2.00 S_IFMT [backendopt:inlining] 2.00 ScopedAlloc_Struct stat { c_st_dev, c_st_ino, c_st_mode, c_st_nlink, c_st_uid, c_st_gid, c_st_rdev, c__pad0, c__pad1, c__pad2, c__pad3, c__pad4, c__pad5, c__pad6, c__pad7, c_st_size, c_st_blksize, c__pad8, c__pad9, c__pad10, c__pad11, c_st_blocks, c_st_atim, c_st_mtim, c_st_ctim, c__pad12, c__pad13, c__pad14, c__pad15, c__pad16, c__pad17, c__pad18, c__pad19 }.__enter__ [backendopt:inlining] 2.00 ll_uint_py_mod__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_uint_py_div__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_unsigned__Signed [backendopt:inlining] 2.00 ll_fixed_length__arrayPtr [backendopt:inlining] 2.00 ll_fixed_newlist__GcArray_Ptr_GCREF__gcopaque_Ll_Signed [backendopt:inlining] 2.00 ll_length__rpy_stringPtr [backendopt:inlining] 2.00 scoped_alloc_buffer.__init__ [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_Signed [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 ll_fixed_setitem_fast__arrayPtr_Signed_GCREFPtr [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 Loader.__init__ [backendopt:inlining] 4.00 ScopedAlloc_Array of Char {'nolength': True} .__init__ [backendopt:inlining] 5.00 release [backendopt:inlining] 6.00 _str_ofs__rpy_string [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 6.00 ScopedAlloc_Struct stat { c_st_dev, c_st_ino, c_st_mode, c_st_nlink, c_st_uid, c_st_gid, c_st_rdev, c__pad0, c__pad1, c__pad2, c__pad3, c__pad4, c__pad5, c__pad6, c__pad7, c_st_size, c_st_blksize, c__pad8, c__pad9, c__pad10, c__pad11, c_st_blocks, c_st_atim, c_st_mtim, c_st_ctim, c__pad12, c__pad13, c__pad14, c__pad15, c__pad16, c__pad17, c__pad18, c__pad19 }.__init__ [backendopt:inlining] 7.00 mallocstr [backendopt:inlining] 4.00 get_saved_errno [backendopt:inlining] 7.00 dump_int [backendopt:inlining] 7.00 rstring_to_float [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_Signed [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 7.00 dump_none [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 7.00 rpython_print_newline [backendopt:inlining] 7.50 mallocstr [backendopt:inlining] 8.00 ll_newemptylist__GcStruct_listLlT [backendopt:inlining] 8.00 ll_newrange__Ptr_GcStruct_rangeLlT_Signed_Signed [backendopt:inlining] 8.00 ll_newemptylist__GcStruct_listLlT [backendopt:inlining] 8.00 ll_listiter__Ptr_GcStruct_listiterLlT_arrayPtr [backendopt:inlining] 9.00 ll_join_strs_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 9.00 ll_join_chars_look_inside_iff__Signed_arrayPtr_Ptr_GcStruct_rpy_stringLlT [backendopt:inlining] 9.00 _ll_list_resize_hint_really_look_inside_iff__listPtr_Signed_Bool [backendopt:inlining] 4.00 S_ISDIR [backendopt:inlining] 4.00 S_ISREG [backendopt:inlining] 4.00 ll_str__StringR_Ptr_GcStruct_rpy_strin_rpy_stringPtr [backendopt:inlining] 7.00 acquire [backendopt:inlining] 7.00 ll_str_is_true__LLHelpersConst_rpy_stringPtr [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_Char [backendopt:inlining] 11.00 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_GCREFPtr [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 8.00 FdLoader.__init__ [backendopt:inlining] 11.00 ll_extend_with_str__listPtr_rpy_stringPtr_ll_strlenConst_ll_stritem_nonnegConst [backendopt:inlining] 11.00 str_from_buffer [backendopt:inlining] 12.00 ll_rangeiter__Ptr_GcStruct_rangeLlT_rangePtr [backendopt:inlining] 12.00 ll_striter__rpy_stringPtr [backendopt:inlining] 12.25 loop_unrolling_heuristic__v16___simple_call__function_lo [backendopt:inlining] 12.50 ll_rangenext_up__rangePtr_Signed [backendopt:inlining] 10.00 scoped_alloc__array_False [backendopt:inlining] 12.00 scoped_alloc__stat_False [backendopt:inlining] 13.00 free_nonmovingbuffer_ll [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 13.00 keep_buffer_alive_until_here [backendopt:inlining] 14.00 load_with_custom_recreate [backendopt:inlining] 14.00 dump_tuple [backendopt:inlining] 9.00 ll_listdelslice_startonly__v50___simple_call__function_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v58___simple_call__function_ll [backendopt:inlining] 14.00 load_int_nonneg [backendopt:inlining] 14.00 load_none [backendopt:inlining] 15.50 ll_strnext__stringiterPtr [backendopt:inlining] 16.50 load_bool [backendopt:inlining] 13.00 Loader.check_finished [backendopt:inlining] 18.12 ll_stringslice_startstop__rpy_stringPtr_Signed_Signed [backendopt:inlining] 19.00 scoped_alloc_buffer.str [backendopt:inlining] 19.00 __exit____star_3 [backendopt:inlining] 21.00 ccall_close [backendopt:inlining] 0.00 close__Signed_star_1 [backendopt:inlining] 21.65 ll_streq__rpy_stringPtr_rpy_stringPtr [backendopt:inlining] 23.00 dump_tuple [backendopt:inlining] 23.00 dump_tuple [backendopt:inlining] 23.00 dump_longlong [backendopt:inlining] 22.25 assert_ [backendopt:inlining] 23.33 charp2str [backendopt:inlining] 24.50 load_string [backendopt:inlining] 17.50 ll_listnext_foldable__listiterPtr [backendopt:inlining] 17.00 ll_append__listPtr_Char [backendopt:inlining] 17.00 ll_append__listPtr_GCREFPtr [backendopt:inlining] 19.25 _errno_after__v13___simple_call__function__e [backendopt:inlining] 19.25 _errno_after__v11___simple_call__function__e [backendopt:inlining] 0.00 close__Signed_star_1 [backendopt:inlining] 19.25 _errno_after__v9___simple_call__function__er [backendopt:inlining] 19.25 _errno_after__v7___simple_call__function__er [backendopt:inlining] 19.25 _errno_after__v5___simple_call__function__er [backendopt:inlining] 19.25 _errno_after__v3___simple_call__function__er [backendopt:inlining] 19.25 _errno_after__v1___simple_call__function__er [backendopt:inlining] 26.16 ll_join_chars__v44___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v48___simple_call__function_ll [backendopt:inlining] 27.00 load_string_or_none [backendopt:inlining] 27.50 ll_arraycopy__arrayPtr_arrayPtr_Signed_Signed_Signed [backendopt:inlining] 31.25 load_float [backendopt:inlining] 31.75 handle_posix_error__close [backendopt:inlining] 31.75 handle_posix_error__write [backendopt:inlining] 31.75 handle_posix_error__read [backendopt:inlining] 31.75 handle_posix_error__open [backendopt:inlining] 31.75 handle_posix_error__stat [backendopt:inlining] 31.75 handle_posix_error__lstat [backendopt:inlining] 31.87 _errno_before__v10___simple_call__function__e [backendopt:inlining] 0.00 close__Signed_star_1 [backendopt:inlining] 31.87 _errno_before__v12___simple_call__function__e [backendopt:inlining] 31.87 _errno_before__v8___simple_call__function__er [backendopt:inlining] 31.87 _errno_before__v6___simple_call__function__er [backendopt:inlining] 31.87 _errno_before__v4___simple_call__function__er [backendopt:inlining] 31.87 _errno_before__v2___simple_call__function__er [backendopt:inlining] 31.87 _errno_before__v0___simple_call__function__er [backendopt:inlining] inlined 512 callsites. [backendopt:removecasts] removed 2 cast_pointers in strtod [backendopt:malloc] starting malloc removal [backendopt:malloc] 1 simple mallocs removed in 'mini_pypy_like_entry_point' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_item' [backendopt:malloc] 1 simple mallocs removed in 'rpython_print_end' [backendopt:malloc] 3 simple mallocs removed in 'write' [backendopt:malloc] 2 simple mallocs removed in 'scoped_nonmovingbuffer.__init__' [backendopt:malloc] 7 simple mallocs removed in 'write__Signed_arrayPtr_Signed_star_3' [backendopt:malloc] 1 simple mallocs removed in 'lstat__str' [backendopt:malloc] 8 simple mallocs removed in 'lstat__SomeString_statPtr_star_2' [backendopt:malloc] 9 simple mallocs removed in 'build_stat_result' [backendopt:malloc] 1 simple mallocs removed in 'stat__str' [backendopt:malloc] 8 simple mallocs removed in 'stat__SomeString_statPtr_star_2' [backendopt:malloc] 10 simple mallocs removed in 'open__str' [backendopt:malloc] 10 simple mallocs removed in 'open__SomeString_Signed_Signed_star_3' [backendopt:malloc] 2 simple mallocs removed in 'scoped_alloc_buffer.__enter__' [backendopt:malloc] 7 simple mallocs removed in 'read__Signed_arrayPtr_Signed_star_3' [backendopt:malloc] 1 simple mallocs removed in 'close' [backendopt:malloc] 3 simple mallocs removed in 'close__Signed_star_1' [backendopt:malloc] 5 simple mallocs removed in 'getcwd' [backendopt:malloc] 5 simple mallocs removed in 'getcwd__arrayPtr_Signed_star_2' [backendopt:malloc] 2 simple mallocs removed in 'strerror' [backendopt:malloc] 2 simple mallocs removed in 'strerror__Signed_star_1' [backendopt:malloc] 1 simple mallocs removed in 'isatty' [backendopt:malloc] 2 simple mallocs removed in 'isatty__Signed_star_1' [backendopt:malloc] 1 simple mallocs removed in 'sandboxed_ll_os.ll_os_getenv__star_1' [backendopt:malloc] 3 simple mallocs removed in 'sandboxed_io' [backendopt:malloc] 3 simple mallocs removed in 'FdLoader.need_more_data' [backendopt:malloc] 2 simple mallocs removed in 'load_list_or_none' [backendopt:malloc] 3 simple mallocs removed in 'load_tuple' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v24___simple_call__function_co_star_3' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v35___simple_call__function_co_star_3' [backendopt:malloc] 1 simple mallocs removed in '_ll_list_resize_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v57___simple_call__function_co_star_3' [backendopt:malloc] 1 simple mallocs removed in 'sandboxed_ll_os.ll_os_stat__star_1' [backendopt:malloc] 1 simple mallocs removed in 'sandboxed_ll_os.ll_os_stat__star_1' [backendopt:malloc] 1 simple mallocs removed in 'sandboxed_ll_os.ll_os_stat__star_1' [backendopt:malloc] 1 simple mallocs removed in 'sandboxed_ll_os.ll_os_close__star_1' [backendopt:malloc] 19 simple mallocs removed in 'load_tuple' [backendopt:malloc] 1 simple mallocs removed in 'strtod' [backendopt:malloc] 5 simple mallocs removed in '_PyPy_dg_strtod__arrayPtr_arrayPtr_star_2' [backendopt:malloc] 6 simple mallocs removed in 'stat_result_recreate' [backendopt:malloc] removed 145 simple mallocs in total [backendopt:mergeifblocks] starting to merge if blocks [backendopt] merging blocks in sandboxed_ll_os.ll_os_getenv__star_1 [backendopt] merging blocks in load_int [backendopt] merging blocks in reraise_error [backendopt] merging blocks in load_string_or_none [backendopt] merging blocks in load_list_or_none [backendopt] merging blocks in sandboxed_ll_os.ll_os_read__star_2 [backendopt] merging blocks in sandboxed_ll_os.ll_os_isatty__star_1 [backendopt] merging blocks in load_bool [translation:info] inserting stack checks... [flowgraph] (rpython.rlib.rstack:42)stack_check [flowgraph] (rpython.rlib.rstack:67)stack_check_slowpath [rtyper] -=- specialized 8 more blocks -=- [translation:info] inserted 0 stack checks. [translation:info] Creating database for generating c source... [flowgraph] (rpython.translator.exceptiontransform:100)rpyexc_occurred [flowgraph] (rpython.translator.exceptiontransform:104)rpyexc_fetch_type [flowgraph] (rpython.translator.exceptiontransform:107)rpyexc_fetch_value [flowgraph] (rpython.translator.exceptiontransform:110)rpyexc_clear [flowgraph] (rpython.translator.exceptiontransform:114)rpyexc_raise [flowgraph] (rpython.translator.exceptiontransform:128)rpyexc_reraise [flowgraph] (rpython.translator.exceptiontransform:133)rpyexc_fetch_exception [flowgraph] (rpython.translator.exceptiontransform:138)rpyexc_restore_exception [flowgraph] (rpython.translator.exceptiontransform:539)rpyexc_get_exception_addr [flowgraph] (rpython.translator.exceptiontransform:543)rpyexc_get_exc_value_addr [flowgraph] (rpython.rtyper.rclass:1173)ll_inst_type [rtyper] -=- specialized 25 more blocks -=- [flowgraph] (rpython.memory.gctransform.transform:447)_ll_malloc_fixedsize [flowgraph] (rpython.memory.gctransform.transform:454)_ll_malloc_fixedsize_zero [flowgraph] (rpython.memory.gctransform.transform:470)_ll_malloc_varsize_no_length [flowgraph] (rpython.memory.gctransform.transform:487)ll_malloc_varsize [flowgraph] (rpython.memory.gctransform.transform:493)_ll_malloc_varsize_no_length_zero =========================== 1 error in 6.11 seconds ============================ ++ 08:09:37 starting tool/bench/test [129 started in total] __ tool/bench/test [126 done in total, somefailed=False] ______________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 3 items / 1 skipped tool/bench/test/test_pypyresult.py ... ===================== 3 passed, 1 skipped in 1.08 seconds ====================== ++ 08:09:39 starting tool/memusage/test [130 started in total] __ tool/memusage/test [127 done in total, somefailed=False] ___________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 5 items tool/memusage/test/test_log2gnumeric.py ..... =========================== 5 passed in 1.09 seconds =========================== ++ 08:09:40 starting tool/pytest/test [131 started in total] __ module/unicodedata/test [128 done in total, somefailed=False] ______________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 26 items module/unicodedata/test/test_hyp.py ................ module/unicodedata/test/test_unicodedata.py .......... ========================= 26 passed in 130.60 seconds ========================== ++ 08:10:01 starting tool/release/test [132 started in total] __ tool/release/test [129 done in total, somefailed=False] ____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 8 items tool/release/test/test_package.py ....s tool/release/test/test_smartstrip.py ... ===================== 7 passed, 1 skipped in 19.44 seconds ===================== ++ 08:10:22 starting tool/test [133 started in total] __ tool/test [130 done in total, somefailed=False] ____________________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 29 items tool/test/test_gdb_pypy.py ........... tool/test/test_getdocstrings.py ... tool/test/test_isolate.py ....... tool/test/test_lib_pypy.py ... tool/test/test_license.py . tool/test/test_package.py . tool/test/test_tab.py .. tool/test/test_template.py . ========================== 29 passed in 6.55 seconds =========================== __ tool/pytest/test [131 done in total, somefailed=False] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 24 items tool/pytest/test/test_appsupport.py ......... tool/pytest/test/test_astrewrite.py ..... tool/pytest/test/test_conftest1.py .. tool/pytest/test/test_pytestsupport.py ........ ========================== 24 passed in 48.02 seconds ========================== __ module/zipimport/test [132 done in total, somefailed=False] ________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 47 items module/zipimport/test/test_undocumented.py ...... module/zipimport/test/test_zipimport.py .................... module/zipimport/test/test_zipimport_deflated.py ..................... ========================= 47 passed in 272.76 seconds ========================== __ objspace/std/test [133 done in total, somefailed=True] _____________________ ============================= test session starts ============================== platform linux2 -- Python 2.7.18, pytest-2.9.2, py-1.4.29, pluggy-0.3.1 hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('/build_dir/own-linux-aarch64/build/pypy/.hypothesis/examples') pytest-2.9.2 from /build_dir/own-linux-aarch64/build/pytest.pyc rootdir: /build_dir/own-linux-aarch64/build, inifile: pytest.ini plugins: hypothesis-4.39.3 collected 2130 items objspace/std/test/apptest_boolobject.py ........ objspace/std/test/apptest_bufferobject.py ............... objspace/std/test/apptest_callmethod.py ........ objspace/std/test/apptest_complexobject.py ............................... objspace/std/test/apptest_instmethobject.py ..... objspace/std/test/apptest_iterobject.py ......F....... objspace/std/test/apptest_operation.py ... objspace/std/test/apptest_stringformat.py ...............s...........................s........ objspace/std/test/apptest_userobject.py ...............FF..... objspace/std/test/test_boolobject.py ....... objspace/std/test/test_bytearrayobject.py ....................................................... objspace/std/test/test_bytesobject.py ......................................................................s....... objspace/std/test/test_callmethod.py ... objspace/std/test/test_celldict.py ....................................... objspace/std/test/test_complexobject.py .... objspace/std/test/test_dictmultiobject.py ...........s................................................................................................................................................................... objspace/std/test/test_dictproxy.py .......... objspace/std/test/test_floatobject.py ...................................... objspace/std/test/test_identitydict.py ...... objspace/std/test/test_identityset.py ....... objspace/std/test/test_index.py .............................................. objspace/std/test/test_intobject.py ............................................................s........................................s............... objspace/std/test/test_iterobject.py .... objspace/std/test/test_jsondict.py ........... objspace/std/test/test_kwargsdict.py .................................... objspace/std/test/test_lengthhint.py .................... objspace/std/test/test_listobject.py ....................................................................................................................... objspace/std/test/test_liststrategies.py ...................................................................s.................................................................. objspace/std/test/test_longobject.py ......................................... objspace/std/test/test_mapdict.py .............................................................................................FF................................................ objspace/std/test/test_memoryobject.py ....... objspace/std/test/test_methodcache.py ....................................................................... objspace/std/test/test_newformat.py ......................................................................................ss........ objspace/std/test/test_noneobject.py ... objspace/std/test/test_obj.py ....................... objspace/std/test/test_prebuiltint.py ...........................s............... objspace/std/test/test_proxy.py ssssssssssss objspace/std/test/test_proxy_function.py ........ objspace/std/test/test_proxy_internals.py ........ objspace/std/test/test_proxy_iter.py . objspace/std/test/test_proxy_object.py .......... objspace/std/test/test_proxy_usercreated.py . objspace/std/test/test_random_attr.py ..... objspace/std/test/test_setobject.py .................................................................................... objspace/std/test/test_setstrategies.py ....s...ss.. objspace/std/test/test_sliceobject.py ............ objspace/std/test/test_smalllongobject.py ............................................................s........................................................................................................................s.............. objspace/std/test/test_specialisedtupleobject.py ..................ss....................... objspace/std/test/test_stdobjspace.py s...... objspace/std/test/test_tupleobject.py ................................... objspace/std/test/test_typeobject.py .............................................................................. objspace/std/test/test_unicodeobject.py .................................s........................................................s................. objspace/std/test/test_userobject.py . objspace/std/test/test_versionedtype.py ............... =================================== FAILURES =================================== __________________________ test_reversed_frees_empty ___________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffd37431ed0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_reversed_frees_empty'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffd3d8ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_reversed_frees_empty'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_reversed_frees_empty'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd3715ac80> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3715a910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3715a910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd3715abe0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3715a820> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3715a820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...rees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_reversed_frees_empty'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_reversed_frees_empty'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_reversed_frees_empty'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_reversed_frees_empty'>, space = StdObjSpace w_func = <Function test_reversed_frees_empty> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_reversed_frees_empty>, args_w = () nargs = 0, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_reversed_frees_empty>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_reversed_frees_empty, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 pycode = <code object test_reversed_frees_empty, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 co_code = 'x\xbb\x00t\x00\x00t\x01\x00f\x02\x00D]\xad\x00}\x00\x00t\x02\x00g\x01\x00\x89\x00\x00d\x01\x00|\x00\x00f\x01\x00\x87\...}\x04\x00t\x0b\x00t\t\x00\xc9\x0c\x00|\x04\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00}\x03\x00q\r\x00Wd\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 co_code = 'x\xbb\x00t\x00\x00t\x01\x00f\x02\x00D]\xad\x00}\x00\x00t\x02\x00g\x01\x00\x89\x00\x00d\x01\x00|\x00\x00f\x01\x00\x87\...}\x04\x00t\x0b\x00t\t\x00\xc9\x0c\x00|\x04\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00}\x03\x00q\r\x00Wd\x00\x00S' next_instr = 93L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_reversed...arch64/build/pypy/objspace/std/test/apptest_iterobject.py', line 34> at line 42 nameindex = 8, ignored = (93L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________________________________ test_del ___________________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffd374f5ed0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffd3d8ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd367708c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd36770820> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd36770820> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd367707d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd36770910> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd36770910> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i... 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_del'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_del'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_del'>, space = StdObjSpace w_func = <Function test_del> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_del>, args_w = (), nargs = 0 Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_del>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_del, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 pycode = <code object test_del, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00g\x00\x00\x89\x00\x00d\x02\x00t\x01\x00f\x01\x00\x87\x00\x00f\x01\x00d\x03\x00\x8...05\x00t\t\x00t\x03\x00\xc9\n\x00|\x05\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x03\x00}\x02\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00g\x00\x00\x89\x00\x00d\x02\x00t\x01\x00f\x01\x00\x87\x00\x00f\x01\x00d\x03\x00\x8...05\x00t\t\x00t\x03\x00\xc9\n\x00|\x05\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x03\x00}\x02\x00d\x00\x00S' next_instr = 59L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del, fil...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 135> at line 142 nameindex = 2, ignored = (59L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ______________________________ test_del_exception ______________________________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffd36c9e550>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del_exception'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffd3d8ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del_exception'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestFunction 'test_del_exception'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd370af7d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3675ab40> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3675ab40> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd3675a9b0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3675a2d0> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3675a2d0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i..._exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestFunction 'test_del_exception'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestFunction 'test_del_exception'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_del_exception'> def runtest(self): target = self.w_obj space = target.space self.check_run(space, target) > self.execute_appex(space, target) tool/pytest/apptest2.py:85: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestFunction 'test_del_exception'>, space = StdObjSpace w_func = <Function test_del_exception> def execute_appex(self, space, w_func): space.getexecutioncontext().set_sys_exc_info(None) sig = w_func.code._signature if sig.varargname or sig.kwargname: raise ValueError( 'Test functions may not use *args or **kwargs') args_w = self.get_fixtures(space, sig.argnames) try: > space.call_function(w_func, *args_w) tool/pytest/apptest2.py:114: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_del_exception>, args_w = () nargs = 0, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_del_exception>, args_w = () gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_del_exception, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 pycode = <code object test_del_exception, file '/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00d\x01\x00d\x00\x00l\x01\x00}\x01\x00d\x01\x00d\x00\x00l\x02\x00}\x02\x00d\x02\x00...0e\x00t\r\x00t\n\x00\xc9\x0e\x00|\x0e\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x0b\x00}\x0c\x00d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 co_code = 'd\x01\x00d\x00\x00l\x00\x00}\x00\x00d\x01\x00d\x00\x00l\x01\x00}\x01\x00d\x01\x00d\x00\x00l\x02\x00}\x02\x00d\x02\x00...0e\x00t\r\x00t\n\x00\xc9\x0e\x00|\x0e\x00\xca\x01\x00\x83\x01\x00\x82\x01\x00d\x00\x00\x04}\x0b\x00}\x0c\x00d\x00\x00S' next_instr = 98L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd39711610> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_del_exce...ch64/build/pypy/objspace/std/test/apptest_userobject.py', line 145> at line 154 nameindex = 5, ignored = (98L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd39979f50> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ___________ AppTestWithMapDictAndCounters.test_dont_keep_class_alive ___________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffd351d12d0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_keep_class_alive'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffd3d8ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_keep_class_alive'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_dont_keep_class_alive'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd3518e280> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3518e050> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3518e050> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd3518ef00> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3518ef50> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd3518ef50> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_dont_keep_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_dont_keep_class_alive'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_dont_keep_class_alive'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_dont_keep_class_alive'>, space = StdObjSpace target = <function test_dont_keep_class_alive at 0xfffd351d13d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) w_func = <Function test_dont_keep_class_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_dont_keep_class_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_dont_keep_class_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_dont_keep_class_alive, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 pycode = <code object test_dont_keep_class_alive, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 co_code = 'd\x01\x00d\x00\x00l\x00\x00\x89\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00\x87\x00\x00\x87\x01\x00f\x02\x00d\x02\x00\x86\x00\x00}\x01\x00|\x01\x00\x83\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 co_code = 'd\x01\x00d\x00\x00l\x00\x00\x89\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00\x87\x00\x00\x87\x01\x00f\x02\x00d\x02\x00\x86\x00\x00}\x01\x00|\x01\x00\x83\x00\x00\x01d\x00\x00S' next_instr = 48L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: > self.CALL_FUNCTION(oparg, next_instr) interpreter/pyopcode.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 oparg = 0, next_instr = 48L def CALL_FUNCTION(self, oparg, next_instr): # XXX start of hack for performance if (oparg >> 8) & 0xff == 0: # Only positional arguments nargs = oparg & 0xff w_function = self.peekvalue(nargs) > w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1) interpreter/pyopcode.py:1233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function f>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 dropvalues = 1, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function f>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 dropvalues = 1, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function f> code = <code object f, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_dont_kee...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 1> at line 15 dropvalues = 1 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 pycode = <code object f, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 co_code = 'd\x01\x00t\x00\x00f\x01\x00d\x02\x00\x84\x00\x00\x83\x00\x00Y}\x00\x00\x88\x01\x00\xc9\x01\x00|\x00\x00\xca\x01\x00}\...\x01\xcc\x15\x00|\x01\x00\x83\x00\x00d\x00\x00k\x08\x00sk\x00t\x04\x00\x82\x01\x00d\x03\x00S\x00\x82\x01\x00d\x03\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 co_code = 'd\x01\x00t\x00\x00f\x01\x00d\x02\x00\x84\x00\x00\x83\x00\x00Y}\x00\x00\x88\x01\x00\xc9\x01\x00|\x00\x00\xca\x01\x00}\...\x01\xcc\x15\x00|\x01\x00\x83\x00\x00d\x00\x00k\x08\x00sk\x00t\x04\x00\x82\x01\x00d\x03\x00S\x00\x82\x01\x00d\x03\x00S' next_instr = 59L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1646]', line 4> at line 12 nameindex = 3, ignored = (59L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError ________ AppTestWithMapDictAndCounters.test_instance_keeps_class_alive _________ self = <CallInfo when='call' exception: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details (env.py, line 423)> func = <function <lambda> at 0xfffd35024ad0>, when = 'call' def __init__(self, func, when): #: context of invocation: one of "setup", "call", #: "teardown", "memocollect" self.when = when self.start = time() try: > self.result = func() ../_pytest/runner.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > return CallInfo(lambda: ihook(item=item, **kwds), when=when) ../_pytest/runner.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_HookCaller 'pytest_runtest_call'> kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '...lticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instance_keeps_class_alive'>} def __call__(self, **kwargs): assert not self.is_historic() > return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs) ../_pytest/vendored_packages/pluggy.py:724: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.config.PytestPluginManager object at 0xfffd3d8ecf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '...lticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instance_keeps_class_alive'>} def _hookexec(self, hook, methods, kwargs): # called from all hookcaller instances. # enable_tracing will set its own wrapping function at self._inner_hookexec > return self._inner_hookexec(hook, methods, kwargs) ../_pytest/vendored_packages/pluggy.py:338: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd3c12e550>] kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '...lticall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_instance_keeps_class_alive'>} self._inner_hookexec = lambda hook, methods, kwargs: \ > _MultiCall(methods, kwargs, hook.spec_opts).execute() ../_pytest/vendored_packages/pluggy.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd34a16320> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd34a16190> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd34a16190> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: > return _wrapped_call(hook_impl.function(*args), self.execute) ../_pytest/vendored_packages/pluggy.py:595: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ wrap_controller = <generator object pytest_runtest_call at 0xfffd34a163c0> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def _wrapped_call(wrap_controller, func): """ Wrap calling to a function with a generator which needs to yield exactly once. The yield point will trigger calling the wrapped function and return its _CallOutcome to the yield point. The generator then needs to finish (raise StopIteration) in order for the wrapped call to complete. """ try: next(wrap_controller) # first yield except StopIteration: _raise_wrapfail(wrap_controller, "did not yield") call_outcome = _CallOutcome(func) try: wrap_controller.send(call_outcome) _raise_wrapfail(wrap_controller, "has second yield") except StopIteration: pass > return call_outcome.get_result() ../_pytest/vendored_packages/pluggy.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd34a16460> def get_result(self): if self.excinfo is None: return self.result else: ex = self.excinfo if _py3: raise ex[1].with_traceback(ex[2]) > _reraise(*ex) # noqa ../_pytest/vendored_packages/pluggy.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0xfffd34a16460> func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...lass_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>> def __init__(self, func): try: > self.result = func() ../_pytest/vendored_packages/pluggy.py:264: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_instance_keeps_class_alive'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}> def execute(self): all_kwargs = self.kwargs self.results = results = [] firstresult = self.specopts.get("firstresult") while self.hook_impls: hook_impl = self.hook_impls.pop() args = [all_kwargs[argname] for argname in hook_impl.argnames] if hook_impl.hookwrapper: return _wrapped_call(hook_impl.function(*args), self.execute) > res = hook_impl.function(*args) ../_pytest/vendored_packages/pluggy.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ item = <AppTestMethod 'test_instance_keeps_class_alive'> def pytest_runtest_call(item): try: > item.runtest() ../_pytest/runner.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_instance_keeps_class_alive'> def runtest(self): target = self.obj if self.config.option.runappdirect: return target() space = target.im_self.space filename = self._getdynfilename(target) func = app2interp_temp(target.im_func, filename=filename) w_instance = self.parent.w_instance > self.execute_appex(space, func, space, w_instance) tool/pytest/apptest.py:89: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <AppTestMethod 'test_instance_keeps_class_alive'>, space = StdObjSpace target = <function test_instance_keeps_class_alive at 0xfffd34e41450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>) def execute_appex(self, space, target, *args): self.space = space try: > target(*args) tool/pytest/apptest.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) w_func = <Function test_instance_keeps_class_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10> def appcaller(space, *args_w): if not isinstance(space, ObjSpace): raise TypeError("first argument must be a space instance.") # the last argument can be an Arguments w_func = self.wget(space, name) if not args_w: return space.call_function(w_func) else: args = args_w[-1] assert args is not None if not isinstance(args, Arguments): > return space.call_function(w_func, *args_w) interpreter/gateway.py:1227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function test_instance_keeps_class_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) nargs = 1, Function = <class 'pypy.interpreter.function.Function'> Method = <class 'pypy.interpreter.function.Method'> def call_function(self, w_func, *args_w): nargs = len(args_w) # used for pruning funccall versions if not self.config.objspace.disable_call_speedhacks and nargs < 5: # start of hack for performance from pypy.interpreter.function import Function, Method if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: if nargs < 4: func = w_func.w_function if isinstance(func, Function): return func.funccall(w_inst, *args_w) elif args_w and ( self.abstract_isinstance_w(args_w[0], w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): > return w_func.funccall(*args_w) interpreter/baseobjspace.py:1210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function test_instance_keeps_class_alive> args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd34d14f10>,) gateway = <module 'pypy.interpreter.gateway' from '/build_dir/own-linux-aarch64/build/pypy/interpreter/gateway.pyc'> PyCode = <class 'pypy.interpreter.pycode.PyCode'> code = <code object test_instance_keeps_class_alive, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> def funccall(self, *args_w): # speed hack from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit nargs = len(args_w) fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, args_w[0]) elif nargs == 2: assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, args_w[0], args_w[1]) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) return code.fastcall_3(self.space, self, args_w[0], args_w[1], args_w[2]) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) return code.fastcall_4(self.space, self, args_w[0], args_w[1], args_w[2], args_w[3]) elif (nargs | PyCode.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) if nargs < 5: new_frame = self.space.createframe(code, self.w_func_globals, self) for i in funccallunrolling: if i < nargs: new_frame.locals_cells_stack_w[i] = args_w[i] > return new_frame.run() interpreter/function.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 pycode = <code object test_instance_keeps_class_alive, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00\x89\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00\x87\x00\x00\x87\x01\x00f\x02\x00d\x02\...x00S\x00}\x02\x00\xcc\x12\x00|\x02\x00d\x03\x00k\x02\x00sH\x00t\x02\x00\x82\x01\x00|\x01\x00\x83\x00\x00\x01d\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 co_code = 'd\x01\x00d\x00\x00l\x00\x00\x89\x01\x00d\x01\x00d\x00\x00l\x01\x00\x89\x00\x00\x87\x00\x00\x87\x01\x00f\x02\x00d\x02\...x00S\x00}\x02\x00\xcc\x12\x00|\x02\x00d\x03\x00k\x02\x00sH\x00t\x02\x00\x82\x01\x00|\x01\x00\x83\x00\x00\x01d\x00\x00S' next_instr = 48L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: > self.CALL_FUNCTION(oparg, next_instr) interpreter/pyopcode.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 oparg = 0, next_instr = 48L def CALL_FUNCTION(self, oparg, next_instr): # XXX start of hack for performance if (oparg >> 8) & 0xff == 0: # Only positional arguments nargs = oparg & 0xff w_function = self.peekvalue(nargs) > w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1) interpreter/pyopcode.py:1233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = StdObjSpace, w_func = <Function f>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 dropvalues = 1, methodcall = False def call_valuestack(self, w_func, nargs, frame, dropvalues, methodcall=False): # methodcall is only used for better error messages in argument.py from pypy.interpreter.function import Function, Method, is_builtin_code if frame.get_is_being_profiled() and is_builtin_code(w_func): # XXX: this code is copied&pasted :-( from the slow path below # call_valuestack(). args = frame.make_arguments(nargs) frame.dropvalues(dropvalues) return self.call_args_and_c_profile(frame, w_func, args) if not self.config.objspace.disable_call_speedhacks: # start of hack for performance if isinstance(w_func, Method): w_inst = w_func.w_instance if w_inst is not None: w_func = w_func.w_function # reuse callable stack place for w_inst frame.settopvalue(w_inst, nargs) nargs += 1 methodcall = True elif nargs > 0 and ( self.abstract_isinstance_w(frame.peekvalue(nargs-1), # :-( w_func.w_class)): w_func = w_func.w_function if isinstance(w_func, Function): return w_func.funccall_valuestack( > nargs, frame, methodcall=methodcall, dropvalues=dropvalues) interpreter/baseobjspace.py:1243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function f>, nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 dropvalues = 1, methodcall = False def funccall_valuestack(self, nargs, frame, dropvalues, methodcall=False): # speed hack # methodcall is only for better error messages from pypy.interpreter import gateway from pypy.interpreter.pycode import PyCode code = self.getcode() # hook for the jit # if (jit.we_are_jitted() and code is self.space._code_of_sys_exc_info and nargs == 0): frame.dropvalues(dropvalues) from pypy.module.sys.vm import exc_info_direct return exc_info_direct(self.space, frame) # fast_natural_arity = code.fast_natural_arity if nargs == fast_natural_arity: if nargs == 0: frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode0) return code.fastcall_0(self.space, self) elif nargs == 1: f_0 = frame.peekvalue(0) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode1) return code.fastcall_1(self.space, self, f_0) elif nargs == 2: f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) frame.dropvalues(dropvalues) assert isinstance(code, gateway.BuiltinCode2) return code.fastcall_2(self.space, self, f_1, f_0) elif nargs == 3: assert isinstance(code, gateway.BuiltinCode3) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) frame.dropvalues(dropvalues) return code.fastcall_3(self.space, self, f_2, f_1, f_0) elif nargs == 4: assert isinstance(code, gateway.BuiltinCode4) f_0 = frame.peekvalue(0) f_1 = frame.peekvalue(1) f_2 = frame.peekvalue(2) f_3 = frame.peekvalue(3) frame.dropvalues(dropvalues) return code.fastcall_4(self.space, self, f_3, f_2, f_1, f_0) elif (nargs | Code.FLATPYCALL) == fast_natural_arity: assert isinstance(code, PyCode) > return self._flat_pycall(code, nargs, frame, dropvalues) interpreter/function.py:174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <Function f> code = <code object f, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_instance...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 1> at line 13 dropvalues = 1 @jit.unroll_safe def _flat_pycall(self, code, nargs, frame, dropvalues): # code is a PyCode new_frame = self.space.createframe(code, self.w_func_globals, self) for i in xrange(nargs): new_frame.locals_cells_stack_w[i] = frame.peekvalue(nargs-1-i) frame.dropvalues(dropvalues) > return new_frame.run() interpreter/function.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 def run(self): """Start this frame's execution.""" if self.getcode().co_flags & pycode.CO_GENERATOR: from pypy.interpreter.generator import GeneratorIterator return GeneratorIterator(self) else: > return self.execute_frame() interpreter/pyframe.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, executioncontext) except OperationError: raise except Exception as e: # general fall-back > raise self._convert_unexpected_exception(e) interpreter/pyframe.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 e = SyntaxError("Non-ASCII character '\\xe2' in file /build_dir/own-linux-aarch64/... ('/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py', 423, 0, None)) def _convert_unexpected_exception(self, e): from pypy.interpreter import error > operr = error.get_converted_unexpected_exception(self.space, e) interpreter/pyframe.py:943: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 w_inputvalue = None, operr = None def execute_frame(self, w_inputvalue=None, operr=None): """Execute this frame. Main entry point to the interpreter. The optional arguments are there to handle a generator's frame: w_inputvalue is for generator.send() and operr is for generator.throw(). """ # the following 'assert' is an annotation hint: it hides from # the annotator all methods that are defined in PyFrame but # overridden in the {,Host}FrameClass subclasses of PyFrame. assert (isinstance(self, self.space.FrameClass) or not self.space.config.translating) executioncontext = self.space.getexecutioncontext() executioncontext.enter(self) got_exception = True w_exitvalue = self.space.w_None try: executioncontext.call_trace(self) # try: if operr is not None: next_instr = self.handle_operation_error( executioncontext, operr) self.last_instr = intmask(next_instr - 1) else: # Execution starts just after the last_instr. Initially, # last_instr is -1. After a generator suspends it points to # the YIELD_VALUE instruction. next_instr = r_uint(self.last_instr + 1) if next_instr != 0: self.pushvalue(w_inputvalue) w_exitvalue = self.dispatch(self.pycode, next_instr, > executioncontext) interpreter/pyframe.py:286: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 pycode = <code object f, file '[/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def dispatch(self, pycode, next_instr, ec): # For the sequel, force 'next_instr' to be unsigned for performance next_instr = r_uint(next_instr) co_code = pycode.co_code try: while True: > next_instr = self.handle_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 co_code = 'd\x01\x00t\x00\x00f\x01\x00d\x02\x00\x84\x00\x00\x83\x00\x00Y}\x00\x00\x88\x01\x00\xc9\x01\x00|\x00\x00\xca\x01\x00}\...x00S\x88\x00\x00\xc9\x02\x00\xca\x00\x00\x01\x88\x00\x00\xc9\x02\x00\xca\x00\x00\x01|\x02\x00\xc9\x03\x00\xca\x00\x00S' next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> def handle_bytecode(self, co_code, next_instr, ec): try: > next_instr = self.dispatch_bytecode(co_code, next_instr, ec) interpreter/pyopcode.py:70: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 co_code = 'd\x01\x00t\x00\x00f\x01\x00d\x02\x00\x84\x00\x00\x83\x00\x00Y}\x00\x00\x88\x01\x00\xc9\x01\x00|\x00\x00\xca\x01\x00}\...x00S\x88\x00\x00\xc9\x02\x00\xca\x00\x00\x01\x88\x00\x00\xc9\x02\x00\xca\x00\x00\x01|\x02\x00\xc9\x03\x00\xca\x00\x00S' next_instr = 55L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd371b4490> @jit.unroll_safe def dispatch_bytecode(self, co_code, next_instr, ec): while True: self.last_instr = intmask(next_instr) if jit.we_are_jitted(): if self.debugdata: ec.bytecode_only_trace(self) next_instr = r_uint(self.last_instr) else: ec.bytecode_trace(self) next_instr = r_uint(self.last_instr) opcode = ord(co_code[next_instr]) next_instr += 1 if opcode >= HAVE_ARGUMENT: lo = ord(co_code[next_instr]) hi = ord(co_code[next_instr+1]) next_instr += 2 oparg = (hi * 256) | lo else: oparg = 0 # note: the structure of the code here is such that it makes # (after translation) a big "if/elif" chain, which is then # turned into a switch(). while opcode == opcodedesc.EXTENDED_ARG.index: opcode = ord(co_code[next_instr]) if opcode < HAVE_ARGUMENT: raise BytecodeCorruption lo = ord(co_code[next_instr+1]) hi = ord(co_code[next_instr+2]) next_instr += 3 oparg = (oparg * 65536) | (hi * 256) | lo if opcode == opcodedesc.RETURN_VALUE.index: if not self.blockstack_non_empty(): self.frame_finished_execution = True # for generators raise Return w_returnvalue = self.popvalue() block = self.unrollstack(SReturnValue.kind) if block is None: self.pushvalue(w_returnvalue) raise Return else: unroller = SReturnValue(w_returnvalue) next_instr = block.handle(self, unroller) return next_instr # now inside a 'finally' block elif opcode == opcodedesc.END_FINALLY.index: unroller = self.end_finally() if isinstance(unroller, SuspendedUnroller): # go on unrolling the stack block = self.unrollstack(unroller.kind) if block is None: w_result = unroller.nomoreblocks() self.pushvalue(w_result) raise Return else: next_instr = block.handle(self, unroller) return next_instr elif opcode == opcodedesc.JUMP_ABSOLUTE.index: return self.jump_absolute(oparg, ec) elif opcode == opcodedesc.BREAK_LOOP.index: next_instr = self.BREAK_LOOP(oparg, next_instr) elif opcode == opcodedesc.CONTINUE_LOOP.index: return self.CONTINUE_LOOP(oparg, next_instr) elif opcode == opcodedesc.FOR_ITER.index: next_instr = self.FOR_ITER(oparg, next_instr) elif opcode == opcodedesc.JUMP_FORWARD.index: next_instr = self.JUMP_FORWARD(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_FALSE_OR_POP.index: next_instr = self.JUMP_IF_FALSE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_NOT_DEBUG.index: next_instr = self.JUMP_IF_NOT_DEBUG(oparg, next_instr) elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index: next_instr = self.JUMP_IF_TRUE_OR_POP(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index: next_instr = self.POP_JUMP_IF_FALSE(oparg, next_instr) elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index: next_instr = self.POP_JUMP_IF_TRUE(oparg, next_instr) elif opcode == opcodedesc.BINARY_ADD.index: self.BINARY_ADD(oparg, next_instr) elif opcode == opcodedesc.BINARY_AND.index: self.BINARY_AND(oparg, next_instr) elif opcode == opcodedesc.BINARY_DIVIDE.index: self.BINARY_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_FLOOR_DIVIDE.index: self.BINARY_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_LSHIFT.index: self.BINARY_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_MODULO.index: self.BINARY_MODULO(oparg, next_instr) elif opcode == opcodedesc.BINARY_MULTIPLY.index: self.BINARY_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.BINARY_OR.index: self.BINARY_OR(oparg, next_instr) elif opcode == opcodedesc.BINARY_POWER.index: self.BINARY_POWER(oparg, next_instr) elif opcode == opcodedesc.BINARY_RSHIFT.index: self.BINARY_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBSCR.index: self.BINARY_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.BINARY_SUBTRACT.index: self.BINARY_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.BINARY_TRUE_DIVIDE.index: self.BINARY_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.BINARY_XOR.index: self.BINARY_XOR(oparg, next_instr) elif opcode == opcodedesc.BUILD_CLASS.index: self.BUILD_CLASS(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST.index: self.BUILD_LIST(oparg, next_instr) elif opcode == opcodedesc.BUILD_LIST_FROM_ARG.index: self.BUILD_LIST_FROM_ARG(oparg, next_instr) elif opcode == opcodedesc.BUILD_MAP.index: self.BUILD_MAP(oparg, next_instr) elif opcode == opcodedesc.BUILD_SET.index: self.BUILD_SET(oparg, next_instr) elif opcode == opcodedesc.BUILD_SLICE.index: self.BUILD_SLICE(oparg, next_instr) elif opcode == opcodedesc.BUILD_TUPLE.index: self.BUILD_TUPLE(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION.index: self.CALL_FUNCTION(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_KW.index: self.CALL_FUNCTION_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR.index: self.CALL_FUNCTION_VAR(oparg, next_instr) elif opcode == opcodedesc.CALL_FUNCTION_VAR_KW.index: self.CALL_FUNCTION_VAR_KW(oparg, next_instr) elif opcode == opcodedesc.CALL_METHOD.index: self.CALL_METHOD(oparg, next_instr) elif opcode == opcodedesc.COMPARE_OP.index: self.COMPARE_OP(oparg, next_instr) elif opcode == opcodedesc.DELETE_ATTR.index: self.DELETE_ATTR(oparg, next_instr) elif opcode == opcodedesc.DELETE_FAST.index: self.DELETE_FAST(oparg, next_instr) elif opcode == opcodedesc.DELETE_GLOBAL.index: self.DELETE_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.DELETE_NAME.index: self.DELETE_NAME(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_0.index: self.DELETE_SLICE_0(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_1.index: self.DELETE_SLICE_1(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_2.index: self.DELETE_SLICE_2(oparg, next_instr) elif opcode == opcodedesc.DELETE_SLICE_3.index: self.DELETE_SLICE_3(oparg, next_instr) elif opcode == opcodedesc.DELETE_SUBSCR.index: self.DELETE_SUBSCR(oparg, next_instr) elif opcode == opcodedesc.DUP_TOP.index: self.DUP_TOP(oparg, next_instr) elif opcode == opcodedesc.DUP_TOPX.index: self.DUP_TOPX(oparg, next_instr) elif opcode == opcodedesc.EXEC_STMT.index: self.EXEC_STMT(oparg, next_instr) elif opcode == opcodedesc.GET_ITER.index: self.GET_ITER(oparg, next_instr) elif opcode == opcodedesc.IMPORT_FROM.index: self.IMPORT_FROM(oparg, next_instr) elif opcode == opcodedesc.IMPORT_NAME.index: self.IMPORT_NAME(oparg, next_instr) elif opcode == opcodedesc.IMPORT_STAR.index: self.IMPORT_STAR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_ADD.index: self.INPLACE_ADD(oparg, next_instr) elif opcode == opcodedesc.INPLACE_AND.index: self.INPLACE_AND(oparg, next_instr) elif opcode == opcodedesc.INPLACE_DIVIDE.index: self.INPLACE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_FLOOR_DIVIDE.index: self.INPLACE_FLOOR_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_LSHIFT.index: self.INPLACE_LSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MODULO.index: self.INPLACE_MODULO(oparg, next_instr) elif opcode == opcodedesc.INPLACE_MULTIPLY.index: self.INPLACE_MULTIPLY(oparg, next_instr) elif opcode == opcodedesc.INPLACE_OR.index: self.INPLACE_OR(oparg, next_instr) elif opcode == opcodedesc.INPLACE_POWER.index: self.INPLACE_POWER(oparg, next_instr) elif opcode == opcodedesc.INPLACE_RSHIFT.index: self.INPLACE_RSHIFT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_SUBTRACT.index: self.INPLACE_SUBTRACT(oparg, next_instr) elif opcode == opcodedesc.INPLACE_TRUE_DIVIDE.index: self.INPLACE_TRUE_DIVIDE(oparg, next_instr) elif opcode == opcodedesc.INPLACE_XOR.index: self.INPLACE_XOR(oparg, next_instr) elif opcode == opcodedesc.LIST_APPEND.index: self.LIST_APPEND(oparg, next_instr) elif opcode == opcodedesc.LOAD_ATTR.index: self.LOAD_ATTR(oparg, next_instr) elif opcode == opcodedesc.LOAD_CLOSURE.index: self.LOAD_CLOSURE(oparg, next_instr) elif opcode == opcodedesc.LOAD_CONST.index: self.LOAD_CONST(oparg, next_instr) elif opcode == opcodedesc.LOAD_DEREF.index: self.LOAD_DEREF(oparg, next_instr) elif opcode == opcodedesc.LOAD_FAST.index: self.LOAD_FAST(oparg, next_instr) elif opcode == opcodedesc.LOAD_GLOBAL.index: self.LOAD_GLOBAL(oparg, next_instr) elif opcode == opcodedesc.LOAD_LOCALS.index: self.LOAD_LOCALS(oparg, next_instr) elif opcode == opcodedesc.LOAD_NAME.index: self.LOAD_NAME(oparg, next_instr) elif opcode == opcodedesc.LOOKUP_METHOD.index: > self.LOOKUP_METHOD(oparg, next_instr) interpreter/pyopcode.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object f, file '[/bu...aarch64/build/pypy/objspace/std/test/test_mapdict.py:1662]', line 4> at line 11 nameindex = 2, ignored = (55L,) MutableCell = <class 'pypy.objspace.std.typeobject.MutableCell'> space = StdObjSpace w_obj = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> def LOOKUP_METHOD(f, nameindex, *ignored): from pypy.objspace.std.typeobject import MutableCell # stack before after # -------------- --fast-method----fallback-case------------ # # w_object None # w_object => w_function w_boundmethod_or_whatever # (more stuff) (more stuff) (more stuff) # space = f.space w_obj = f.popvalue() if not jit.we_are_jitted(): # mapdict has an extra-fast version of this function if LOOKUP_METHOD_mapdict(f, nameindex, w_obj): return w_name = f.getname_w(nameindex) w_value = None w_type = space.type(w_obj) if w_type.has_object_getattribute(): name = space.text_w(w_name) # bit of a mess to use these internal functions, but it allows the # mapdict caching below to work without an additional lookup version_tag = w_type.version_tag() if version_tag is None: _, w_descr = w_type._lookup_where(name) w_descr_cell = None else: _, w_descr_cell = w_type._pure_lookup_where_with_method_cache( name, version_tag) w_descr = w_descr_cell if isinstance(w_descr, MutableCell): w_descr = w_descr.unwrap_cell(space) if w_descr is None: # this handles directly the common case # module.function(args..) > w_value = w_obj.getdictvalue(space, name) objspace/std/callmethod.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> space = StdObjSpace, name = 'collect' def getdictvalue(self, space, name): w_value = space.finditem_str(self.w_dict, name) if self.lazy and w_value is None: > return self._load_lazily(space, name) interpreter/mixedmodule.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pypy.module.gc.moduledef.Module object at 0xfffd36674d10> space = StdObjSpace, name = 'collect' def _load_lazily(self, space, name): w_name = space.new_interned_str(name) try: loader = self.loaders[name] except KeyError: return None else: > w_value = loader(space) interpreter/mixedmodule.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ space = StdObjSpace def ifileloader(space): d = {'space':space} # EVIL HACK (but it works, and this is not RPython :-) while 1: try: value = eval(spec, d) except NameError as ex: name = ex.args[0].split("'")[1] # super-Evil if name in d: raise # propagate the NameError try: > d[name] = __import__(pkgroot+'.'+name, None, None, [name]) interpreter/mixedmodule.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from pypy.interpreter.gateway import unwrap_spec from pypy.interpreter.error import oefmt from rpython.rlib import rgc > from pypy.module.gc.hook import W_GcCollectStepStats module/gc/interp_gc.py:4: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ from rpython.memory.gc.hook import GcHooks > from rpython.memory.gc import incminimark module/gc/hook.py:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ """ # XXX Should find a way to bound the major collection threshold by the # XXX total addressable size. Maybe by keeping some minimarkpage arenas # XXX pre-reserved, enough for a few nursery collections? What about # XXX raw-malloced memory? # XXX try merging old_objects_pointing_to_pinned into # XXX old_objects_pointing_to_young (IRC 2014-10-22, fijal and gregor_w) import sys import os import time from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rtyper.lltypesystem.llmemory import raw_malloc_usage from rpython.memory.gc.base import GCBase, MovingGCBase > from rpython.memory.gc import env E File "/build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py", line 423 E SyntaxError: Non-ASCII character '\xe2' in file /build_dir/own-linux-aarch64/build/rpython/memory/gc/env.py on line 423, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details ../rpython/memory/gc/incminimark.py:70: SyntaxError =========================== short test summary info ============================ FAIL objspace/std/test/apptest_iterobject.py::test_reversed_frees_empty FAIL objspace/std/test/apptest_userobject.py::test_del FAIL objspace/std/test/apptest_userobject.py::test_del_exception FAIL objspace/std/test/test_mapdict.py::AppTestWithMapDictAndCounters::()::test_dont_keep_class_alive FAIL objspace/std/test/test_mapdict.py::AppTestWithMapDictAndCounters::()::test_instance_keeps_class_alive ============= 5 failed, 2093 passed, 32 skipped in 259.82 seconds ============== program finished with exit code 1 elapsedTime=2088.221584