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 ++ 22:39:53 starting config/test [1 started in total] ++ 22:39:53 starting interpreter/astcompiler/test [2 started in total] ++ 22:39:53 starting interpreter/pyparser/test [3 started in total] ++ 22:39:53 starting interpreter/test [4 started in total] __ interpreter/pyparser/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 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.57 seconds ========================== ++ 22:40:54 starting module/__builtin__/test [5 started in total] __ interpreter/astcompiler/test [2 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 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 59.81 seconds ========================== ++ 22:40:58 starting module/__pypy__/test [6 started in total] __ module/__pypy__/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 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 20.01 seconds ===================== ++ 22:41:22 starting module/_ast/test [7 started in total] __ module/__builtin__/test [4 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 0xffff2cd853d0>, 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 0xffff3207cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff308be550>] 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 0xffff308be550>] 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 0xffff2cd67f00> 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 0xffff2cd67820> 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 0xffff2cd67820> 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 0xffff2cd67640> 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 0xffff2cd67d20> 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 0xffff2cd67d20> 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 0xffff2cd855d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2ce0d750>) 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 0xffff2ce0d750>,) w_func = <Function test_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2ce0d750> 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 0xffff2ce0d750>,) 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 0xffff2ce0d750>,) 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 0xffff2d595a90> 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 0xffff2d595a90> 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 0xffff2d595a90> @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 0xffff2d5a7810> 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 0xffff2d5a7810> 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 0xffff2d5a7810> 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 0xffff2cd85250>, 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 0xffff3207cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff308be550>] 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 0xffff308be550>] 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 0xffff2c450d20> 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 0xffff2c450c80> 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 0xffff2c450c80> 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 0xffff2c450c30> 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 0xffff2c450eb0> 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 0xffff2c450eb0> 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 0xffff2cd0d850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2ce0d750>) 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 0xffff2ce0d750>,) w_func = <Function test_weakref> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2ce0d750> 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 0xffff2ce0d750>,) 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 0xffff2ce0d750>,) 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 0xffff2d595a90> 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 0xffff2d595a90> 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 0xffff2d595a90> @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 0xffff2d5a7810> 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 0xffff2d5a7810> 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 0xffff2d5a7810> 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 29.15 seconds =============== ++ 22:41:26 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 14.01 seconds ========================== ++ 22:41:39 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.81 seconds ========================== ++ 22:42:07 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.44 seconds ===================== ++ 22:43:13 starting module/_cppyy/test [11 started in total] __ config/test [8 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 157 items / 1 skipped config/test/test_pypyoption.py ............................................................................................................................................................. ==================== 157 passed, 1 skipped in 8.05 seconds ===================== ++ 22:43:27 starting module/_csv/test [12 started in total] __ interpreter/test [9 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 0xfffd18731f50>, 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 0xfffd1d2caed0> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd1bab3eb0>] 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 0xfffd1bab3eb0>] 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 0xfffd186a3c80> 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 0xfffd186a3d70> 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 0xfffd186a3d70> 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 0xfffd186a3460> 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 0xfffd186a3e60> 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 0xfffd186a3e60> 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 0xfffd1929b090> 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 0xfffd1929b090> 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 0xfffd1929b090> @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 0xfffd19530fd0> 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 0xfffd19530fd0> 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 0xfffd19530fd0> 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 0xfffd16908af0> 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 0xfffd16dd1650>, 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 0xfffd1d2caed0> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd1bab3eb0>] 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 0xfffd1bab3eb0>] 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 0xfffd16808050> 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 0xfffd168a34b0> 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 0xfffd168a34b0> 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 0xfffd168a3730> 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 0xfffd168a3690> 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 0xfffd168a3690> 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 0xfffd168aa450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd16b3a410>) 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 0xfffd16b3a410>,) w_func = <Function test_destructor> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd16b3a410> 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 0xfffd16b3a410>,) 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 0xfffd16b3a410>,) 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 0xfffd17714090> 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 0xfffd17714090> 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 0xfffd17714090> @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 0xfffd186150d0> 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 0xfffd186150d0> 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 0xfffd186150d0> 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 213.25 seconds ============== ++ 22:43:30 starting module/_demo/test [13 started in total] __ module/_cffi_backend/test [10 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 0xfffd91728910>,) in <bound method W_CDataNewStd.__del__ of <pypy.module._cffi_backend.cdataobj.W_CDataNewStd object at 0xfffd905f4290>> 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 0xfffd90d65950>> 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 0xfffd90d48590>> 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 0xfffd90d65a10>> 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 0xfffd90d65750>> 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 0xfffd90d48690>> 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 0xfffd90d48290>> 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 0xfffd90d5a3d0>> 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 0xfffd90d486d0>> 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 0xfffd90adfd90>> 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 0xfffd90d48410>> 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 0xfffd90d48dd0>> 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 0xfffd90d50f10>> 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 0xfffd90d48e10>> 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 0xfffd90d42650>> 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 0xfffd90d42110>> 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 0xfffd90d48fd0>> 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 0xfffd90d488d0>> 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 0xfffd90d48b50>> 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 0xfffd90d48890>> 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 0xfffd90d48cd0>> 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 0xfffd9123d450>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd9150f370> 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 0xfffd910f80a0> 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 0xfffd910f80a0> 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 0xfffd91242dc0> 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 0xfffd9123f820> 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 0xfffd9123f820> 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 0xfffd910bed50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_weakref> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:320]', line 1> at line 3 pycode = <code object test_weakref, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:320]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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, file '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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, file '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/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, file '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 1793> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_weakref, file '[/tmp/pytest/usession-main-3643/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,...'/tmp/pytest/usession-main-3643/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,...'/tmp/pytest/usession-main-3643/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,...'/tmp/pytest/usession-main-3643/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,...'/tmp/pytest/usession-main-3643/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,...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 1793> at line 1804 pycode = <code object test_weakref, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 1793> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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,...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd91430d50>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd90fa54b0> 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 0xfffd90fa5780> 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 0xfffd90fa5780> 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 0xfffd905e3140> 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 0xfffd905e36e0> 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 0xfffd905e36e0> 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 0xfffd9044c9d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_keepalive_struct> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:386]', line 1> at line 3 pycode = <code object test_keepalive_struct, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:386]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 2303> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_keepaliv...ile '[/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 2303> at line 2321 pycode = <code object test_keepalive_struct, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 2303> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd90aed8d0>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd90d67640> 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 0xfffd90d67320> 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 0xfffd90d67320> 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 0xfffd90d67500> 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 0xfffd90d674b0> 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 0xfffd90d674b0> 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 0xfffd90d5bf50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_buffer_keepalive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:512]', line 1> at line 3 pycode = <code object test_buffer_keepalive, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:512]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 3101> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_buffer_k...ile '[/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3101> at line 3108 pycode = <code object test_buffer_keepalive, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3101> next_instr = 52 ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd90ad37d0>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd90d1d550> 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 0xfffd90d1d730> 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 0xfffd90d1d730> 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 0xfffd90d1d6e0> 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 0xfffd90d1d8c0> 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 0xfffd90d1d8c0> 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 0xfffd909820d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_new_handle> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:539]', line 1> at line 3 pycode = <code object test_new_handle, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:539]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 3223> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...ile '[/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3223> at line 3237 pycode = <code object test_new_handle, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3223> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd90ff4dd0>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd8ff0dc30> 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 0xfffd8ff0ddc0> 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 0xfffd8ff0ddc0> 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 0xfffd8ff0dd20> 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 0xfffd8ff0dbe0> 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 0xfffd8ff0dbe0> 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 0xfffd90f4d050> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_new_handle_cycle> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:542]', line 1> at line 3 pycode = <code object test_new_handle_cycle, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:542]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 3248> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_new_hand...ile '[/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3248> at line 3259 pycode = <code object test_new_handle_cycle, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3248> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd905f2750>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd90e781e0> 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 0xfffd90876a00> 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 0xfffd90876a00> 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 0xfffd90876460> 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 0xfffd90a36050> 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 0xfffd90a36050> 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 0xfffd90c2a350> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0>) 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 0xfffd92163bd0>,) w_func = <Function test_from_buffer_not_str_unicode> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd92163bd0> 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 0xfffd92163bd0>,) 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 0xfffd92163bd0>,) 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-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:587]', line 1> at line 3 pycode = <code object test_from_buffer_not_str_unicode, file '[/tmp/pytest/usession-main-3643/test_c/_test_c.py:587]', line 1> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> 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...ile '[/tmp/pytest/usession-main-3643/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 0xfffd9207ccd0> @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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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...ile '[/tmp/pytest/usession-main-3643/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-main-3643/test_c/_all_test_c.py', line 3706> nargs = 0 frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_from_buf...ile '[/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/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...'/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3706> at line 3712 pycode = <code object test_from_buffer_not_str_unicode, file '/tmp/pytest/usession-main-3643/test_c/_all_test_c.py', line 3706> next_instr = 0L ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> 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-main-3643/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 0xfffd9207ccd0> @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...'/tmp/pytest/usession-main-3643/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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd922d7e10> 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 0xfffd907eedd0>, 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 0xfffd96bbcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd953fab40>] 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 0xfffd953fab40>] 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 0xfffd907e08c0> 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 0xfffd907e0d20> 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 0xfffd907e0d20> 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 0xfffd907e0870> 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 0xfffd907e0320> 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 0xfffd907e0320> 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 0xfffd900343d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd90929d50>) 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 0xfffd90929d50>,) w_func = <Function test_ffi_gc_disable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd90929d50> 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 0xfffd90929d50>,) 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 0xfffd90929d50>,) 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 0xfffd93381ed0> 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 0xfffd93381ed0> 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 0xfffd93381ed0> @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 0xfffd906e0150> 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 0xfffd906e0150> 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 0xfffd906e0150> 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 116.51 seconds ============== ++ 22:43:30 starting module/_file/test [14 started in total] __ module/_demo/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 3 items module/_demo/test/test_import.py .. module/_demo/test/test_sieve.py . =========================== 3 passed in 5.32 seconds =========================== ++ 22:43:37 starting module/_io/test [15 started in total] __ module/_csv/test [12 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.64 seconds =========================== ++ 22:43:40 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.36 seconds =========================== ++ 22:43:45 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.48 seconds ========================== ++ 22:43:49 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.28 seconds =========================== ++ 22:43:56 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 8.02 seconds ====================== ++ 22:44:07 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.96 seconds ===================== ++ 22:44:24 starting module/_multibytecodec/test [21 started in total] __ module/_multibytecodec/test [18 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.49 seconds ===================== ++ 22:44:52 starting module/_multiprocessing/test [22 started in total] __ module/_cppyy/test [19 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 0xfffbbd22f750>, 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 0xfffbc4bacf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbc1758500>] 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 0xfffbc1758500>] 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 0xfffbbd1ec410> 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 0xfffbbd1ec640> 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 0xfffbbd1ec640> 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 0xfffbbd1ec550> 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 0xfffbbd1ec3c0> 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 0xfffbbd1ec3c0> 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 0xfffbbd217d50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbbd511390>) 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 0xfffbbd511390>,) w_func = <Function test05_memory> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbbd511390> 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 0xfffbbd511390>,) 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 0xfffbbd511390>,) 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 0xfffbbe756490> 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 0xfffbbe756490> 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 0xfffbbe756490> @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 0xfffbbf912050> 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 0xfffbbf912050> 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 0xfffbbf912050> 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 0xfffbbd7a64d0>, 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 0xfffbc4bacf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffbc1758500>] 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 0xfffbc1758500>] 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 0xfffbbcb306e0> 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 0xfffbbcb30780> 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 0xfffbbcb30780> 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 0xfffbbcb305a0> 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 0xfffbbcb30820> 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 0xfffbbcb30820> 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 0xfffbbcfded50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbbd511390>) 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 0xfffbbd511390>,) w_func = <Function test05a_memory2> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffbbd511390> 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 0xfffbbd511390>,) 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 0xfffbbd511390>,) 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 0xfffbbe756490> 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 0xfffbbe756490> 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 0xfffbbe756490> @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 0xfffbbf912050> 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 0xfffbbf912050> 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 0xfffbbf912050> 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 0xfffbbd511390> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>> = <CPPClassDecl object at 0x0000fffbbd511350>.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 0xfffbbd511390> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>> = <CPPClassDecl object at 0x0000fffbbd511350>.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 0xfffbbd511390> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>> = <CPPClassDecl object at 0x0000fffbbd511350>.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 0xfffbbd511390> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>>('getCount') E + where <bound method CPPClassDecl.get_overload of <CPPClassDecl object at 0x0000fffbbd511350>> = <CPPClassDecl object at 0x0000fffbbd511350>.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 0xfffbbb706190> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <CPPStaticOverload object at 0x0000fffbbd3369d0> E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <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 0xfffbbb706190> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <CPPStaticOverload object at 0x0000fffbbd3369d0> E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <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 0xfffbbb706190> 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 0x0000fffbbd3369d0>() E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <CPPStaticOverload object at 0x0000fffbbd3369d0> E + where <CPPStaticOverload object at 0x0000fffbbd3369d0> = <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 96.57 seconds =============== ++ 22:45:16 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 6.06 seconds ===================== ++ 22:45:23 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.11 seconds ========================== ++ 22:45: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.66 seconds ===================== ++ 22:45:46 starting module/_rawffi/test [26 started in total] __ module/_io/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 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 0xfffd57d1f850>, 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 0xfffd5c51cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd5ad5e550>] 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 0xfffd5ad5e550>] 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 0xfffd57b27190> 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 0xfffd57b27e60> 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 0xfffd57b27e60> 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 0xfffd57b275f0> 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 0xfffd57b27f00> 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 0xfffd57b27f00> 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 0xfffd5832bbd0> 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 0xfffd5832bbd0> 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 0xfffd5832bbd0> @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 0xfffd5858be50> 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 0xfffd5858be50> 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 0xfffd5858be50> 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 0xfffd57522f50>, 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 0xfffd5c51cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd5ad5e550>] 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 0xfffd5ad5e550>] 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 0xfffd57c77aa0> 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 0xfffd57c77cd0> 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 0xfffd57c77cd0> 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 0xfffd57c77dc0> 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 0xfffd57c77e60> 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 0xfffd57c77e60> 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 0xfffd5832bbd0> 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 0xfffd5832bbd0> 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 0xfffd5832bbd0> @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 0xfffd5858be50> 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 0xfffd5858be50> 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 0xfffd5858be50> 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 0xfffd57d2cb50>, 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 0xfffd5c51cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd5ad5e550>] 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 0xfffd5ad5e550>] 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 0xfffd57193730> 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 0xfffd57193690> 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 0xfffd57193690> 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 0xfffd57193640> 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 0xfffd57193780> 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 0xfffd57193780> 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 0xfffd581db810> 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 0xfffd581db810> 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 0xfffd581db810> @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 0xfffd582cc490> 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 0xfffd582cc490> 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 0xfffd582cc490> 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 0xfffd56b9ba50>, 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 0xfffd5c51cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd5ad5e550>] 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 0xfffd5ad5e550>] 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 0xfffd55b19460> 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 0xfffd55b191e0> 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 0xfffd55b191e0> 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 0xfffd55b19690> 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 0xfffd55b195f0> 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 0xfffd55b195f0> 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 0xfffd57f6d5d0> 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 0xfffd57f6d5d0> 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 0xfffd57f6d5d0> @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 0xfffd57f41ad0> 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 0xfffd57f41ad0> 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 0xfffd57f41ad0> 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 0xfffd51c847d0>, 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 0xfffd5c51cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd5ad5e550>] 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 0xfffd5ad5e550>] 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 0xfffd545667d0> 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 0xfffd54566870> 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 0xfffd54566870> 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 0xfffd54566780> 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 0xfffd52c0afa0> 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 0xfffd52c0afa0> 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 0xfffd51c71c50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd51ccabd0>) 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 0xfffd51ccabd0>,) w_func = <Function test_destructor> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd51ccabd0> 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 0xfffd51ccabd0>,) 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 0xfffd51ccabd0>,) 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 0xfffd5403b290> 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 0xfffd5403b290> 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 0xfffd5403b290> @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 0xfffd53ff6310> 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 0xfffd53ff6310> 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 0xfffd53ff6310> 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 157.86 seconds ==================== ++ 22:46:16 starting module/_sha/test [27 started in total] __ module/_sha/test [24 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.55 seconds ====================== ++ 22:46:28 starting module/_socket/test [28 started in total] __ module/_rawffi/test [25 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 0xffffab46ce50>, 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 0xffffafcfcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffffae53e550>] 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 0xffffae53e550>] 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 0xffffaaec6c80> 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 0xffffaaec6500> 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 0xffffaaec6500> 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 0xffffaaec6e10> 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 0xffffaaec63c0> 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 0xffffaaec63c0> 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 0xffffaae62bd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffffaae57290>) 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 0xffffaae57290>,) w_func = <Function test_structure_autofree> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffffaae57290> 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 0xffffaae57290>,) 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 0xffffaae57290>,) 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 0xffffab934850> 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 0xffffab934850> 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 0xffffab934850> @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 0xffffab8f0c90> 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 0xffffab8f0c90> 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 0xffffab8f0c90> 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 0xffffab46cf50>, 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 0xffffafcfcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffffae53e550>] 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 0xffffae53e550>] 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 0xffffaa784230> 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 0xffffaa7841e0> 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 0xffffaa7841e0> 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 0xffffaa784410> 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 0xffffaa7844b0> 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 0xffffaa7844b0> 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 0xffffaac7a650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffffaae57290>) 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 0xffffaae57290>,) w_func = <Function test_array_autofree> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffffaae57290> 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 0xffffaae57290>,) 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 0xffffaae57290>,) 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 0xffffab934850> 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 0xffffab934850> 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 0xffffab934850> @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 0xffffab8f0c90> 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 0xffffab8f0c90> 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 0xffffab8f0c90> 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.84 seconds ================ ++ 22:46:37 starting module/_sre/test [29 started in total] __ module/_file/test [26 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 0xffff6f6db850>, 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 0xffff7412cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff7296e550>] 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 0xffff7296e550>] 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 0xffff6f68d190> 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 0xffff6f68d370> 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 0xffff6f68d370> 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 0xffff6f68da00> 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 0xffff6f68d230> 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 0xffff6f68d230> 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 0xffff6f6a0450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6fd6fd90>) 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 0xffff6fd6fd90>,) w_func = <Function test_exception_from_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6fd6fd90> 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 0xffff6fd6fd90>,) 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 0xffff6fd6fd90>,) 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 0xffff6fd63410> 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 0xffff6fd63410> 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 0xffff6fd63410> @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 0xffff70045e50> 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 0xffff70045e50> 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 0xffff70045e50> 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 0xffff6f6db750>, 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 0xffff7412cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff7296e550>] 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 0xffff7296e550>] 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 0xffff6f01baf0> 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 0xffff6f01b9b0> 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 0xffff6f01b9b0> 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 0xffff6f01baa0> 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 0xffff6f01b820> 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 0xffff6f01b820> 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 0xffff6f595650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6fd6fd90>) 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 0xffff6fd6fd90>,) w_func = <Function test_track_resources> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6fd6fd90> 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 0xffff6fd6fd90>,) 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 0xffff6fd6fd90>,) 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 0xffff6fd6fd90>]) 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 0xffff6fd6fd90>]) 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 0xffff6fd63410> 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 0xffff6fd63410> 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 0xffff6fd63410> @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 0xffff6fd63410> 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 0xffff6fd63410> 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 0xffff6fd63410> @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 0xffff70045e50> 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 0xffff70045e50> 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 0xffff70045e50> 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 211.69 seconds ============== ++ 22:47:07 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 130.48 seconds ==================== ++ 22:47:09 starting module/_warnings/test [31 started in total] __ module/_socket/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 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 0xffff6deb7d50>, 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 0xffff7266cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff70eae550>] 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 0xffff70eae550>] 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 0xffff6de77d70> 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 0xffff6de77fa0> 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 0xffff6de77fa0> 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 0xffff6de77eb0> 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 0xffff6db16f00> 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 0xffff6db16f00> 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 0xffff6dacb050> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6df1c110>) 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 0xffff6df1c110>,) w_func = <Function test_track_resources> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff6df1c110> 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 0xffff6df1c110>,) 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 0xffff6df1c110>,) 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 0xffff6df9ee10> 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 0xffff6df9ee10> 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 0xffff6df9ee10> @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 0xffff6df9ee10> 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 0xffff6df9ee10> 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 0xffff6df9ee10> @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 0xffff6dfb4710> 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 0xffff6dfb4710> 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 0xffff6dfb4710> 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 45.44 seconds ================ ++ 22:47:19 starting module/_weakref/test [32 started in total] __ module/_warnings/test [29 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.75 seconds =========================== ++ 22:47:19 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.03 seconds =========================== ++ 22:47:20 starting module/array/test [34 started in total] __ module/_sre/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 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.83 seconds ==================== ++ 22:47:21 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 0xfffec7641450>, 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 0xfffeca7dcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffec901c960>] 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 0xfffec901c960>] 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 0xfffec62285f0> 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 0xfffec6228c80> 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 0xfffec6228c80> 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 0xfffec6229c30> 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 0xfffec6229af0> 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 0xfffec6229af0> 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 0xfffec62ab9d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffec62fd310>) 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 0xfffec62fd310>,) w_func = <Function test_import_vmprof> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffec62fd310> 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 0xfffec62fd310>,) 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 0xfffec62fd310>,) 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 0xfffec63f85d0> 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 0xfffec63f85d0> 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 0xfffec63f85d0> @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 0xfffec66e6f50> 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 0xfffec66e6f50> 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 0xfffec66e6f50> 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.48 seconds ====================== ++ 22:47:24 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.94 seconds =========================== ++ 22:47:28 starting module/cStringIO/test [37 started in total] __ module/cStringIO/test [34 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.48 seconds ========================== ++ 22:47:40 starting module/cmath/test [38 started in total] __ module/_weakref/test [35 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 0xfffcf64eb9d0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf50bb550> 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 0xfffcf50bb5f0> 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 0xfffcf50bb5f0> 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 0xfffcf50bb140> 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 0xfffcf50bb0a0> 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 0xfffcf50bb0a0> 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 0xfffcf5145cd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_simple> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf5145b50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf449fcd0> 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 0xfffcf449ff50> 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 0xfffcf449ff50> 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 0xfffcf449fc30> 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 0xfffcf449fd20> 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 0xfffcf449fd20> 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 0xfffcf4fdbf50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_callback> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf48e19d0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4d22820> 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 0xfffcf4d228c0> 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 0xfffcf4d228c0> 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 0xfffcf4d22780> 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 0xfffcf4d22960> 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 0xfffcf4d22960> 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 0xfffcf48e1dd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_callback_order> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf48e1a50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf400c190> 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 0xfffcf400c280> 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 0xfffcf400c280> 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 0xfffcf400c370> 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 0xfffcf400c320> 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 0xfffcf400c320> 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 0xfffcf47bfed0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_dont_callback_if_weakref_dead> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf47bfc50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf44e35f0> 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 0xfffcf44e3a00> 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 0xfffcf44e3a00> 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 0xfffcf44e3af0> 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 0xfffcf44e3d70> 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 0xfffcf44e3d70> 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 0xfffcf48e19d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_callback_cannot_ressurect> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf48f16d0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf44a4960> 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 0xfffcf44a46e0> 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 0xfffcf44a46e0> 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 0xfffcf44a4690> 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 0xfffcf44a4820> 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 0xfffcf44a4820> 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 0xfffcf48f18d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_correct_weakrefcount_after_death> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf48f19d0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4a38cd0> 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 0xfffcf4a38d70> 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 0xfffcf4a38d70> 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 0xfffcf4a38c30> 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 0xfffcf4a38e10> 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 0xfffcf4a38e10> 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 0xfffcf4905450> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_weakref_equality> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf48e1a50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf50617d0> 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 0xfffcf5061690> 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 0xfffcf5061690> 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 0xfffcf50615f0> 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 0xfffcf5061e60> 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 0xfffcf5061e60> 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 0xfffcf48f1e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_hashing> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf4905850>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf3fc6730> 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 0xfffcf3fc64b0> 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 0xfffcf3fc64b0> 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 0xfffcf3fc6500> 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 0xfffcf3fc6550> 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 0xfffcf3fc6550> 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 0xfffcf47d8d50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_weakref_subclassing> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf47d8a50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4636910> 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 0xfffcf46369b0> 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 0xfffcf46369b0> 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 0xfffcf46367d0> 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 0xfffcf4636a50> 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 0xfffcf4636a50> 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 0xfffcf435a950> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_function_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf435a850>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4e1af50> 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 0xfffcf4e1abe0> 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 0xfffcf4e1abe0> 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 0xfffcf4e1aeb0> 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 0xfffcf4e1a7d0> 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 0xfffcf4e1a7d0> 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 0xfffcf4ea81d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_method_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf4ea8050>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf459dc30> 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 0xfffcf459dcd0> 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 0xfffcf459dcd0> 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 0xfffcf459daf0> 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 0xfffcf459da50> 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 0xfffcf459da50> 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 0xfffcf435a3d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_set_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf43a7d50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4e65be0> 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 0xfffcf4e65c80> 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 0xfffcf4e65c80> 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 0xfffcf4e65aa0> 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 0xfffcf4e65d20> 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 0xfffcf4e65d20> 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 0xfffcf43a7250> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_generator_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf43a7ad0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf460bb40> 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 0xfffcf460bbe0> 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 0xfffcf460bbe0> 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 0xfffcf460ba00> 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 0xfffcf460bc80> 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 0xfffcf460bc80> 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 0xfffcf43b6750> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_weakref_subclass_with_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf43c6550>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf502ad20> 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 0xfffcf502aaa0> 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 0xfffcf502aaa0> 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 0xfffcf502afa0> 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 0xfffcf4948690> 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 0xfffcf4948690> 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 0xfffcf4600850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850>) 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 0xfffcf51ce850>,) w_func = <Function test_type_weakrefable> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf51ce850> 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 0xfffcf51ce850>,) 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 0xfffcf51ce850>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf4571ed0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf40b30f0> 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 0xfffcf4afa0f0> 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 0xfffcf4afa0f0> 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 0xfffcf4afa820> 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 0xfffcf4afad20> 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 0xfffcf4afad20> 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 0xfffcf4571850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250>) 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 0xfffcf4d19250>,) w_func = <Function test_proxy_to_dead_object> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250> 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 0xfffcf4d19250>,) 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 0xfffcf4d19250>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf4571c50>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf4b6f500> 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 0xfffcf4b6f5a0> 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 0xfffcf4b6f5a0> 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 0xfffcf4b6f460> 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 0xfffcf4b6f640> 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 0xfffcf4b6f640> 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 0xfffcf459bd50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250>) 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 0xfffcf4d19250>,) w_func = <Function test_proxy_with_callback> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250> 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 0xfffcf4d19250>,) 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 0xfffcf4d19250>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf459b9d0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf3b82b90> 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 0xfffcf3b82be0> 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 0xfffcf3b82be0> 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 0xfffcf3b82550> 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 0xfffcf3b827d0> 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 0xfffcf3b827d0> 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 0xfffcf45885d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250>) 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 0xfffcf4d19250>,) w_func = <Function test_callback_raises> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250> 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 0xfffcf4d19250>,) 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 0xfffcf4d19250>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0x0000fffcf44b9b50> 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 0xfffcf459bdd0>, 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 0xfffcf939cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffcf7bde550>] 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 0xfffcf7bde550>] 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 0xfffcf45b3b40> 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 0xfffcf45b38c0> 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 0xfffcf45b38c0> 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 0xfffcf45b3910> 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 0xfffcf45b3960> 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 0xfffcf45b3960> 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 0xfffcf4600f50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250>) 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 0xfffcf4d19250>,) w_func = <Function test_init> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffcf4d19250> 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 0xfffcf4d19250>,) 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 0xfffcf4d19250>,) 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 0xfffcf5176890> 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 0xfffcf5176890> 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 0xfffcf5176890> @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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 0xfffcf53c9410> 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 23.09 seconds =============== ++ 22:47:43 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.27 seconds =========================== ++ 22:47:46 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 0xffff2bd313d0>, 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 0xffff3149cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff2fcde550>] 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 0xffff2fcde550>] 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 0xffff2bd9f280> 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 0xffff2bd9f460> 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 0xffff2bd9f460> 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 0xffff2bd9f960> 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 0xffff2bd9fb90> 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 0xffff2bd9fb90> 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 0xffff2bd36cd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2d193b50>) 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 0xffff2d193b50>,) w_func = <Function test_subclass_del> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff2d193b50> 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 0xffff2d193b50>,) 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 0xffff2d193b50>,) 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 0xffff2d1cf690> 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 0xffff2d1cf690> 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 0xffff2d1cf690> @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 0xffff2d46c750> 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 0xffff2d46c750> 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 0xffff2d46c750> 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 41.69 seconds ================ ++ 22:48:04 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.56 seconds =========================== ++ 22:48:24 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.89 seconds ===================== ++ 22:48:30 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 58.02 seconds =========================== ++ 22:48:49 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 43.28 seconds =========================== ++ 22:49:15 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 46.41 seconds =========================== ++ 22:49:28 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.07 seconds =========================== ++ 22:49:54 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.83 seconds =========================== ++ 22:50:21 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 0xfffc4f562850>, 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 0xfffc56b7cf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc521c0f00>] 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 0xfffc521c0f00>] 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 0xfffc4f6de1e0> 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 0xfffc4f6de500> 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 0xfffc4f6de500> 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 0xfffc4f6de370> 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 0xfffc4f5a2c80> 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 0xfffc4f5a2c80> 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 0xfffc4f56a050> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc52012510>) 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 0xfffc52012510>,) w_func = <Function test_subclass_with_attribute> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc52012510> 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 0xfffc52012510>,) 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 0xfffc52012510>,) 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 0xfffc51ff3110> 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 0xfffc51ff3110> 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 0xfffc51ff3110> @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 0xfffc5205d8d0> 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 0xfffc5205d8d0> 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 0xfffc5205d8d0> 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 0xfffc5205d8d0> 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 0xfffc5205d8d0> 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 0xfffc5253d250> DONE <function PyType_Ready at 0xfffc52463f50> DONE <function PyType_Ready at 0xfffc52463f50> DONE <function check at 0xfffc525e82d0> DONE <function PyModule_GetDict at 0xfffc5253d450> DONE <function PyDict_SetItemString at 0xfffc52492ed0> DONE <function check at 0xfffc525e82d0> DONE <function PyModule_GetDict at 0xfffc5253d450> DONE <function PyDict_SetItemString at 0xfffc52492ed0> DONE <function check at 0xfffc525e82d0> DONE <function PyModule_GetDict at 0xfffc5253d450> DONE <function PyDict_SetItemString at 0xfffc52492ed0> DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_arraymodule.py::AppTestArrayModule::()::test_subclass_with_attribute =============== 1 failed, 15 passed, 1 xfailed in 144.96 seconds =============== ++ 22:50:36 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 0xfffc52d57350>, 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 0xfffc58c0cf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc5424ee10>] 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 0xfffc5424ee10>] 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 0xfffc52d562d0> 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 0xfffc52d56730> 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 0xfffc52d56730> 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 0xfffc52d56af0> 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 0xfffc52d55320> 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 0xfffc52d55320> 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 0xfffc52d574d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc540829d0>) 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 0xfffc540829d0>,) w_func = <Function test_capsule_import> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc540829d0> 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 0xfffc540829d0>,) 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 0xfffc540829d0>,) 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 0xfffc54085550> 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 0xfffc54085550> 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 0xfffc54085550> @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 0xfffc540cce90> 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 0xfffc540cce90> 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 0xfffc540cce90> 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 0xfffc545cf150> DONE <function PyLong_AsVoidPtr at 0xfffc544df1d0> DONE <function PyErr_Occurred at 0xfffc5460e0d0> DONE <function PyErr_Occurred at 0xfffc5460e0d0> DONE <function PyImport_ImportModule at 0xfffc5467ee50> DONE <function check at 0xfffc546781d0> DONE <function PyModule_GetDict at 0xfffc545cf350> DONE <function PyDict_SetItemString at 0xfffc54524dd0> DONE <function PyErr_Occurred at 0xfffc5460e0d0> DONE <function PyString_FromStringAndSize at 0xfffc5457d4d0> DONE <function PyString_AS_STRING at 0xfffc5457dad0> DONE <function PyString_AS_STRING at 0xfffc5457dad0> DONE <function _PyString_Resize at 0xfffc5457ded0> <function bytes_dealloc at 0xfffc5457d350> DONE DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_capsule.py::AppTestCapsule::()::test_capsule_import ========================== 1 failed in 38.30 seconds =========================== ++ 22:50:39 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 37.28 seconds =========================== ++ 22:51:05 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.70 seconds ========================== ++ 22:51:10 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.95 seconds =========================== ++ 22:51:17 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 43.20 seconds =========================== ++ 22:51:27 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.85 seconds =========================== ++ 22:52:04 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 72.33 seconds ========================== ++ 22:52:37 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.62 seconds ========================== ++ 22:53:02 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 105.07 seconds ==================== ++ 22:53:06 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 37.00 seconds =========================== ++ 22:53:21 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 77.55 seconds ========================== ++ 22:53:31 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.52 seconds =========================== ++ 22:53:57 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.33 seconds =========================== ++ 22:54:09 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 40.06 seconds =========================== ++ 22:54:12 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 70.69 seconds ========================== ++ 22:54:22 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.66 seconds =========================== ++ 22:55:00 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.59 seconds =========================== ++ 22:55:13 starting module/cpyext/test/test_longobject.py [66 started in total] __ module/cpyext/test/test_getargs.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 11 items module/cpyext/test/test_getargs.py ........... ========================== 11 passed in 72.49 seconds ========================== ++ 22:55:17 starting module/cpyext/test/test_mapping.py [67 started in total] __ module/cpyext/test/test_intobject.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 10 items module/cpyext/test/test_intobject.py .......... ========================== 10 passed in 57.15 seconds ========================== ++ 22:55:18 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.38 seconds ========================== ++ 22:56:06 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 41.90 seconds =========================== ++ 22:56:08 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 43.00 seconds =========================== ++ 22:56:09 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.87 seconds ========================== ++ 22:56:33 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.98 seconds =========================== ++ 22:56:53 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.71 seconds =========================== ++ 22:57:18 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 70.01 seconds ===================== ++ 22:57:26 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 82.75 seconds ========================== ++ 22:57:43 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 69.21 seconds ========================== ++ 22:58:13 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.21 seconds ========================== ++ 22:58:23 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 0xffff69e6a6d0>, 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 0xffff6fbfcf10> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff6b23ef00>] 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 0xffff6b23ef00>] 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 0xffff69e29a00> 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 0xffff69e29730> 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 0xffff69e29730> 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 0xffff69e29b40> 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 0xffff69e29a50> 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 0xffff69e29a50> 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 0xffff69e6a850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff69ffb910>) 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 0xffff69ffb910>,) w_func = <Function test_pycobject_import> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff69ffb910> 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 0xffff69ffb910>,) 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 0xffff69ffb910>,) 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 0xffff6b0d4690> 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 0xffff6b0d4690> 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 0xffff6b0d4690> @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 0xffff6b0bdf10> 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 0xffff6b0bdf10> 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 0xffff6b0bdf10> 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 0xffff6b5c01d0> DONE <function PyLong_AsVoidPtr at 0xffff6b4cf250> DONE <function PyErr_Occurred at 0xffff6b5ff150> DONE <function PyErr_Occurred at 0xffff6b5ff150> DONE <function PyImport_ImportModule at 0xffff6b5f0ed0> DONE <function check at 0xffff6b664250> DONE <function PyModule_GetDict at 0xffff6b5c03d0> DONE <function PyDict_SetItemString at 0xffff6b512e50> DONE <function PyErr_Occurred at 0xffff6b5ff150> DONE =========================== short test summary info ============================ FAIL module/cpyext/test/test_pycobject.py::AppTestStringObject::()::test_pycobject_import ========================== 1 failed in 37.53 seconds =========================== ++ 22:58:27 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 93.73 seconds ===================== ++ 22:59:07 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 37.62 seconds =========================== ++ 22:59:11 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.47 seconds ===================== ++ 22:59:14 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 96.14 seconds ===================== ++ 23:00:02 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 42.40 seconds ========================== ++ 23:00:02 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.82 seconds ========================== ++ 23:00:35 starting module/cpyext/test/test_structseq.py [85 started in total] __ module/cpyext/test/test_pystate.py [82 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 13 items module/cpyext/test/test_pystate.py ............. ========================== 13 passed in 81.11 seconds ========================== ++ 23:00:35 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 45.67 seconds =========================== ++ 23:01:01 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.85 seconds =========================== ++ 23:01:01 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.64 seconds =========================== ++ 23:01:26 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.33 seconds =========================== ++ 23:01:26 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.92 seconds =========================== ++ 23:01:36 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 33.32 seconds =========================== ++ 23:01:45 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 52.65 seconds =========================== ++ 23:01:59 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 69.15 seconds ========================== ++ 23:02:46 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.38 seconds =========================== ++ 23:03:12 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 101.29 seconds ==================== ++ 23:03:34 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.39 seconds =========================== ++ 23:03:37 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.50 seconds =========================== ++ 23:03:38 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.65 seconds =========================== ++ 23:03:42 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.10 seconds ===================== ++ 23:03:47 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.16 seconds =========================== ++ 23:03:50 starting module/gc/test [101 started in total] __ module/gc/test [98 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.80 seconds ================= ++ 23:03:57 starting module/imp/test [102 started in total] __ module/fcntl/test [99 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.73 seconds =========================== ++ 23:03:59 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.25 seconds =========================== ++ 23:04:10 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.45 seconds ========================== ++ 23:04:25 starting module/math/test [105 started in total] __ module/itertools/test [102 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 0xfffc5099d7d0>, 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 0xfffc54ddcf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc5361e550>] 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 0xfffc5361e550>] 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 0xfffc50ad1910> 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 0xfffc50a94e10> 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 0xfffc50a94e10> 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 0xfffc508ff640> 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 0xfffc508ff870> 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 0xfffc508ff870> 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 0xfffc508fd650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc50b9a590>) 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 0xfffc50b9a590>,) w_func = <Function test_islice> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc50b9a590> 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 0xfffc50b9a590>,) 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 0xfffc50b9a590>,) 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 0xfffc50c540d0> 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 0xfffc50c540d0> 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 0xfffc50c540d0> @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 0xfffc50df6210> 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 0xfffc50df6210> 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 0xfffc50df6210> 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.72 seconds ===================== ++ 23:04:31 starting module/micronumpy/test [106 started in total] __ module/math/test [103 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.17 seconds ==================== ++ 23:04:39 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.34 seconds ===================== ++ 23:05:17 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.11 seconds =========================== ++ 23:05:24 starting module/parser/test [109 started in total] __ module/imp/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 124 items module/imp/test/test_app.py ................ module/imp/test/test_import.py ..............................s.........................................................s................... ==================== 122 passed, 2 skipped in 83.94 seconds ==================== ++ 23:05:24 starting module/posix/test [110 started in total] __ module/parser/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 7 items module/parser/test/test_parser.py ....... =========================== 7 passed in 3.90 seconds =========================== ++ 23:05:30 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.51 seconds =========================== ++ 23:05:40 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.76 seconds ========================== ++ 23:06:24 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 0xfffc8f909650>, 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 0xfffc9482cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc9306e550>] 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 0xfffc9306e550>] 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 0xfffc9148ad20> 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 0xfffc9148a500> 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 0xfffc9148a500> 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 0xfffc9148a0f0> 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 0xfffc8f928320> 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 0xfffc8f928320> 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 0xfffc8f915e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0>) 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 0xfffc902fefd0>,) w_func = <Function test_popen> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0> 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 0xfffc902fefd0>,) 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 0xfffc902fefd0>,) 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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc8f7c15d0>, 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 0xfffc9482cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc9306e550>] 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 0xfffc9306e550>] 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 0xfffc8f1ddd70> 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 0xfffc8f1ddc30> 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 0xfffc8f1ddc30> 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 0xfffc8f1ddb90> 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 0xfffc8f1ddeb0> 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 0xfffc8f1ddeb0> 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 0xfffc8f9cdc50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0>) 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 0xfffc902fefd0>,) w_func = <Function test_popen_with> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0> 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 0xfffc902fefd0>,) 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 0xfffc902fefd0>,) 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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc8f7c18d0>, 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 0xfffc9482cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc9306e550>] 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 0xfffc9306e550>] 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 0xfffc8f52c1e0> 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 0xfffc8f52c410> 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 0xfffc8f52c410> 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 0xfffc8f52c2d0> 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 0xfffc8f52c5f0> 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 0xfffc8f52c5f0> 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 0xfffc8f20bbd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0>) 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 0xfffc902fefd0>,) w_func = <Function test_popen_child_fds> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc902fefd0> 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 0xfffc902fefd0>,) 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 0xfffc902fefd0>,) 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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc9045ea50> 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 0xfffc9045ea50> 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 0xfffc9045ea50> @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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc90606f90> 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 0xfffc8eed4c50>, 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 0xfffc9482cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc9306e550>] 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 0xfffc9306e550>] 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 0xfffc8e836e60> 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 0xfffc8e8365a0> 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 0xfffc8e8365a0> 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 0xfffc8e836b40> 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 0xfffc8e836f50> 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 0xfffc8e836f50> 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 0xfffc8e82b650> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc8e7f3e10>) 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 0xfffc8e7f3e10>,) w_func = <Function test_popen> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc8e7f3e10> 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 0xfffc8e7f3e10>,) 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 0xfffc8e7f3e10>,) 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 0xfffc8f443a90> 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 0xfffc8f443a90> 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 0xfffc8f443a90> @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 0xfffc8f443a90> 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 0xfffc8f443a90> 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 0xfffc8f443a90> @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 0xfffc8edd9810> 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 0xfffc8edd9810> 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 0xfffc8edd9810> 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 0xfffc8f27bed0>, 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 0xfffc9482cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc9306e550>] 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 0xfffc9306e550>] 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 0xfffc8e833e10> 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 0xfffc8e833fa0> 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 0xfffc8e833fa0> 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 0xfffc8e833f00> 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 0xfffc8e833c30> 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 0xfffc8e833c30> 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 0xfffc8f475150> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc8e7f3e10>) 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 0xfffc8e7f3e10>,) w_func = <Function test_popen_and_rebind_file_in___builtin__> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc8e7f3e10> 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 0xfffc8e7f3e10>,) 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 0xfffc8e7f3e10>,) 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 0xfffc8f443a90> 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 0xfffc8f443a90> 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 0xfffc8f443a90> @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 0xfffc8f443a90> 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 0xfffc8f443a90> 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 0xfffc8f443a90> @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 0xfffc8edd9810> 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 0xfffc8edd9810> 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 0xfffc8edd9810> 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.35 seconds =============== ++ 23:06:37 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 ===================== ++ 23:06:39 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 27.86 seconds ========================== ++ 23:07:11 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 0xfffca18dfcd0>, 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 0xfffca677cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffca4fbe550>] 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 0xfffca4fbe550>] 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 0xfffca18ed7d0> 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 0xfffca18edc30> 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 0xfffca18edc30> 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 0xfffca18ed730> 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 0xfffca18ed050> 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 0xfffca18ed050> 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 0xfffca18dfe50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1b7da10>) 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 0xfffca1b7da10>,) w_func = <Function test_write_close> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1b7da10> 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 0xfffca1b7da10>,) 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 0xfffca1b7da10>,) 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 0xfffca1c8bbd0> 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 0xfffca1c8bbd0> 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 0xfffca1c8bbd0> @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 0xfffca1bf0750> 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 0xfffca1bf0750> 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 0xfffca1bf0750> 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 0xfffca18df450>, 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 0xfffca677cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffca4fbe550>] 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 0xfffca4fbe550>] 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 0xfffca11f5b40> 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 0xfffca11f59b0> 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 0xfffca11f59b0> 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 0xfffca11f5e60> 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 0xfffca11f5f00> 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 0xfffca11f5f00> 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 0xfffca1707e50> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1b7da10>) 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 0xfffca1b7da10>,) w_func = <Function test_read_closed> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1b7da10> 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 0xfffca1b7da10>,) 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 0xfffca1b7da10>,) 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 0xfffca1c8bbd0> 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 0xfffca1c8bbd0> 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 0xfffca1c8bbd0> @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 0xfffca1bf0750> 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 0xfffca1bf0750> 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 0xfffca1bf0750> 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 0xfffca1c509d0>, 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 0xfffca677cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffca4fbe550>] 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 0xfffca4fbe550>] 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 0xfffca18833c0> 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 0xfffca102c780> 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 0xfffca102c780> 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 0xfffca102c460> 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 0xfffca102c550> 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 0xfffca102c550> 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 0xfffca1003cd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1210a50>) 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 0xfffca1210a50>,) w_func = <Function test_write_close> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1210a50> 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 0xfffca1210a50>,) 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 0xfffca1210a50>,) 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 0xfffca0f5c090> 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 0xfffca0f5c090> 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 0xfffca0f5c090> @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 0xfffca17a1150> 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 0xfffca17a1150> 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 0xfffca17a1150> 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 0xfffca1c50750>, 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 0xfffca677cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffca4fbe550>] 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 0xfffca4fbe550>] 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 0xfffca13a9e10> 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 0xfffca13a9b40> 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 0xfffca13a9b40> 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 0xfffca13a9eb0> 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 0xfffca13a9f50> 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 0xfffca13a9f50> 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 0xfffca1312850> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1210a50>) 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 0xfffca1210a50>,) w_func = <Function test_read_closed> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffca1210a50> 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 0xfffca1210a50>,) 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 0xfffca1210a50>,) 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 0xfffca0f5c090> 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 0xfffca0f5c090> 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 0xfffca0f5c090> @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 0xfffca17a1150> 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 0xfffca17a1150> 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 0xfffca17a1150> 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.79 seconds ================ ++ 23:07:28 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.43 seconds ========================== ++ 23:07:35 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.47 seconds ===================== ++ 23:07:43 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.68 seconds ====================== ++ 23:07:45 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.42 seconds ==================== ++ 23:08:56 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.47 seconds ========================== ++ 23:09:34 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 0xfffd4aa1cdd0> 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... [c58173420a1ae00] {translation-task starting annotate [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:183)acquire_maybe_in_new_thread [flowgraph] (rpython.rlib.rgil:160)release [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.rtyper.lltypesystem.rffi:873)get_nonmovingbuffer_ll [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.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 [c5817342f415500] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] RTyping... [c5817342f448380] {translation-task starting rtype_lltype [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.rstr:1293)ll_striter [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:785)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [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.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.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [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:350)ll_strlen [rtyper] specializing: 100 / 460 blocks (21%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [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: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 [flowgraph] (rpython.rtyper.lltypesystem.rlist:476)ll_listnext [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [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)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [flowgraph] (rpython.rtyper.lltypesystem.rlist:295)_ll_list_resize_le [flowgraph] (rpython.rlib.jit:281)isvirtual [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.rrange:172)ll_rangenext_up [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:218)ll_math_fmod [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: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] (?: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] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (rpython.rtyper.rint:149)ll_str [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.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:470)ll_listiter [rtyper] specializing: 300 / 882 blocks (34%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:354)ll_stritem_nonneg [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:275)ll_append_multiple_char [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:299)ll_jit_try_append_multiple_char [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:282)_ll_append_multiple_char [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:178)ll_append_char [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [rtyper] specializing: 400 / 942 blocks (42%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1046)ll_contains [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:445)ll_new [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 / 956 blocks (52%) [rtyper] specializing: 600 / 956 blocks (62%) [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:365)ll_shrink_final [flowgraph] (?:2)ll_shrink_array [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:346)ll_getlength [flowgraph] (rpython.rlib.rgc:468)ll_shrink_array [flowgraph] (?:2)ll_build_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rtyper.lltypesystem.rstr:362)ll_chr2str [flowgraph] (rpython.rtyper.rstr:890)ll_char_isdigit [rtyper] specializing: 700 / 1004 blocks (69%) [rtyper] specializing: 800 / 1004 blocks (79%) [flowgraph] (rpython.rtyper.rstr:930)ll_lower_char [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [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.rstr:856)ll_stringslice_startonly [rtyper] specializing: 900 / 1032 blocks (87%) [rtyper] specializing: 1000 / 1032 blocks (96%) [flowgraph] (rpython.rtyper.rbuiltin:240)ll_min [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:98)ll_math_isinf [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:91)ll_math_isnan [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 -=- [c581734659d0700] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] lltype back-end optimisations... [c581734659ff700] {translation-task starting backendopt_lltype [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_join_strs__v5___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__v10___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_listnext__listiterPtr [backendopt:removecasts] removed 1 cast_pointers in ll_rangenext_up__rangePtr_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 1 cast_pointers in _ll_stringslice__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 isconstant__v49___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 isconstant__v36___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v12___simple_call__function_is [backendopt:inlining] 0.00 ll_append_char__stringbuilderPtr_Char [backendopt:inlining] 0.00 conditional_call__v55___simple_call__function_co_star_2 [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_Signed [backendopt:inlining] 0.00 isconstant__v33___simple_call__function_is [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 isconstant__v46___simple_call__function_is [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 ll_append_multiple_char__stringbuilderPtr_Char_Signed [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 isconstant__v40___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v25___simple_call__function_is [backendopt:inlining] 0.00 _PyPy_dg_freedtoa__arrayPtr_star_1 [backendopt:inlining] 0.00 isvirtual__v8___simple_call__function_isv [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 ll_unsigned__Unsigned [backendopt:inlining] 0.00 gc_thread_die [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 isconstant__v7___simple_call__function_isc [backendopt:inlining] 0.00 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 isconstant__v51___simple_call__function_is [backendopt:inlining] 0.00 copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:inlining] 0.00 ll_getlength__stringbuilderPtr [backendopt:inlining] 0.00 memo_conststr_0 [backendopt:inlining] 0.00 isconstant__v29___simple_call__function_is [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 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 fmod__Float_Float_star_2 [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isconstant__v19___simple_call__function_is [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 isconstant__v53___simple_call__function_is [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 isvirtual__v31___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v57___simple_call__function_is [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 isconstant__v39___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 conditional_call__v41___simple_call__function_co_star_3 [backendopt:inlining] 0.00 _PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6 [backendopt:inlining] 0.00 conditional_call__v13___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v17___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 isconstant__v24___simple_call__function_is [backendopt:inlining] 0.00 fabs__Float_star_1 [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5 [backendopt:inlining] 0.00 isconstant__v14___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 RPyThreadStart__bootstrapConst_star_1 [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_fixed_newlist__GcArray_SignedLlT_Signed [backendopt:inlining] 2.00 ll_length__rpy_stringPtr [backendopt:inlining] 2.00 ll_unsigned__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_setitem_fast__arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ll_min__Unsigned_Unsigned [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_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 ll_math_isfinite__Float [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] 2.00 get_ident [backendopt:inlining] 5.00 allocate [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__v6___simple_call__function_loo [backendopt:inlining] 7.00 mallocstr__Signed [backendopt:inlining] 4.00 get_saved_errno [backendopt:inlining] 7.00 acquire [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [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] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_Signed [backendopt:inlining] 7.00 rpython_print_newline [backendopt:inlining] 7.00 llrepr_out__int [backendopt:inlining] 7.00 start_new_thread__bootstrap [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_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] 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] 11.00 ll_stringslice_startonly__rpy_stringPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_GCREFPtr [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_Char [backendopt:inlining] 12.00 ll_rangeiter__Ptr_GcStruct_rangeLlT_rangePtr [backendopt:inlining] 12.00 ll_striter__rpy_stringPtr [backendopt:inlining] 9.00 acquire_maybe_in_new_thread [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__v37___simple_call__function_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v30___simple_call__function_ll [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__v22___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v27___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 333 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__v13___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_list_resize_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v35___simple_call__function_co_star_3' [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__v41___simple_call__function_co_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__v55___simple_call__function_co_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 [c5817347be14100] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] already done: lltype back-end optimisations [translation:info] inserting stack checks... [c5817347be65f80] {translation-task starting stackcheckinsertion_lltype [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. [c5817347c999a80] translation-task} [translation:info] Creating database for generating c source... [c5817347c9a6d80] {translation-task starting database_c [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 [c5817347f703a00] translation-task} ____________________ TestUsingFramework.test_one_thread_rev ____________________ self = <pypy.module.thread.test.test_gil.TestUsingFramework object at 0xfffd486eb050> 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... [c58173489683e80] {translation-task starting annotate [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.rtyper.lltypesystem.rffi:3)ccall_RPyThreadStart [flowgraph] (rpython.rlib.rthread:124)get_or_make_ident [flowgraph] (rpython.rlib.rgil:160)release [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.rlib.rthread:114)get_ident [flowgraph] (rpython.rtyper.lltypesystem.rffi:1427)scoped_nonmovingbuffer.__init__ [flowgraph] (rpython.rtyper.lltypesystem.rffi:1431)scoped_nonmovingbuffer.__enter__ [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.rlib.rgil:201)yield_thread [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.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 [c5817349d677e00] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] RTyping... [c5817349d6a9e80] {translation-task starting rtype_lltype [flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:1)memo__ll_prebuilt_empty_array_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:820)ll_join_chars [flowgraph] (rpython.rtyper.lltypesystem.rstr:821)<lambda> [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)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:912)ll_listdelslice_startonly [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [flowgraph] (rpython.rtyper.lltypesystem.rlist:295)_ll_list_resize_le [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:2)ll_listdelslice_startonly_trampoline [flowgraph] (rpython.rlib.jit:269)isconstant [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:351)_ll_new_empty_item_array [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)<lambda> [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] (?:1)memo__ll_prebuilt_empty_array_0 [flowgraph] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_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.rtyper.lltypesystem.rstr:78)copy_string_contents [flowgraph] (rpython.rlib.jit:281)isvirtual [flowgraph] (?:2)ll_join_strs_trampoline [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [flowgraph] (rpython.rtyper.lltypesystem.rstr:350)ll_strlen [flowgraph] (rpython.rtyper.lltypesystem.rlist:476)ll_listnext [flowgraph] (rpython.rtyper.lltypesystem.rlist:372)ll_getitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rlist:369)ll_items [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:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [rtyper] specializing: 100 / 541 blocks (18%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1293)ll_striter [flowgraph] (rpython.rtyper.lltypesystem.rlist:470)ll_listiter [rtyper] specializing: 200 / 546 blocks (36%) [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:218)ll_math_fmod [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: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 [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.rint:149)ll_str [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.rlist:588)ll_append [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] (?: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] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up [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.rstr:1046)ll_contains [rtyper] specializing: 400 / 894 blocks (44%) [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:178)ll_append_char [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (?:2)ll_grow_by [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:94)ll_grow_by [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.rstr:354)ll_stritem_nonneg [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:328)ll_append_charpsize [flowgraph] (rpython.rtyper.lltypesystem.rstr:145)copy_raw_to_string [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 [rtyper] specializing: 500 / 971 blocks (51%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:362)ll_chr2str [rtyper] specializing: 600 / 974 blocks (61%) [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:445)ll_new [flowgraph] (?:11)ll_build_look_inside_iff [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)ll_build [flowgraph] (rpython.rtyper.lltypesystem.rbuilder:355)<lambda> [flowgraph] (rpython.rlib.jit:281)isvirtual [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 [rtyper] specializing: 700 / 1018 blocks (68%) [flowgraph] (rpython.rtyper.rstr:930)ll_lower_char [flowgraph] (rpython.rtyper.rstr:890)ll_char_isdigit [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [rtyper] specializing: 800 / 1030 blocks (77%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:856)ll_stringslice_startonly [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:98)ll_math_isinf [flowgraph] (rpython.rtyper.lltypesystem.module.ll_math:91)ll_math_isnan [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 -=- [c581734cbae4700] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] lltype back-end optimisations... [c581734cbb10c00] {translation-task starting backendopt_lltype [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_join_strs__v90___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__v96___simple_call__function_ll [backendopt:removecasts] removed 1 cast_pointers in ll_listnext__listiterPtr [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_rangenext_up__rangePtr_Signed [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 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 conditional_call__v104___simple_call__function_c_star_3 [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 ll_unsigned__Unsigned [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_Signed [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 copy_raw_to_string__arrayPtr_rpy_stringPtr_Signed_Signed [backendopt:inlining] 0.00 select__Signed_arrayPtr_arrayPtr_arrayPtr_timevalPtr_star_5 [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 isvirtual__v78___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v118___simple_call__function_i [backendopt:inlining] 0.00 _PyPy_dg_freedtoa__arrayPtr_star_1 [backendopt:inlining] 0.00 isconstant__v102___simple_call__function_i [backendopt:inlining] 0.00 conditional_call__v100___simple_call__function_c_star_3 [backendopt:inlining] 0.00 memo_conststr_0 [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 fabs__Float_star_1 [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 isconstant__v77___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v116___simple_call__function_i [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 isconstant__v81___simple_call__function_is [backendopt:inlining] 0.00 fmod__Float_Float_star_2 [backendopt:inlining] 0.00 isconstant__v99___simple_call__function_is [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isconstant__v109___simple_call__function_i [backendopt:inlining] 0.00 isvirtual__v70___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v103___simple_call__function_i [backendopt:inlining] 0.00 isconstant__v114___simple_call__function_i [backendopt:inlining] 0.00 isconstant__v98___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v69___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_foldable_nonnegCons_arrayPtr_Signed [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isvirtual__v94___simple_call__function_is [backendopt:inlining] 0.00 ll_getlength__stringbuilderPtr [backendopt:inlining] 0.00 conditional_call__v113___simple_call__function_c_star_2 [backendopt:inlining] 0.00 isvirtual__v121___simple_call__function_i [backendopt:inlining] 0.00 ll_append_char__stringbuilderPtr_Char [backendopt:inlining] 0.00 isconstant__v86___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v74___simple_call__function_is [backendopt:inlining] 0.00 _PyPy_dg_dtoa__Float_Signed_Signed_arrayPtr_arrayPtr_arrayPtr_star_6 [backendopt:inlining] 0.00 RPyThreadStart__bootstrapConst_star_1 [backendopt:inlining] 0.00 isconstant__v93___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v87___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 ll_append_multiple_char__stringbuilderPtr_Char_Signed [backendopt:inlining] 0.00 gc_thread_die [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 isconstant__v108___simple_call__function_i [backendopt:inlining] 0.00 conditional_call__v79___simple_call__function_co_star_3 [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 ll_length__listPtr [backendopt:inlining] 2.00 ll_strlen__rpy_stringPtr [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 setraw [backendopt:inlining] 2.00 getraw [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ll_fixed_newlist__GcArray_SignedLlT_Signed [backendopt:inlining] 2.00 ll_math_isnan__Float [backendopt:inlining] 2.00 ScopedAlloc_Struct timeval { c_tv_sec, c_tv_usec }.__enter__ [backendopt:inlining] 2.00 ll_length__rpy_stringPtr [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 get_or_make_raw [backendopt:inlining] 2.00 getraw [backendopt:inlining] 4.00 ll_str__StringR_Ptr_GcStruct_rpy_strin_rpy_stringPtr [backendopt:inlining] 4.00 ll_fixed_setitem_fast__arrayPtr_Signed_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 __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] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_Signed [backendopt:inlining] 4.00 ll_math_isfinite__Float [backendopt:inlining] 4.00 ll_min__Unsigned_Unsigned [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_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] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 7.00 ll_str__IntegerR_SignedConst_Signed [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [backendopt:inlining] 7.00 rpython_print_newline [backendopt:inlining] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_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 start_new_thread__bootstrap [backendopt:inlining] 7.00 llrepr_out__int [backendopt:inlining] 7.50 mallocstr__Signed [backendopt:inlining] 7.50 ll_char_isdigit__Char [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_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] 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] 6.00 ll_setitem_fast__listPtr_Signed_GCREFPtr [backendopt:inlining] 6.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 6.00 ll_setitem_fast__listPtr_Signed_Char [backendopt:inlining] 11.00 ll_stringslice_startonly__rpy_stringPtr_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__v75___simple_call__function_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v82___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] 6.75 loop_unrolling_heuristic__v92___simple_call__function_lo [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__v66___simple_call__function__e [backendopt:inlining] 19.25 _errno_after__v125___simple_call__function__ [backendopt:inlining] 19.25 _errno_after__v64___simple_call__function__e [backendopt:inlining] 26.16 ll_join_chars__v67___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v72___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__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 330 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_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v79___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__v100___simple_call__function_c_star_3' [backendopt:malloc] 5 simple mallocs removed in 'll_math_fmod__Float_Float' [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_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v104___simple_call__function_c_star_3' [backendopt:malloc] 1 simple mallocs removed in 'll_append_char__stringbuilderPtr_Char' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v113___simple_call__function_c_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 [c581734e1ea8800] translation-task} [translation:info] usession directory: /tmp/pytest/usession-main-3767 [translation:info] already done: Annotating&simplifying [translation:info] already done: RTyping [translation:info] already done: lltype back-end optimisations [translation:info] inserting stack checks... [c581734e1efb600] {translation-task starting stackcheckinsertion_lltype [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. [c581734e298ec80] translation-task} [translation:info] Creating database for generating c source... [c581734e299ee80] {translation-task starting database_c [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 [c581734e3fbff00] translation-task} __________________________ 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 0xfffd4842bf50>, 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 0xfffd4f24cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd4da8e550>] 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 0xfffd4da8e550>] 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 0xfffd3be88f00> 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 0xfffd48441fa0> 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 0xfffd48441fa0> 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 0xfffd48441500> 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 0xfffd485f7550> 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 0xfffd485f7550> 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 0xfffd3bb8c8d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd48743a50>) 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 0xfffd48743a50>,) w_func = <Function test_local_1> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd48743a50> 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 0xfffd48743a50>,) 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 0xfffd48743a50>,) 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 0xfffd48743a50>]) 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 0xfffd48743a50>]) 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 0xfffd4af773d0> 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 0xfffd4af773d0> 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 0xfffd4af773d0> @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 0xfffd4b1b7e50> 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 0xfffd4b1b7e50> 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 0xfffd4b1b7e50> 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 0xfffd3bb8c550>, 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 0xfffd4f24cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffd4da8e550>] 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 0xfffd4da8e550>] 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 0xfffd48d7ad20> 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 0xfffd48d7a050> 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 0xfffd48d7a050> 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 0xfffd48d7a820> 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 0xfffd48d7a960> 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 0xfffd48d7a960> 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 0xfffd48ab9bd0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd48743a50>) 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 0xfffd48743a50>,) w_func = <Function test_local_is_not_immortal> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffd48743a50> 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 0xfffd48743a50>,) 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 0xfffd48743a50>,) 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 0xfffd48743a50>]) 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 0xfffd48743a50>]) 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 0xfffd4af773d0> 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 0xfffd4af773d0> 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 0xfffd4af773d0> @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 0xfffd4b1b7e50> 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 0xfffd4b1b7e50> 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 0xfffd4b1b7e50> 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 0xfffd48654890> 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 111.24 seconds =============== ++ 23:09:41 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 0xffff827883d0>, 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 0xffff91c2cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xffff9046cb90>] 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 0xffff9046cb90>] 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 0xffff827b3b40> 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 0xffff827b3140> 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 0xffff827b3140> 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 0xffff827b3be0> 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 0xffff827b35f0> 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 0xffff827b35f0> 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 0xffff827505d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff82781890>) 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 0xffff82781890>,) w_func = <Function test_keep_object_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xffff82781890> 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 0xffff82781890>,) 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 0xffff82781890>,) 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 0xffff84a5b190> 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 0xffff84a5b190> 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 0xffff84a5b190> @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 0xffff84a17690> 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 0xffff84a17690> 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 0xffff84a17690> 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 314.79 seconds ============== ++ 23:09:49 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.74 seconds ===================== ++ 23:10:22 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.08 seconds ========================== ++ 23:10:36 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 565.10 seconds ==================== ++ 23:11:13 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.50 seconds ===================== ++ 23:11:25 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... [c58174c7d43d800] {translation-task starting annotate [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.rlib.rposix_stat:637)lstat [flowgraph] (rpython.rtyper.lltypesystem.lltype:2296)scoped_alloc [flowgraph] (rpython.rtyper.lltypesystem.rffi:1433)scoped_nonmovingbuffer.__exit__ [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.rtyper.lltypesystem.rffi:937)free_nonmovingbuffer_ll [flowgraph] (rpython.rtyper.lltypesystem.rffi:3)ccall_write [flowgraph] (rpython.rlib.rgil:160)release [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:151)_errno_before [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rthread:349)getraw [flowgraph] (rpython.rlib.rposix:385)_as_bytes0 [flowgraph] (rpython.rlib.rposix:170)_errno_after [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.rposix:371)_as_bytes [flowgraph] (rpython.rlib.rthread:364)setraw [flowgraph] (rpython.rlib.rthread:364)setraw [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.rtyper.lltypesystem.rffi:278)stat [flowgraph] (rpython.rlib.rposix_environ:66)get_get [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_itemoffsetof_0 [flowgraph] (?:1)memo__make_scoped_allocator_0 [flowgraph] (?:1)memo__isfunctype_0 [flowgraph] (?:1)memo__isfunctype_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 [c58174ca4a95280] translation-task} [translation:info] RTyping... [c58174ca4aa7980] {translation-task starting rtype_lltype [flowgraph] (rpython.rtyper.rclass:1170)ll_runtime_type_info [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: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:912)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.rlist:539)ll_null_item [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:1300)conditional_call [flowgraph] (rpython.rlib.jit:269)isconstant [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)<lambda> [flowgraph] (rpython.rlib.jit:269)isconstant [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [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.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_write [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rstr:860)ll_stringslice_startstop [flowgraph] (rpython.rtyper.lltypesystem.rstr:840)_ll_stringslice [flowgraph] (rpython.rtyper.lltypesystem.rstr:78)copy_string_contents [flowgraph] (?:1)memo_emptystrfun_0 [flowgraph] (rpython.rtyper.lltypesystem.rstr:350)ll_strlen [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:785)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rstr:783)ll_join_strs [flowgraph] (rpython.rtyper.lltypesystem.llmemory:1037)cast_any_ptr [flowgraph] (rpython.rlib.jit:294)loop_unrolling_heuristic [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 [rtyper] specializing: 100 / 866 blocks (11%) [flowgraph] (rpython.rtyper.rlist:572)ll_len [rtyper] specializing: 200 / 868 blocks (23%) [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:269)isconstant [flowgraph] (rpython.rlib.jit:1300)conditional_call [flowgraph] (rpython.rtyper.lltypesystem.rlist:377)ll_setitem_fast [flowgraph] (rpython.rtyper.rlist:792)ll_extend_with_str [flowgraph] (rpython.rtyper.rlist:795)ll_extend_with_str_slice_startonly [flowgraph] (rpython.rtyper.lltypesystem.rstr:354)ll_stritem_nonneg [flowgraph] (rpython.rtyper.rlist:547)listItemType [flowgraph] (rpython.rtyper.rlist:572)ll_len [flowgraph] (rpython.rtyper.lltypesystem.rlist:365)ll_length [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.rtyper.lltypesystem.rlist:369)ll_items [flowgraph] (rpython.rtyper.lltypesystem.rstr:601)ll_streq [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 [rtyper] specializing: 300 / 937 blocks (32%) [flowgraph] (rpython.rtyper.lltypesystem.rrange:70)ll_newrange [flowgraph] (rpython.rtyper.lltypesystem.rrange:91)ll_rangeiter [flowgraph] (rpython.rtyper.lltypesystem.rlist:357)ll_newemptylist [flowgraph] (rpython.rtyper.lltypesystem.rlist:351)_ll_new_empty_item_array [flowgraph] (?:1)memo__ll_prebuilt_empty_array_0 [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.rtyper.lltypesystem.rstr:1293)ll_striter [flowgraph] (rpython.rtyper.lltypesystem.rstr:425)ll_strconcat [flowgraph] (rpython.rtyper.lltypesystem.rstr:416)ll_length [rtyper] specializing: 400 / 968 blocks (41%) [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_open [flowgraph] (rpython.rtyper.rrange:172)ll_rangenext_up [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [rtyper] specializing: 500 / 973 blocks (51%) [flowgraph] (rpython.rtyper.lltypesystem.rstr:1306)ll_strnext [flowgraph] (rpython.translator.sandbox.rsandbox:157)sandboxed_ll_os.ll_os_stat [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)<lambda> [flowgraph] (rpython.rtyper.lltypesystem.rlist:198)_ll_list_resize_hint_really [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] (?:1)memo__contains_gcptr_0 [flowgraph] (?:1)memo_itemoffsetof_0 [flowgraph] (?:1)memo__sizeof_none_0 [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_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 / 1061 blocks (56%) [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: 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:487)load_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:473)dump_tuple [flowgraph] (rpython.rlib.rmarshal:473)dump_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:147)load_bool [flowgraph] (rpython.rlib.rmarshal:166)load_int_nonneg [flowgraph] (rpython.rlib.rmarshal:133)load_none [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 [flowgraph] (rpython.rtyper.rint:434)ll_uint_py_div [rtyper] specializing: 1200 / 1212 blocks (99%) [flowgraph] (rpython.rtyper.rint:525)ll_uint_py_mod [rtyper] -=- specialized 143 more blocks -=- [flowgraph] (rpython.rtyper.rclass:1133)ll_issubclass [flowgraph] (rpython.rtyper.rclass:1130)ll_type [rtyper] -=- specialized 4 more blocks -=- [c58174ce94fe100] translation-task} [translation:info] lltype back-end optimisations... [c58174ce950b580] {translation-task starting backendopt_lltype [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 _ll_stringslice__rpy_stringPtr_Signed_Signed [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__v43___simple_call__function_ll [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 1 cast_pointers in ll_rangenext_up__rangePtr_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 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_bool [backendopt:removecasts] removed 1 cast_pointers in load_int_nonneg [backendopt:removecasts] removed 1 cast_pointers in load_none [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_3 [backendopt:inlining] 0.00 widen__int [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 _get_raw_buf__rpy_string [backendopt:inlining] 0.00 memo_ll_constant_0 [backendopt:inlining] 0.00 isconstant__v46___simple_call__function_is [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 isconstant__v32___simple_call__function_is [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 conditional_call__v47___simple_call__function_co_star_3 [backendopt:inlining] 0.00 isconstant__v25___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v27___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 0.00 copy_raw_to_string [backendopt:inlining] 0.00 isconstant__v49___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v41___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v40___simple_call__function_is [backendopt:inlining] 0.00 strerror__Signed_star_1 [backendopt:inlining] 0.00 isatty__Signed_star_1 [backendopt:inlining] 0.00 getcwd__arrayPtr_Signed_star_2 [backendopt:inlining] 0.00 conditional_call__v26___simple_call__function_co_star_3 [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_checkidxConst_ll_getitem_fastConst_listPtr_Signed [backendopt:inlining] 0.00 alloc_buffer [backendopt:inlining] 0.00 memo__sizeof_none_0 [backendopt:inlining] 0.00 get_nonmovingbuffer_ll [backendopt:inlining] 0.00 isconstant__v56___simple_call__function_is [backendopt:inlining] 0.00 memo_emptystrfun_0 [backendopt:inlining] 0.00 isconstant__v34___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_fast__listPtr_Signed [backendopt:inlining] 0.00 close__Signed_star_1 [backendopt:inlining] 0.00 open__SomeString_Signed_Signed_star_3 [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 _as_bytes__str [backendopt:inlining] 0.00 _PyPy_dg_strtod__arrayPtr_arrayPtr_star_2 [backendopt:inlining] 0.00 memo__ll_prebuilt_empty_array_0 [backendopt:inlining] 0.00 __exit____star_3 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 gc_thread_run [backendopt:inlining] 0.00 ll_setitem_nonneg__dum_nocheckConst_arrayPtr_Signed_GCREFPtr [backendopt:inlining] 0.00 write__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 cast_any_ptr__Ptr_GcStruct_rpy_stringLlT_rpy_stringPtr [backendopt:inlining] 0.00 isconstant__v22___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v16___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v17___simple_call__function_is [backendopt:inlining] 0.00 isvirtual__v23___simple_call__function_is [backendopt:inlining] 0.00 get_get [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 isconstant__v55___simple_call__function_is [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__init__ [backendopt:inlining] 0.00 copy_string_to_raw [backendopt:inlining] 0.00 get_nonmovingbuffer_ll_final_null [backendopt:inlining] 0.00 copy_string_contents__rpy_stringPtr_rpy_stringPtr_Signed_Signed_Signed [backendopt:inlining] 0.00 isconstant__v51___simple_call__function_is [backendopt:inlining] 0.00 isconstant__v45___simple_call__function_is [backendopt:inlining] 0.00 ll_getitem_nonneg__dum_nocheckConst_ll_getitem_fastConst_listPtr_Signed [backendopt:inlining] 0.00 read__Signed_arrayPtr_Signed_star_3 [backendopt:inlining] 0.00 stat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 lstat__SomeString_statPtr_star_2 [backendopt:inlining] 0.00 scoped_nonmovingbuffer.__enter__ [backendopt:inlining] 0.00 get_items [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_length__listPtr [backendopt:inlining] 2.00 ll_items__listPtr [backendopt:inlining] 2.00 ScopedAlloc_Array of Char {'nolength': True} .__enter__ [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 S_IFMT [backendopt:inlining] 2.00 ll_unsigned__Signed [backendopt:inlining] 2.00 ll_uint_py_div__Unsigned_Unsigned [backendopt:inlining] 2.00 ll_uint_py_mod__Unsigned_Unsigned [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] 2.00 ll_fixed_length__arrayPtr [backendopt:inlining] 4.00 ll_str__StringR_Ptr_GcStruct_rpy_strin_rpy_stringPtr [backendopt:inlining] 4.00 ll_fixed_setitem_fast__arrayPtr_Signed_GCREFPtr [backendopt:inlining] 4.00 ll_stritem_nonneg__rpy_stringPtr_Signed [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 __exit____star_3 [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 copy_item__arrayPtr_arrayPtr_Signed_Signed [backendopt:inlining] 4.00 ScopedAlloc_Array of Char {'nolength': True} .__init__ [backendopt:inlining] 4.00 Loader.__init__ [backendopt:inlining] 4.00 ll_fixed_getitem_fast__arrayPtr_Signed [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] 6.75 loop_unrolling_heuristic__v39___simple_call__function_lo [backendopt:inlining] 7.00 mallocstr [backendopt:inlining] 4.00 get_saved_errno [backendopt:inlining] 7.00 dump_int [backendopt:inlining] 0.00 _as_bytes0__str [backendopt:inlining] 7.00 rstring_to_float [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 2.00 ll_len__listPtr [backendopt:inlining] 7.00 ll_listdelslice_startonly_look_inside_iff__listPtr_Signed [backendopt:inlining] 7.00 dump_none [backendopt:inlining] 4.00 ll_getitem_foldable_nonneg__arrayPtr_Signed [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_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] 4.00 S_ISDIR [backendopt:inlining] 4.00 S_ISREG [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_getitem_fast__listPtr_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] 11.00 ll_extend_with_str__listPtr_rpy_stringPtr_ll_strlenConst_ll_stritem_nonnegConst [backendopt:inlining] 8.00 FdLoader.__init__ [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.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__v20___simple_call__function_ll [backendopt:inlining] 9.00 ll_listdelslice_startonly__v29___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__v14___simple_call__function_ll [backendopt:inlining] 26.16 ll_join_chars__v19___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__write [backendopt:inlining] 31.75 handle_posix_error__close [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 509 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_le__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v26___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] 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 '_ll_list_resize_ge__listPtr_Signed' [backendopt:malloc] 1 simple mallocs removed in 'conditional_call__v50___simple_call__function_co_star_3' [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 [c58174d0a23c900] translation-task} [translation:info] inserting stack checks... [c58174d0a24f200] {translation-task starting stackcheckinsertion_lltype [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. [c58174d0af7b180] translation-task} [translation:info] Creating database for generating c source... [c58174d0af89380] {translation-task starting database_c [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 [c58174d0c8e7400] translation-task} =========================== 1 error in 6.21 seconds ============================ ++ 23:11:32 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.09 seconds ====================== ++ 23:11:34 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.08 seconds =========================== ++ 23:11:36 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 129.84 seconds ========================== ++ 23:11:44 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 18.32 seconds ===================== ++ 23:12:05 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.69 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.22 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 273.87 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 ......F................................................................ 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 0xfffc49e9fdd0>, 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 0xfffc5031cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc4eb5e550>] 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 0xfffc4eb5e550>] 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 0xfffc49b6f5a0> 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 0xfffc49b6f690> 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 0xfffc49b6f690> 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 0xfffc49b6f550> 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 0xfffc49b6f640> 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 0xfffc49b6f640> 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 0xfffc4c148350> 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 0xfffc4c148350> 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 0xfffc4c148350> @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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc49f2fdd0>, 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 0xfffc5031cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc4eb5e550>] 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 0xfffc4eb5e550>] 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 0xfffc491d0dc0> 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 0xfffc491d0d20> 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 0xfffc491d0d20> 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 0xfffc491d0cd0> 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 0xfffc491d0e10> 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 0xfffc491d0e10> 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 0xfffc4c148350> 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 0xfffc4c148350> 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 0xfffc4c148350> @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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc49b0d450>, 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 0xfffc5031cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc4eb5e550>] 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 0xfffc4eb5e550>] 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 0xfffc49b15be0> 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 0xfffc49b15e10> 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 0xfffc49b15e10> 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 0xfffc4942b190> 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 0xfffc4942b370> 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 0xfffc4942b370> 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 0xfffc4c148350> 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 0xfffc4c148350> 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 0xfffc4c148350> @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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc4c3a8ed0> 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 0xfffc47c602d0>, 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 0xfffc5031cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc4eb5e550>] 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 0xfffc4eb5e550>] 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 0xfffc47d43730> 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 0xfffc47d433c0> 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 0xfffc47d433c0> 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 0xfffc47d439b0> 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 0xfffc47d434b0> 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 0xfffc47d434b0> 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 0xfffc47c603d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc47ddfa90>) 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 0xfffc47ddfa90>,) w_func = <Function test_dont_keep_class_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc47ddfa90> 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 0xfffc47ddfa90>,) 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 0xfffc47ddfa90>,) 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 0xfffc497931d0> 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 0xfffc497931d0> 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 0xfffc497931d0> @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 0xfffc497931d0> 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 0xfffc497931d0> 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 0xfffc497931d0> @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 0xfffc49b91cd0> 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 0xfffc49b91cd0> 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 0xfffc49b91cd0> 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 0xfffc479f4ad0>, 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 0xfffc5031cf50> hook = <_HookCaller 'pytest_runtest_call'> methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0xfffc4eb5e550>] 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 0xfffc4eb5e550>] 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 0xfffc4745e4b0> 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 0xfffc4745e6e0> 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 0xfffc4745e6e0> 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 0xfffc4745e780> 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 0xfffc4745e5a0> 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 0xfffc4745e5a0> 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 0xfffc479115d0> args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc47ddfa90>) 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 0xfffc47ddfa90>,) w_func = <Function test_instance_keeps_class_alive> args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc47ddfa90> 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 0xfffc47ddfa90>,) 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 0xfffc47ddfa90>,) 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 0xfffc497931d0> 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 0xfffc497931d0> 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 0xfffc497931d0> @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 0xfffc497931d0> 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 0xfffc497931d0> 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 0xfffc497931d0> @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 0xfffc49b91cd0> 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 0xfffc49b91cd0> 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 0xfffc49b91cd0> 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 ____________________ AppTestMethodCaching.test_mutate_class ____________________ self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0xfffc482e4350> def test_mutate_class(self): > @self.retry def run(): import __pypy__ [/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_methodcache.py:177]:2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ run = <Function run> > ??? ?:10: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ @self.retry def run(): import __pypy__ class A(object): x = 1 y = 2 __pypy__.reset_method_cache_counter() a = A() for i in range(100): assert a.y == 2 assert a.x == i + 1 A.x += 1 cache_counter = __pypy__.method_cache_counter("x") # XXX this is the bad case for the mapdict cache: looking up # non-method attributes from the class > assert cache_counter[0] >= 450 E (application-level) AssertionError: assert 398 >= 450 [/build_dir/own-linux-aarch64/build/pypy/objspace/std/test/test_methodcache.py:177]:17: AssertionError =========================== 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 FAIL objspace/std/test/test_methodcache.py::AppTestMethodCaching::()::test_mutate_class ============= 6 failed, 2092 passed, 32 skipped in 251.21 seconds ============== program finished with exit code 1 elapsedTime=2096.876205