pypy/module/array/test/test_array.py::AppTestArray::()::test_fromstring
self = <CallInfo when='setup' exception: assert 0 == 4936
+ where 0 = 0
+ where 0 = <rpython.rlib.rgil.EmulatedGilHolde...der instance at 0x000001f69bdd19e0>> = <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>._get_ident>
func = <function <lambda> at 0x000001f6a1d331f0>, when = 'setup'
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_setup'>
kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromstring'>}
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 0x000001f6992f3440>
hook = <_HookCaller 'pytest_runtest_setup'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x000001f69abd1020>, <_pytest.vendored_packages.pluggy.HookImp...y.HookImpl instance at 0x000001f6997c6660>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x000001f6997c66a0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromstring'>}
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_setup'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x000001f69abd1020>, <_pytest.vendored_packages.pluggy.HookImp...y.HookImpl instance at 0x000001f6997c6660>, <_pytest.vendored_packages.pluggy.HookImpl instance at 0x000001f6997c66a0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromstring'>}
self._inner_hookexec = lambda hook, methods, kwargs: \
> _MultiCall(methods, kwargs, hook.spec_opts).execute()
..\_pytest\vendored_packages\pluggy.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_setup at 0x000001f69f6cfc90>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a32d3520>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a32d3520>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>>
def __init__(self, func):
try:
> self.result = func()
..\_pytest\vendored_packages\pluggy.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 5 meths, kwargs={'item': <AppTestMethod 'test_fromstring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.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_fromstring'>
@pytest.hookimpl(tryfirst=True)
def pytest_runtest_setup(item):
if isinstance(item, pytest.Function):
config = item.config
if get_marker(item, name='pypy_only'):
if config.applevel is not None and not config.applevel.is_pypy:
pytest.skip('PyPy-specific test')
appclass = item.getparent(pytest.Class)
if appclass is not None:
from pypy.tool.pytest.objspace import gettestobjspace
# Make cls.space and cls.runappdirect available in tests.
spaceconfig = getattr(appclass.obj, 'spaceconfig', {})
> appclass.obj.space = gettestobjspace(**spaceconfig)
conftest.py:259:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kwds = {'usemodules': ['array', 'struct', 'binascii']}
config = <rpython.config.config.Config object at 0x000001f6a21c1d00>
key = (((True, True, True, False, True, False, ...), True, None, False, None, False, ...), False, (False, 'lltype', 'c', False, True, 'ref', ...))
def gettestobjspace(**kwds):
""" helper for instantiating and caching spaces for testing.
"""
try:
config = make_config(option, **kwds)
except ConflictConfigError as e:
# this exception is typically only raised if a module is not available.
# in this case the test should be skipped
py.test.skip(str(e))
if getattr(option, 'runappdirect', None):
return TinyObjSpace()
key = config.getkey()
try:
return _SPACECACHE[key]
except KeyError:
> space = maketestobjspace(config)
tool\pytest\objspace.py:24:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
config = <rpython.config.config.Config object at 0x000001f6a21c1d00>
def maketestobjspace(config=None):
if config is None:
config = make_config(option)
if config.objspace.usemodules.thread:
config.translation.thread = True
config.objspace.extmodules = 'pypy.tool.pytest.fake_pytest'
> space = make_objspace(config)
tool\pytest\objspace.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
config = <rpython.config.config.Config object at 0x000001f6a21c1d00>
def make_objspace(config):
from pypy.objspace.std.objspace import StdObjSpace
> return StdObjSpace(config)
tool\option.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace
config = <rpython.config.config.Config object at 0x000001f6a21c1d00>
@not_rpython
def __init__(self, config=None):
"Basic initialization of objects."
self.w_default_importlib_import = None
self.fromcache = InternalSpaceCache(self).getorbuild
self.threadlocals = ThreadLocals()
# set recursion limit
# sets all the internal descriptors
if config is None:
from pypy.config.pypyoption import get_pypy_config
config = get_pypy_config(translating=False)
self.config = config
self.reverse_debugging = config.translation.reverse_debugger
self.builtin_modules = {}
self.reloading_modules = {}
self.interned_strings = make_weak_value_dictionary(self, str, W_Root)
self.actionflag = ActionFlag() # changed by the signal module
self.check_signal_action = None # changed by the signal module
make_finalizer_queue(W_Root, self)
self._code_of_sys_exc_info = None
self._builtin_functions_by_identifier = {'': None}
# can be overridden to a subclass
> self.initialize()
interpreter\baseobjspace.py:458:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace
@not_rpython
def initialize(self):
"""only for initializing the space
Setup all the object types and implementations.
"""
setup_prebuilt(self)
self.FrameClass = frame.build_frame(self)
self.StringObjectCls = W_BytesObject
self.UnicodeObjectCls = W_UnicodeObject
self.IntObjectCls = W_IntObject
self.FloatObjectCls = W_FloatObject
# singletons
self.w_None = W_NoneObject.w_None
self.w_False = W_BoolObject.w_False
self.w_True = W_BoolObject.w_True
self.w_NotImplemented = self.wrap(special.NotImplemented())
self.w_Ellipsis = self.wrap(special.Ellipsis())
self.w_DisallowNew = self.wrap(special.DisallowNew())
# types
builtin_type_classes = {
W_BoolObject.typedef: W_BoolObject,
W_BytearrayObject.typedef: W_BytearrayObject,
W_BytesObject.typedef: W_BytesObject,
W_ComplexObject.typedef: W_ComplexObject,
W_DictMultiObject.typedef: W_DictMultiObject,
W_FloatObject.typedef: W_FloatObject,
W_IntObject.typedef: W_AbstractIntObject,
W_AbstractSeqIterObject.typedef: W_AbstractSeqIterObject,
W_ListObject.typedef: W_ListObject,
W_MemoryView.typedef: W_MemoryView,
W_NoneObject.typedef: W_NoneObject,
W_ObjectObject.typedef: W_ObjectObject,
W_SetObject.typedef: W_SetObject,
W_FrozensetObject.typedef: W_FrozensetObject,
W_SliceObject.typedef: W_SliceObject,
W_TupleObject.typedef: W_TupleObject,
W_TypeObject.typedef: W_TypeObject,
W_UnicodeObject.typedef: W_UnicodeObject,
}
self.builtin_types = {}
self._interplevel_classes = {}
for typedef, cls in builtin_type_classes.items():
w_type = self.gettypeobject(typedef)
self.builtin_types[typedef.name] = w_type
setattr(self, 'w_' + typedef.name, w_type)
self._interplevel_classes[w_type] = cls
# The loop above sets space.w_str and space.w_bytes.
# We rename 'space.w_str' to 'space.w_unicode' and
# 'space.w_text'.
self.w_unicode = self.w_str
self.w_text = self.w_str
del self.w_str
self.w_long = self.w_int
self.w_dict.flag_map_or_seq = 'M'
from pypy.objspace.std import dictproxyobject
dictproxyobject._set_flag_map_or_seq(self)
self.w_list.flag_map_or_seq = 'S'
self.w_tuple.flag_map_or_seq = 'S'
self.builtin_types['str'] = self.w_unicode
self.builtin_types['bytes'] = self.w_bytes
self.builtin_types["NotImplemented"] = self.w_NotImplemented
self.builtin_types["Ellipsis"] = self.w_Ellipsis
# exceptions & builtins
self.make_builtins()
# final setup
> self.setup_builtin_modules()
objspace\std\objspace.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace
@not_rpython
def setup_builtin_modules(self):
"only for initializing the space."
if self.config.objspace.usemodules.cpyext:
# Special-case this to have state.install_dll() called early, which
# is required to initialise sys on Windows.
from pypy.module.cpyext.state import State
self.fromcache(State).build_api()
elif self.config.objspace.usemodules._cffi_backend:
from pypy.module._cffi_backend import copy_includes
copy_includes.main()
# now we can setup _frozen_importlib, after the dll is installed
> self.install_mixedmodule('_frozen_importlib')
interpreter\baseobjspace.py:722:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, mixedname = '_frozen_importlib'
@not_rpython
def install_mixedmodule(self, mixedname):
> self.setbuiltinmodule(mixedname)
interpreter\baseobjspace.py:707:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, pkgname = '_frozen_importlib'
@not_rpython
def setbuiltinmodule(self, pkgname):
"""load a lazy pypy/module and put it into sys.modules"""
if '.' in pkgname:
fullname = "%s.moduledef" % (pkgname,)
importname = pkgname.rsplit('.', 1)[1]
else:
fullname = "pypy.module.%s.moduledef" % pkgname
importname = pkgname
Module = __import__(fullname,
None, None, ["Module"]).Module
if Module.applevel_name is not None:
name = Module.applevel_name
else:
name = importname
mod = Module(self, self.newtext(name))
> mod.install()
interpreter\baseobjspace.py:545:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module._frozen_importlib.moduledef.Module object at 0x000001f6a4ed4138>
def install(self):
"""NOT_RPYTHON"""
from pypy.module.imp import interp_imp
super(Module, self).install()
space = self.space
# "import importlib/_boostrap_external.py"
w_mod = Module(space, space.wrap("_frozen_importlib_external"))
# hack: inject MAGIC_NUMBER into this module's dict
space.setattr(w_mod, space.wrap('MAGIC_NUMBER'),
interp_imp.get_magic(space))
self._compile_bootstrap_module(
> space, '_bootstrap_external', w_mod.w_name, w_mod.w_dict)
module\_frozen_importlib\moduledef.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, name = '_bootstrap_external'
w_name = W_UnicodeObject('_frozen_importlib_external')
w_dict = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4ed4410>)
directory = 'importlib'
@staticmethod
def _compile_bootstrap_module(space, name, w_name, w_dict, directory="importlib"):
"""NOT_RPYTHON"""
with open(os.path.join(lib_python, directory, name + '.py')) as fp:
source = fp.read()
pathname = "<frozen %s>" % (directory + "." + name).lstrip(".")
code_w = Module._cached_compile(space, name, source,
pathname, 'exec', 0)
space.setitem(w_dict, space.wrap('__name__'), w_name)
space.setitem(w_dict, space.wrap('__origname__'), w_name)
space.setitem(w_dict, space.wrap('__builtins__'),
space.wrap(space.builtin))
> code_w.exec_code(space, w_dict, w_dict)
module\_frozen_importlib\moduledef.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <code object <module>, file "<frozen importlib._bootstrap_external>", line 1>
space = StdObjSpace
w_globals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4ed4410>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4ed4410>)
w_closure = None
def exec_code(self, space, w_globals, w_locals, w_closure=None):
"Implements the 'exec' statement."
# this should be on PyCode?
frame = space.createframe(self, w_globals, w_closure)
frame.setdictscope(w_locals, skip_free_vars=w_closure is not None)
> return frame.run()
interpreter\eval.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
name = None, qualname = None
def run(self, name=None, qualname=None):
"""Start this frame's execution."""
if self._is_generator_or_coroutine():
return self.initialize_as_generator(name, qualname)
else:
> return self.execute_frame(None)
interpreter\pyframe.py:257:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
w_arg_or_err = None
def execute_frame(self, w_arg_or_err=None):
"""Execute this frame. Main entry point to the interpreter.
'w_arg_or_err' is non-None iff we are starting or resuming
a generator or coroutine frame; in that case, w_arg_or_err
is the input argument -or- an SApplicationException instance.
"""
from pypy.interpreter import pyopcode as pyopcode
# the following 'assert' is an annotation hint: it hides from
# the annotator all methods that are defined in PyFrame but
# overridden in the {,Host}FrameClass subclasses of PyFrame.
assert (isinstance(self, self.space.FrameClass) or
not self.space.config.translating)
executioncontext = self.space.getexecutioncontext()
executioncontext.enter(self)
got_exception = True
w_exitvalue = self.space.w_None
try:
executioncontext.call_trace(self)
#
# Execution starts just after the last_instr. Initially,
# last_instr is -1. After a generator suspends it points to
# the YIELD_VALUE/YIELD_FROM instruction.
try:
try:
if w_arg_or_err is None:
assert self.last_instr == -1
next_instr = r_uint(0)
else:
next_instr = self.resume_execute_frame(w_arg_or_err)
except pyopcode.Yield:
w_exitvalue = self.popvalue()
else:
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:354:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
e = AssertionError(u'assert 0 == 4936\n + where 0 = 0\n + where 0 = <rpython.r...ython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>._get_ident',)
def _convert_unexpected_exception(self, e):
from pypy.interpreter import error
> operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:845:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
w_arg_or_err = None
def execute_frame(self, w_arg_or_err=None):
"""Execute this frame. Main entry point to the interpreter.
'w_arg_or_err' is non-None iff we are starting or resuming
a generator or coroutine frame; in that case, w_arg_or_err
is the input argument -or- an SApplicationException instance.
"""
from pypy.interpreter import pyopcode as pyopcode
# the following 'assert' is an annotation hint: it hides from
# the annotator all methods that are defined in PyFrame but
# overridden in the {,Host}FrameClass subclasses of PyFrame.
assert (isinstance(self, self.space.FrameClass) or
not self.space.config.translating)
executioncontext = self.space.getexecutioncontext()
executioncontext.enter(self)
got_exception = True
w_exitvalue = self.space.w_None
try:
executioncontext.call_trace(self)
#
# Execution starts just after the last_instr. Initially,
# last_instr is -1. After a generator suspends it points to
# the YIELD_VALUE/YIELD_FROM instruction.
try:
try:
if w_arg_or_err is None:
assert self.last_instr == -1
next_instr = r_uint(0)
else:
next_instr = self.resume_execute_frame(w_arg_or_err)
except pyopcode.Yield:
w_exitvalue = self.popvalue()
else:
w_exitvalue = self.dispatch(self.pycode, next_instr,
> executioncontext)
interpreter\pyframe.py:350:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
pycode = <code object <module>, file "<frozen importlib._bootstrap_external>", line 1>
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d923d8>
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:
assert next_instr & 1 == 0
> next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
co_code = 'd\x00Z\x00d\x01a\x01d\x02d\x01l\x02Z\x02d\x02d\x01l\x03Z\x03d\x02d\x01l\x04Z\x04d\x02d\x01l\x05Z\x05d\x02d\x01l\x06Z\...eOZPG\x00dG\x84\x00dH\x83\x02ZQG\x00dI\x84\x00dJ\x83\x02ZRd dK\x84\x01ZSdL\x84\x00ZTdM\x84\x00ZUdN\x84\x00ZVd\x01S\x00'
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d923d8>
def handle_bytecode(self, co_code, next_instr, ec):
try:
> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
co_code = 'd\x00Z\x00d\x01a\x01d\x02d\x01l\x02Z\x02d\x02d\x01l\x03Z\x03d\x02d\x01l\x04Z\x04d\x02d\x01l\x05Z\x05d\x02d\x01l\x06Z\...eOZPG\x00dG\x84\x00dH\x83\x02ZQG\x00dI\x84\x00dJ\x83\x02ZRd dK\x84\x01ZSdL\x84\x00ZTdM\x84\x00ZUdN\x84\x00ZVd\x01S\x00'
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d923d8>
@jit.unroll_safe
def dispatch_bytecode(self, co_code, next_instr, ec):
while True:
assert next_instr & 1 == 0
self.last_instr = intmask(next_instr)
if jit.we_are_jitted():
_d = self.debugdata
if ec.space.reverse_debugging or (
_d is not None and _d.w_f_trace is not None):
ec.bytecode_only_trace(self)
next_instr = r_uint(self.last_instr)
else:
# Only reload next_instr from last_instr when something that
# can modify it actually ran (trace function or action
# dispatcher). In the common case (no trace, positive ticker)
# next_instr is unchanged and the round-trip is skipped.
_d = self.debugdata
if ec.space.reverse_debugging or (
_d is not None and _d.w_f_trace is not None) or (
not we_are_translated() and
'bytecode_only_trace' in ec.__dict__):
ec.bytecode_only_trace(self)
next_instr = r_uint(self.last_instr)
actionflag = ec.space.actionflag
if actionflag.decrement_ticker(TICK_COUNTER_STEP) < 0:
> actionflag.action_dispatcher(ec, self)
interpreter\pyopcode.py:221:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d923d8>
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
@jit.unroll_safe
@objectmodel.dont_inline
def action_dispatcher(ec, frame):
# periodic actions (first reset the bytecode counter)
self.reset_ticker(self.checkinterval_scaled)
for action in periodic_actions:
> action.perform(ec, frame)
interpreter\executioncontext.py:546:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.thread.gil.GILReleaseAction object at 0x000001f6a69daf70>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d923d8>
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object <module>, file "<frozen importlib._bootstrap_external>", line 1> at line 1
def perform(self, executioncontext, frame):
> rgil.yield_thread()
module\thread\gil.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def yield_thread():
# explicitly release the gil, in a way that tries to give more
# priority to other threads (as opposed to continuing to run in
# the same thread).
if we_are_translated():
if _gil_yield_thread():
from rpython.rlib import rthread
rthread.gc_thread_run()
_after_thread_switch()
else:
> release()
..\rpython\rlib\rgil.py:211:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def release():
# this function must not raise, in such a way that the exception
# transformer knows that it cannot raise!
if we_are_translated():
_gil_release()
else:
allocate()
> _emulated_gil_holder.release()
..\rpython\rlib\rgil.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>
def release(self):
> assert self._tid == self._get_ident()
E assert 0 == 4936
E + where 0 = 0
E + where 0 = <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>._tid
E + and 4936 = <bound method EmulatedGilHolder._get_ident of <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>>()
E + where <bound method EmulatedGilHolder._get_ident of <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>> = <rpython.rlib.rgil.EmulatedGilHolder instance at 0x000001f69bdd19e0>._get_ident
..\rpython\rlib\rgil.py:131: AssertionError
builder: own-win-x86-64 build #2399+
test: pypy/module/array/test/test_array.py::AppTestArray::()::test_fromstring