virt_test\Scripts\python.exe testrunner/runner.py --logfile=testrun.log --config=pypy/testrunner_cfg.py --config=~/machine_cfg.py --root=pypy --timeout=4000
in dir d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build (timeout 4000 secs)
watching logfiles {'pytestLog': 'testrun.log'}
argv: ['virt_test\\Scripts\\python.exe', 'testrunner/runner.py', '--logfile=testrun.log', '--config=pypy/testrunner_cfg.py', '--config=~/machine_cfg.py', '--root=pypy', '--timeout=4000']
environment:
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\matti\AppData\Roaming
ASL.LOG=Destination=file
CHOCOLATEYINSTALL=C:\ProgramData\chocolatey
CHOCOLATEYLASTPATHUPDATE=133185086718935289
CHOCOLATEYTOOLSLOCATION=C:\tools
CLINK_DIR=C:\Program Files (x86)\clink\0.4.9
COMMONPROGRAMFILES=C:\Program Files (x86)\Common Files
COMMONPROGRAMFILES(X86)=C:\Program Files (x86)\Common Files
COMMONPROGRAMW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-RYZEN
COMSPEC=C:\WINDOWS\system32\cmd.exe
CONDA_BAT=d:\miniconda\condabin\conda.bat
CONDA_EXE=d:\miniconda\Scripts\conda.exe
CONDA_SHLVL=0
CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
DRIVERDATA=C:\Windows\System32\Drivers\DriverData
LOCALAPPDATA=C:\Users\matti\AppData\Local
NUMBER_OF_PROCESSORS=2
NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\
OS=Windows_NT
PATH=d:\CPython27\lib\site-packages\pywin32_system32;d:\pypy_stuff\pypy\externals\bin;D:\CPython27;D:\pypy_stuff\pypy2.7-v7.3.18\Scripts;D:\pypy_stuff\pypy2.7-v7.3.18;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseHg\;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\WINDOWS\System32\OpenSSH
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_ARCHITEW6432=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=23
PROCESSOR_REVISION=7100
PROGRAMDATA=C:\ProgramData
PROGRAMFILES=C:\Program Files (x86)
PROGRAMFILES(X86)=C:\Program Files (x86)
PROGRAMW6432=C:\Program Files
PROMPT=$P$G
PSMODULEPATH=%ProgramFiles%\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
PWD=d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build
PYPYCHERRYPICK=
PYPY_ENABLE_WINCONSOLEIO=1
PYTEST_XDIST_AUTO_NUM_WORKERS=4
PYTHONPATH=.;
RTOOLS40_HOME=C:\rtools40
RTOOLS43_HOME=C:\rtools43
RTOOLS44_HOME=C:\rtools44
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=D:\SystemTemp
TMP=D:\SystemTemp
TMPDIR=d:\systemtemp\pytest
USERDOMAIN=DESKTOP-RYZEN
USERNAME=matti
USERPROFILE=C:\Users\matti
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
WINDIR=C:\WINDOWS
using PTY: False
using config pypy/testrunner_cfg.py
using config C:\Users\matti/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/_abc/test
-- module/_ast/test
-- module/_cffi_backend/test
-- module/_codecs/test
-- module/_collections/test
-- module/_continuation/test
-- module/_cppyy/test
-- module/_csv/test
-- module/_demo/test
-- module/_hpy_universal/test/_vendored
-- module/_hpy_universal/test/pypy
-- 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/_opcode/test
-- module/_pickle/test
-- module/_pickle_support/test
-- module/_posixsubprocess/test
-- module/_pypyjson/test
-- module/_random/test
-- module/_rawffi/alt/test
-- module/_rawffi/test
-- module/_socket/test
-- module/_sre/test
-- module/_vmprof/test
-- module/_warnings/test
-- module/_weakref/test
-- module/_winreg/test
-- module/array/test
-- module/atexit/test
-- module/binascii/test
-- module/bz2/test
-- module/cmath/test
-- module/cpyext/test/test_api.py
-- module/cpyext/test/test_arraymodule.py
-- module/cpyext/test/test_async_iter.py
-- module/cpyext/test/test_boolobject.py
-- module/cpyext/test/test_borrow.py
-- module/cpyext/test/test_buffer.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_contextvars.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_exception.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_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_namespaceobject.py
-- module/cpyext/test/test_ndarrayobject.py
-- module/cpyext/test/test_number.py
-- module/cpyext/test/test_object.py
-- module/cpyext/test/test_pyerrors.py
-- module/cpyext/test/test_pyfile.py
-- module/cpyext/test/test_pymem.py
-- module/cpyext/test/test_pysignals.py
-- module/cpyext/test/test_pystate.py
-- module/cpyext/test/test_pystrhex.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_typedeallocate.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/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/token/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/fake_pytest/test
-- tool/pytest/test
-- tool/release/test
-- tool/test
-- total: 144 to run
++ 06:29:23 starting config/test [1 started in total]
++ 06:29:23 starting interpreter/astcompiler/test [2 started in total]
++ 06:29:23 starting interpreter/pyparser/test [3 started in total]
++ 06:29:23 starting interpreter/test [4 started in total]
__ config/test [1 done in total, somefailed=False] ____________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.py
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 161 items / 1 skipped
config\test\test_pypyoption.py .................................................................................................................................................................
=================== 161 passed, 1 skipped in 52.29 seconds ====================
++ 06:30:23 starting module/__builtin__/test [5 started in total]
__ interpreter/pyparser/test [2 done in total, somefailed=False] ______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 192 items
interpreter\pyparser\test\apptest_parsestring.py ......
interpreter\pyparser\test\test_automata.py ...
interpreter\pyparser\test\test_future.py ...................................
interpreter\pyparser\test\test_gendfa.py .
interpreter\pyparser\test\test_parsestring.py ............
interpreter\pyparser\test\test_pyparse.py .........................................................................................................
interpreter\pyparser\test\test_pytokenizer.py ..............................
======================== 192 passed in 186.78 seconds =========================
++ 06:32:35 starting module/__pypy__/test [6 started in total]
__ interpreter/astcompiler/test [3 done in total, somefailed=False] ___________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1513 items
interpreter\astcompiler\test\apptest_compiler.py .......
interpreter\astcompiler\test\apptest_exceptiongroup.py .........................
interpreter\astcompiler\test\apptest_misc.py ...............
interpreter\astcompiler\test\apptest_patma.py .........................................
interpreter\astcompiler\test\test_assemble.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 ........................................
interpreter\astcompiler\test\test_unparse.py ................................
interpreter\astcompiler\test\test_validate.py .....................................................
======================== 1513 passed in 261.37 seconds ========================
++ 06:33:48 starting module/_abc/test [7 started in total]
__ module/__builtin__/test [4 done in total, somefailed=False] ________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 319 items
module\__builtin__\test\apptest_compile.py .....................
module\__builtin__\test\apptest_descriptor.py .....
module\__builtin__\test\apptest_operator.py ...
module\__builtin__\test\apptest_print.py ...
module\__builtin__\test\test_abstractinst.py ..........s..
module\__builtin__\test\test_breakpoint.py ........
module\__builtin__\test\test_builtin.py .......................................................................
module\__builtin__\test\test_compile.py ..
module\__builtin__\test\test_construct_singletons.py .
module\__builtin__\test\test_descriptor.py ...................................
module\__builtin__\test\test_dir.py ...........
module\__builtin__\test\test_filter.py ........
module\__builtin__\test\test_filter_pickle.py .....
module\__builtin__\test\test_format.py .
module\__builtin__\test\test_functional.py ........................................................................................
module\__builtin__\test\test_map_pickle.py ...
module\__builtin__\test\test_minmax.py .......................
module\__builtin__\test\test_rawinput.py ..
module\__builtin__\test\test_sum.py .
module\__builtin__\test\test_vars.py ...
module\__builtin__\test\test_zip.py ...........
module\__builtin__\test\test_zip_pickle.py .
=================== 318 passed, 1 skipped in 230.91 seconds ===================
++ 06:34:17 starting module/_ast/test [8 started in total]
__ module/_abc/test [5 done in total, somefailed=False] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 6 items
module\_abc\test\apptest_abc.py ...
module\_abc\test\test_abc.py ...
========================== 6 passed in 70.69 seconds ==========================
++ 06:35:02 starting module/_cffi_backend/test [9 started in total]
__ module/__pypy__/test [6 done in total, somefailed=True] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 81 items
module\__pypy__\test\apptest_picklebuffer.py ......
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 ..........
module\__pypy__\test\test_newmemoryview.py ........
module\__pypy__\test\test_os.py F
module\__pypy__\test\test_signal.py ..sss
module\__pypy__\test\test_special.py ............s.
================================== FAILURES ===================================
_________________________ AppTestOs.test_real_getenv __________________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001a1c8eec1a8>
def test_real_getenv(self):
import __pypy__.os
import os
key = 'UNLIKELY_SET'
assert key not in os.environ
os.putenv(key, '42')
# this one skips Python cache
> assert __pypy__.os.real_getenv(key) == '42'
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\__pypy__\test\test_os.py:4]:9: AssertionError
=========================== short test summary info ===========================
FAIL module\__pypy__\test\test_os.py::AppTestOs::()::test_real_getenv
============== 1 failed, 76 passed, 4 skipped in 170.82 seconds ===============
++ 06:35:32 starting module/_codecs/test [10 started in total]
__ interpreter/test [7 done in total, somefailed=True] ________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1345 items
interpreter\test\apptest_annotations.py ..........................
interpreter\test\apptest_annotations_string.py ......
interpreter\test\apptest_buffer.py .....
interpreter\test\apptest_class.py ................
interpreter\test\apptest_coroutine.py .....................................................
interpreter\test\apptest_descrtypecheck.py ..
interpreter\test\apptest_exceptions.py ..........................
interpreter\test\apptest_exctable_dis.py .........
interpreter\test\apptest_exec.py .........................
interpreter\test\apptest_extcall.py .....
interpreter\test\apptest_function.py .....................................s.......................................................
interpreter\test\apptest_generator.py ...................................................................
interpreter\test\apptest_nestedscope.py ..................
interpreter\test\apptest_pycode.py ....
interpreter\test\apptest_pyframe.py ................................................................
interpreter\test\apptest_raise.py .....................................................
interpreter\test\apptest_settrace_jump.py .
interpreter\test\apptest_sys_settrace.py ..............................................................................................................................................
interpreter\test\apptest_traceback.py ......F.
interpreter\test\apptest_unraisable.py ....
interpreter\test\apptest_with_leak.py .........
interpreter\test\test_app_main.py sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
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_error.py ..............
interpreter\test\test_exceptcomp.py .........
interpreter\test\test_executioncontext.py ................
interpreter\test\test_extmodules.py .
interpreter\test\test_fsencode.py F..
interpreter\test\test_function.py .............
interpreter\test\test_gateway.py .........................................ss.........................
interpreter\test\test_generator.py .
interpreter\test\test_interpreter.py .................................................
interpreter\test\test_location.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 ...................
interpreter\test\test_unicodehelper.py ..........
interpreter\test\test_zpy.py ssssssss
interpreter\test\test_zzpickle_and_slow.py s.....s..s..sss........ss...s.
================================== FAILURES ===================================
__________________________ test_colors_in_traceback ___________________________
def test_colors_in_traceback():
import os
def division_by_zero(a, b):
return (
a + b / 0 # abc
)
old_value = os.environ.get('FORCE_COLOR', None)
os.environ['FORCE_COLOR'] = '1'
try:
from _colorize import can_colorize, ANSIColors
> assert can_colorize()
E (application-level) AssertionError: assert False
E + where False = <function can_colorize at 0x0000029a53beb168>()
interpreter\test\apptest_traceback.py:177: AssertionError
_____________________ TestFSEncode.test_fsencode_fsdecode _____________________
self = <pypy.interpreter.test.test_fsencode.TestFSEncode instance at 0x0000029a57fccb20>
def test_fsencode_fsdecode(self):
space = self.space
strs = [u"/home/bar/baz", u"c:\\"]
if self.special_char:
strs.append(self.special_char)
for st in strs:
# check roundtrip
w_st = space.newtext(st.encode('utf8'), len(st))
w_enc = space.fsencode(w_st)
w_st2 = space.fsdecode(w_enc)
assert space.eq_w(w_st, w_st2)
> assert space.fsdecode_w(w_enc) == st
E assert '\xc3\xa4' == u'\xe4'
E - \xc3\xa4
E + \xe4
interpreter\test\test_fsencode.py:77: AssertionError
---------------------------- Captured stderr call -----------------------------
d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\test\test_fsencode.py:77: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
assert space.fsdecode_w(w_enc) == st
d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\test\test_fsencode.py:1: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
import sys
=========================== short test summary info ===========================
FAIL interpreter\test\apptest_traceback.py::test_colors_in_traceback
FAIL interpreter\test\test_fsencode.py::TestFSEncode::()::test_fsencode_fsdecode
============ 2 failed, 1234 passed, 109 skipped in 430.08 seconds =============
++ 06:36:42 starting module/_collections/test [11 started in total]
__ module/_ast/test [8 done in total, somefailed=False] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 55 items
module\_ast\test\apptest_ast.py ...
module\_ast\test\test_ast.py ....................................................
========================= 55 passed in 141.39 seconds =========================
++ 06:36:45 starting module/_continuation/test [12 started in total]
__ module/_collections/test [9 done in total, somefailed=False] _______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 66 items
module\_collections\test\apptest_defaultdict.py ..............
module\_collections\test\apptest_deque.py ..........................................
module\_collections\test\apptest_ordereddict.py ..........
========================= 66 passed in 91.45 seconds ==========================
++ 06:38:18 starting module/_cppyy/test [13 started in total]
__ module/_cppyy/test [10 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.02 seconds =========================
++ 06:38:27 starting module/_csv/test [14 started in total]
__ module/_continuation/test [11 done in total, somefailed=False] _____________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 32 items / 3 skipped
module\_continuation\test\test_generator.py ssss
module\_continuation\test\test_greenlet.py s.ssssss.sssssssssssssss.sss
==================== 3 passed, 32 skipped in 97.87 seconds ====================
++ 06:38:28 starting module/_demo/test [15 started in total]
__ module/_codecs/test [12 done in total, somefailed=True] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 99 items
module\_codecs\test\apptest_codecs.py ..
module\_codecs\test\test_codecs.py ............................................................................F......s......
module\_codecs\test\test_locale.py FFF...
module\_codecs\test\test_ztranslation.py .
================================== FAILURES ===================================
_____________________ AppTestPartialEvaluation.test_mbcs ______________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001dcc3514870>
def test_mbcs(self):
import sys
if sys.platform != 'win32':
return
# sanity test
from _codecs import mbcs_encode, mbcs_decode
toencode = u'caf\xe9', 'caf\xe9'
try:
# test for non-latin1 codepage, more general test needed
import winreg
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
r'System\CurrentControlSet\Control\Nls\CodePage')
if winreg.QueryValueEx(key, 'ACP')[0] == u'1255': # non-latin1
toencode = u'caf\xbf',b'caf\xbf'
except:
assert False, 'cannot test mbcs on this windows system, check code page'
assert u'test'.encode('mbcs') == b'test'
> assert toencode[0].encode('mbcs') == toencode[1]
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_codecs\test\test_codecs.py:1406]:19: AssertionError
_____________________ TestLocaleCodec.test_encode_locale ______________________
self = <pypy.module._codecs.test.test_locale.TestLocaleCodec object at 0x000001dcc703f750>
def test_encode_locale(self):
self.setlocale("en_US.UTF-8")
for locale_encoder in (utf8_encode_locale_surrogateescape,
utf8_encode_locale_strict):
for val in u'foo', u' 日本', u'\U0001320C':
utf8 = val.encode('utf-8')
encoded = locale_encoder(utf8, len(val))
> assert encoded.decode('utf8') == val
E assert u'\u320c' == u'\U0001320c'
E - \u320c
E + \U0001320c
module\_codecs\test\test_locale.py:45: AssertionError
_______________ TestLocaleCodec.test_encode_locale_errorhandler _______________
self = <pypy.module._codecs.test.test_locale.TestLocaleCodec object at 0x000001dcc80dec60>
def test_encode_locale_errorhandler(self):
self.setlocale("en_US.UTF-8")
locale_encoder = utf8_encode_locale_surrogateescape
utf8_encoder = self.getencoder('utf-8')
encode_error_handler = self.getstate().encode_error_handler
for val in u'foo\udc80bar', u'\udcff\U0001320C':
s = val.encode('utf8')
w_s = self.space.newtext(s)
expected = utf8_encoder(self.space, s, w_s, 'surrogateescape',
encode_error_handler)
utf8 = val.encode('utf-8')
> assert locale_encoder(utf8, len(val)) == expected
E assert '\xff\xe3\x88\x8c' == '\xff\xf0\x93\x88\x8c'
E - \xff\xe3\x88\x8c
E ? ^
E + \xff\xf0\x93\x88\x8c
E ? ^^^^^
module\_codecs\test\test_locale.py:58: AssertionError
_____________________ TestLocaleCodec.test_decode_locale ______________________
self = <pypy.module._codecs.test.test_locale.TestLocaleCodec object at 0x000001dcc75aafa8>
def test_decode_locale(self):
self.setlocale("en_US.UTF-8")
utf8_decoder = self.getdecoder('utf-8')
for locale_decoder in (str_decode_locale_surrogateescape,
str_decode_locale_strict):
for val in 'foo', ' \xe6\x97\xa5\xe6\x9c\xac', '\xf0\x93\x88\x8c':
w_s = self.space.newbytes(val)
assert (locale_decoder(val) ==
utf8_decoder(self.space, val, w_s, 'strict',
> True, None)[:2])
E assert ('\xef\xbf\xbd', 1) == ('\xf0\x93\x88\x8c', 1)
E At index 0 diff: '\xef\xbf\xbd' != '\xf0\x93\x88\x8c'
E Use -v to get the full diff
module\_codecs\test\test_locale.py:69: AssertionError
=========================== short test summary info ===========================
FAIL module\_codecs\test\test_codecs.py::AppTestPartialEvaluation::()::test_mbcs
FAIL module\_codecs\test\test_locale.py::TestLocaleCodec::()::test_encode_locale
FAIL module\_codecs\test\test_locale.py::TestLocaleCodec::()::test_encode_locale_errorhandler
FAIL module\_codecs\test\test_locale.py::TestLocaleCodec::()::test_decode_locale
============== 4 failed, 94 passed, 1 skipped in 199.79 seconds ===============
++ 06:38:58 starting module/_hpy_universal/test/_vendored [16 started in total]
__ module/_demo/test [13 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\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 38.40 seconds ==========================
++ 06:39:14 starting module/_hpy_universal/test/pypy [17 started in total]
__ module/_csv/test [14 done in total, somefailed=False] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 34 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 .
========================= 34 passed in 87.90 seconds ==========================
++ 06:39:56 starting module/_io/test [18 started in total]
__ module/_hpy_universal/test/_vendored [15 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
('warning: setuptools.command.build does not exist in setuptools', '44.1.1', 'on', '2.7.18 (0d4dcfdded47, Oct 09 2024, 22:30:52)\n[PyPy 7.3.18-alpha0 with MSC v.1929 64 bit (AMD64)]')argparse.c
buildvalue.c
format.c
helpers.c
structseq.c
Microsoft (R) Library Manager Version 14.41.34123.0
Copyright (C) Microsoft Corporation. All rights reserved.
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.01 seconds =========================
++ 06:40:11 starting module/_jitlog/test [19 started in total]
__ module/_hpy_universal/test/pypy [16 done in total, somefailed=False] _______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
('warning: setuptools.command.build does not exist in setuptools', '44.1.1', 'on', '2.7.18 (0d4dcfdded47, Oct 09 2024, 22:30:52)\n[PyPy 7.3.18-alpha0 with MSC v.1929 64 bit (AMD64)]')argparse.c
buildvalue.c
format.c
helpers.c
structseq.c
Microsoft (R) Library Manager Version 14.41.34123.0
Copyright (C) Microsoft Corporation. All rights reserved.
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.01 seconds =========================
++ 06:40:35 starting module/_locale/test [20 started in total]
__ module/_jitlog/test [17 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\_jitlog\test\test__jitlog.py s
========================= 1 skipped in 60.22 seconds ==========================
++ 06:41:19 starting module/_lsprof/test [21 started in total]
__ module/_locale/test [18 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 15 items
module\_locale\test\test_locale.py .......ss.ss.s.
=================== 10 passed, 5 skipped in 156.98 seconds ====================
++ 06:43:17 starting module/_md5/test [22 started in total]
__ module/_lsprof/test [19 done in total, somefailed=True] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 6 items
module\_lsprof\test\test_cprofile.py .F..F.
================================== FAILURES ===================================
________________________ AppTestCProfile.test_builtins ________________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002053e5c9168>
def test_builtins(self):
import _lsprof
prof = _lsprof.Profiler()
lst = []
prof.enable()
lst.append(len(lst))
prof.disable()
stats = prof.getstats()
expected = (
"<built-in method builtins.len>",
"<method 'append' of 'list' objects>",
"<method 'disable' of '_lsprof.Profiler' objects>",
)
for entry in stats:
> assert entry.code in expected
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_lsprof\test\test_cprofile.py:13]:15: AssertionError
____________________ AppTestCProfile.test_scale_of_result _____________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002053e5c9168>
def test_scale_of_result(self):
import _lsprof, time
prof = _lsprof.Profiler()
def foo(n):
t = time.time()
while abs(t - time.time()) < 1.0:
pass # busy-wait for 1 second
def bar(n):
foo(n)
prof.enable()
bar(0)
prof.disable()
stats = prof.getstats()
entries = {}
for entry in stats:
entries[entry.code] = entry
efoo = entries[foo.__code__]
ebar = entries[bar.__code__]
> assert 0.9 < efoo.totaltime < 2.9
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_lsprof\test\test_cprofile.py:130]:19: AssertionError
=========================== short test summary info ===========================
FAIL module\_lsprof\test\test_cprofile.py::AppTestCProfile::()::test_builtins
FAIL module\_lsprof\test\test_cprofile.py::AppTestCProfile::()::test_scale_of_result
==================== 2 failed, 4 passed in 141.57 seconds =====================
++ 06:43:47 starting module/_minimal_curses/test [23 started in total]
__ module/_md5/test [20 done in total, somefailed=False] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 8 items
module\_md5\test\test_md5.py ........
========================== 8 passed in 45.55 seconds ==========================
++ 06:44:09 starting module/_multibytecodec/test [24 started in total]
__ module/_minimal_curses/test [21 done in total, somefailed=False] ___________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 6 items
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
module\_minimal_curses\test\test_curses.py ssssss
========================= 6 skipped in 30.48 seconds ==========================
++ 06:44:21 starting module/_multiprocessing/test [25 started in total]
__ module/_io/test [22 done in total, somefailed=True] ________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 299 items
module\_io\test\apptest_bufferedio.py .
module\_io\test\apptest_bytesio.py .................
module\_io\test\apptest_io.py .......................F.....F..........F..
module\_io\test\apptest_stringio.py ...........................
module\_io\test\apptest_textio.py ..............................s.................
module\_io\test\test_bufferedio.py .....................ss......................ss........................ss................................
module\_io\test\test_fileio.py ..................s.................
module\_io\test\test_interp_textio.py ......FF.
module\_io\test\test_win32consoleio.py ......s......
================================== FAILURES ===================================
________________________________ test_telling _________________________________
tempfile = W_UnicodeObject('d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-3060\\tempfile')
def test_telling(tempfile):
with _io.open(tempfile, "w+", encoding="utf8") as f:
p0 = f.tell()
f.write("\xff\n")
p1 = f.tell()
f.write("\xff\n")
p2 = f.tell()
f.seek(0)
assert p0 == 0
> assert p1 == 3
E (application-level) AssertionError: assert 4 == 3
module\_io\test\apptest_io.py:287: AssertionError
____________________________ test_warn_on_dealloc _____________________________
tempfile = W_UnicodeObject('d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-3066\\tempfile')
def test_warn_on_dealloc(tempfile):
> _check_warn_on_dealloc(tempfile, 'wb', buffering=0)
module\_io\test\apptest_io.py:376:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = W_TupleObject(W_UnicodeObject('d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-3066\\tempfile'), W_UnicodeObject('wb'))
kwargs = W_DictObject(<pypy.objspace.std.kwargsdict.KwargsDictStrategy object at 0x00000287ad4c1ec0>)
gc = <pypy.module.gc.moduledef.Module object at 0x00000287abbf8aa0>
warnings = <pypy.interpreter.module.Module object at 0x00000287afc31788>
f = <pypy.objspace.std.noneobject.W_NoneObject object at 0x00000287aa548330>
r = W_UnicodeObject("<_io.FileIO name='d:\\\\systemtemp\\\\pytest\\\\pytest-of-matti\\\\pytest-3066\\\\tempfile' mode='wb' closefd=True>")
w = W_ListObject(<pypy.objspace.std.listobject.ObjectListStrategy object at 0x0000...reter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00000287b7469750>])
@py_assert2 = <pypy.objspace.std.noneobject.W_NoneObject object at 0x00000287aa548330>
@py_assert5 = W_UnicodeObject('{message : ResourceWarning("unclosed file <_io.FileIO name=\'...\pypy\\\\module\\\\_io\\\\test\\\\apptest_io.py\', lineno : 371, line : None}')
@py_assert4 = <pypy.objspace.std.noneobject.W_NoneObject object at 0x00000287aa548330>
@py_format7 = W_UnicodeObject('"<_io.FileIO name=\'d:\\\\\\\\systemtemp\\\\\\\\pytest\\\\\\\...ne : None}\' = str(<warnings.WarningMessage object at 0x00000287b7469750>)\n}')
@py_format9 = W_UnicodeObject('assert "<_io.FileIO name=\'d:\\\\\\\\systemtemp\\\\\\\\pytest...ne : None}\' = str(<warnings.WarningMessage object at 0x00000287b7469750>)\n}')
def _check_warn_on_dealloc(*args, **kwargs):
import gc
import warnings
f = open(*args, **kwargs)
r = repr(f)
gc.collect()
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter('always')
f = None
gc.collect()
assert len(w) == 1, len(w)
> assert r in str(w[0])
E (application-level) AssertionError: assert "<_io.FileIO name='d:\\\\systemtemp\\\\pytest\\\\pytest-of-matti\\\\pytest-3066\\\\tempfile' mode='wb' closefd=True>" in '{message : ResourceWarning("unclosed file <_io.FileIO name=\'d:\\\\\\\\systemtemp\\\\\\\\pytest\\\\\\\\pytest-of-matti\\\\\\\\pytest-3066\\\\\\\\tempfile\' mode=\'wb\' closefd=True>"), category : \'ResourceWarning\', filename : \'d:\\\\pypy_stuff\\\\buildbot64\\\\slave\\\\own-win-x86-64\\\\build\\\\pypy\\\\module\\\\_io\\\\test\\\\apptest_io.py\', lineno : 371, line : None}'
E + where '{message : ResourceWarning("unclosed file <_io.FileIO name=\'d:\\\\\\\\systemtemp\\\\\\\\pytest\\\\\\\\pytest-of-matti\\\\\\\\pytest-3066\\\\\\\\tempfile\' mode=\'wb\' closefd=True>"), category : \'ResourceWarning\', filename : \'d:\\\\pypy_stuff\\\\buildbot64\\\\slave\\\\own-win-x86-64\\\\build\\\\pypy\\\\module\\\\_io\\\\test\\\\apptest_io.py\', lineno : 371, line : None}' = str(<warnings.WarningMessage object at 0x00000287b7469750>)
module\_io\test\apptest_io.py:373: AssertionError
___________________________ test_tell_univnewlines ____________________________
tempfile = W_UnicodeObject('d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-3075\\tempfile')
def test_tell_univnewlines(tempfile):
import io
import sys
NEWLINE = '\r\n'
with io.open(tempfile, "w") as fp:
fp.write(DATA_CRLF)
with io.open(tempfile, "r") as fp:
assert repr(fp.newlines) == repr(None)
data = fp.readline()
pos = fp.tell()
if "__pypy__" in sys.modules:
> assert repr(fp.newlines) == repr(NEWLINE)
E (application-level) AssertionError: assert "'\\r'" == "'\\r\\n'"
E + where "'\\r'" = repr('\r')
E + where '\r' = <_io.TextIOWrapper name='d:\\systemtemp\\pytest\\pytest-of-matti\\pytest-3075\\tempfile' mode='r' encoding='utf-8'>.newlines
E + and "'\\r\\n'" = repr('\r\n')
module\_io\test\apptest_io.py:559: AssertionError
__________________________________ test_tell __________________________________
space = StdObjSpace
@given(content=st_readline(characters=st.characters(blacklist_categories='C')))
> def test_tell(space, content):
module\_io\test\test_interp_textio.py:147:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\virt_test\site-packages\hypothesis\core.py:563: in execute
result = self.test_runner(data, run)
..\virt_test\site-packages\hypothesis\executors.py:56: in default_new_style_executor
return function(data)
..\virt_test\site-packages\hypothesis\core.py:561: in run
return test(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, content = (u'\n', [0, -1])
@given(content=st_readline(characters=st.characters(blacklist_categories='C')))
def test_tell(space, content):
txt, limits = content
restxt = translate_newlines(txt)
resstr = restxt.encode('utf-8')
for read_chars_before_seeking in range(len(restxt)):
w_stream = W_BytesIO(space)
w_stream.descr_init(space, space.newbytes(txt.encode('utf-8')))
w_textio = W_TextIOWrapper(space)
w_textio.descr_init(
space, w_stream,
encoding='utf-8'
)
w_res1 = w_textio.read_w(space, space.newint(read_chars_before_seeking))
assert space.len_w(w_res1) <= read_chars_before_seeking
w_tell = w_textio.tell_w(space)
w_textio.seek_w(space, space.newint(0)) # seek to beginning
w_textio.seek_w(space, w_tell) # then back to position
w_res2 = w_textio.read_w(space)
w_res = space.add(w_res1, w_res2)
res = space.text_w(w_res)
> assert res == resstr
E assert '\n' == '\r\n'
E -
E + \r
module\_io\test\test_interp_textio.py:170: AssertionError
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_tell(space=StdObjSpace, content=(u'\n', [0, -1]))
___________________________ test_getstate_setstate ____________________________
space = StdObjSpace
@given(content=st_readline(characters=st.characters(blacklist_categories='C')))
> def test_getstate_setstate(space, content):
module\_io\test\test_interp_textio.py:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\virt_test\site-packages\hypothesis\core.py:563: in execute
result = self.test_runner(data, run)
..\virt_test\site-packages\hypothesis\executors.py:56: in default_new_style_executor
return function(data)
..\virt_test\site-packages\hypothesis\core.py:561: in run
return test(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, content = (u'\n', [0, -1])
@given(content=st_readline(characters=st.characters(blacklist_categories='C')))
def test_getstate_setstate(space, content):
txt, limits = content
restxt = translate_newlines(txt)
for read_chars_before_getstate in range(len(restxt)):
w_stream = W_BytesIO(space)
w_stream.descr_init(space, space.newbytes(txt.encode('utf-8')))
w_textio = W_TextIOWrapper(space)
w_textio.descr_init(
space, w_stream,
encoding='utf-8'
)
w_state_start = w_textio.w_decoder.getstate_w(space)
w_res1 = w_textio.read_w(space, space.newint(read_chars_before_getstate))
w_current_state = w_textio.w_decoder.getstate_w(space)
w_textio.w_decoder.setstate_w(space, w_state_start)
w_textio.w_decoder.setstate_w(space, w_current_state)
w_res2 = w_textio.read_w(space)
w_res = space.add(w_res1, w_res2)
res = space.text_w(w_res).decode("utf-8")
> assert res == restxt
E assert u'\n' == u'\r\n'
module\_io\test\test_interp_textio.py:194: AssertionError
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_getstate_setstate(space=StdObjSpace, content=(u'\n', [0, -1]))
=========================== short test summary info ===========================
FAIL module\_io\test\apptest_io.py::test_telling
FAIL module\_io\test\apptest_io.py::test_warn_on_dealloc
FAIL module\_io\test\apptest_io.py::test_tell_univnewlines
FAIL module\_io\test\test_interp_textio.py::test_tell
FAIL module\_io\test\test_interp_textio.py::test_getstate_setstate
============== 5 failed, 285 passed, 9 skipped in 262.66 seconds ==============
++ 06:44:27 starting module/_opcode/test [26 started in total]
__ module/_opcode/test [23 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 5 items
module\_opcode\test\apptest_opcode.py .....
========================== 5 passed in 51.30 seconds ==========================
++ 06:45:20 starting module/_pickle/test [27 started in total]
__ module/_multibytecodec/test [24 done in total, somefailed=True] ____________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 67 items
module\_multibytecodec\test\apptest_codecs.py ...................
module\_multibytecodec\test\apptest_incremental.py ...................F
module\_multibytecodec\test\apptest_stream.py .....
module\_multibytecodec\test\test_c_codecs.py ..................s
module\_multibytecodec\test\test_multibtye_codecs.py ...
module\_multibytecodec\test\test_translation.py s
================================== FAILURES ===================================
_________________________ test_incremental_big5hkscs __________________________
def test_incremental_big5hkscs():
import _codecs
import _io
with open(myfile + '/big5hkscs.txt', 'rb') as fid:
uni_str = fid.read()
with open(myfile + '/big5hkscs-utf8.txt', 'rb') as fid:
utf8str = fid.read()
UTF8Reader = _codecs.lookup('utf-8').streamreader
for sizehint in [None] + list(range(1, 33)) + [64, 128, 256, 512, 1024]:
istream = UTF8Reader(_io.BytesIO(utf8str))
ostream = _io.BytesIO()
encoder = IncrementalBig5hkscsEncoder()
while 1:
if sizehint is not None:
data = istream.read(sizehint)
else:
data = istream.read()
if not data:
break
> e = encoder.encode(data)
E (application-level) UnicodeEncodeError: 'big5hkscs' codec can't encode character '\U0002010c' in position 0: illegal multibyte sequence
module\_multibytecodec\test\apptest_incremental.py:270: UnicodeEncodeError
=========================== short test summary info ===========================
FAIL module\_multibytecodec\test\apptest_incremental.py::test_incremental_big5hkscs
=============== 1 failed, 64 passed, 2 skipped in 68.37 seconds ===============
++ 06:45:23 starting module/_pickle_support/test [28 started in total]
__ module/_pickle_support/test [25 done in total, somefailed=False] ___________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1 items
module\_pickle_support\test\apptest__pickle_support.py .
========================== 1 passed in 35.77 seconds ==========================
++ 06:46:03 starting module/_posixsubprocess/test [29 started in total]
__ module/_posixsubprocess/test [26 done in total, somefailed=False] __________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.01 seconds =========================
++ 06:46:05 starting module/_pypyjson/test [30 started in total]
__ module/_multiprocessing/test [27 done in total, somefailed=True] ___________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 13 items
module\_multiprocessing\test\test_interp_semaphore.py s
module\_multiprocessing\test\test_semaphore.py s.........E
module\_multiprocessing\test\test_win32.py .
module\_multiprocessing\test\test_ztranslation.py .
=================================== ERRORS ====================================
____________ ERROR at teardown of AppTestSemaphore.test_in_threads ____________
self = <CallInfo when='teardown' exception: {
array [ '%', 'L', 'E', '\x00' ]:
...
File "d:\pypy_stuff\buildbot64\slav...bot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 523, in rawallocate
flavor='raw')
}>
func = <function <lambda> at 0x0000023c8493cdb8>, when = 'teardown'
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_teardown'>
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppT...s, 0 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppTestMethod 'test_closesocket'>}
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 0x0000023cf66d1478>
hook = <_HookCaller 'pytest_runtest_teardown'>, methods = []
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppT...s, 0 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppTestMethod 'test_closesocket'>}
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_teardown'>, methods = []
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppT...s, 0 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppTestMethod 'test_closesocket'>}
self._inner_hookexec = lambda hook, methods, kwargs: \
> _MultiCall(methods, kwargs, hook.spec_opts).execute()
..\_pytest\vendored_packages\pluggy.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppTestMethod 'test_closesocket'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_teardown at 0x0000023c8775a930>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 0 meths, kwargs={'i...losesocket'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000023c8702d1e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x0000023c8702d1e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 0 meths, kwargs={'i...losesocket'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>>
def __init__(self, func):
try:
> self.result = func()
..\_pytest\vendored_packages\pluggy.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_in_threads'>, 'nextitem': <AppTestMethod 'test_closesocket'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.conftest.LeakFinder instance at 0x0000023cf7f48ae0>
item = <AppTestMethod 'test_in_threads'>
@pytest.hookimpl(trylast=True)
def pytest_runtest_teardown(self, item):
if not isinstance(item, py.test.collect.Function):
return
if (not getattr(item.obj, 'dont_track_allocations', False)
and leakfinder.TRACK_ALLOCATIONS):
kwds = {}
try:
kwds['do_collection'] = item.track_allocations_collect
except AttributeError:
pass
item._pypytest_leaks = leakfinder.stop_tracking_allocations(False,
**kwds)
else: # stop_tracking_allocations() already called
item._pypytest_leaks = None
# check for leaks, but only if the test passed so far
if getattr(item, '_success', False) and item._pypytest_leaks:
> raise leakfinder.MallocMismatch(item._pypytest_leaks)
E MallocMismatch: {
E
E array [ '%', 'L', 'E', '\x00' ]:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdataobj.py", line 13, in <module>
E from pypy.module._cffi_backend import misc
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\misc.py", line 125, in <module>
E FORMAT_LONGDOUBLE = rffi.str2charp("%LE")
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Struct cffi_ctxobj { ctx, info } at 0x23cf69f3840>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 738, in make_plain_ffi_object
E r.__init__(space, src_ctx)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 59, in __init__
E self.ctxobj = parse_c_type.allocate_ctxobj(src_ctx)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\parse_c_type.py", line 71, in allocate_ctxobj
E p = lltype.malloc(CTXOBJ, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23c8282cb10>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 131, in ffiobj_init
E ntypes = allocate_array(ffi, _CFFI_OPCODE_T, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23cfdb256a0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 191, in descr_init
E w__typenames, w__includes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 146, in ffiobj_init
E p = allocate(ffi, size)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23cf6b1abb0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a7d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a830>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ac10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1acf0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ac30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ab70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ab50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aa30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a9d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a670>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a790>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a5f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a6d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1abf0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a950>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a850>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aaf0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ab30>:
E <C object Array of Char {'nolength': True} at 0x23cfeafd620>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a690>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a6f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a870>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aa50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ad30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a970>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a890>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aa70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ab90>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8500>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a8f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ac70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a6b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a9f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a7b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a650>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a9b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b2d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b1b0>:
E <C object Array of Char {'nolength': True} at 0x23cf79f88f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1afb0>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8560>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b490>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b390>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8dd0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1afd0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b0f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aed0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b3b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1af30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b1d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b050>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b410>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b1f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b170>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b270>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1adb0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b350>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1af70>:
E <C object Array of Char {'nolength': True} at 0x23cfeafeba0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b4b0>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe2a0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b190>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aff0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b070>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1aef0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b2b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ae70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b3d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b110>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b330>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b090>:
E <C object Array of Char {'nolength': True} at 0x23cfeafead0>:
E <C object Array of Char {'nolength': True} at 0x23cfeafdf80>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe4d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b2f0>:
E <C object Array of Char {'nolength': True} at 0x23cfeafed50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b310>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b210>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe500>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe750>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b010>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b4d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b230>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe680>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b250>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff0a0>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe720>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 153, in ffiobj_init
E nglobs[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x23cfeb06010>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 174, in ffiobj_init
E nstructs = allocate_array(ffi, STRUCT_UNION_S, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23cfcc23b20>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 175, in ffiobj_init
E nfields = allocate_array(ffi, FIELD_S, nftot)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23c80ad6320>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2bc0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2900>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2d20>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2a70>:
E <C object Array of Char {'nolength': True} at 0x23c80ad32b0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3720>:
E <C object Array of Char {'nolength': True} at 0x23c80ad28b0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3b00>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3a30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad29f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b150>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b470>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1af90>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3b10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18fb0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4280>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18eb0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19050>:
E <C object Array of Char {'nolength': True} at 0x23cf79f89e0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19630>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19970>:
E <C object Array of Char {'nolength': True} at 0x23cf6b198d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a450>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a2b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a2f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a590>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8bf0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad50d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a250>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a370>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a090>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a610>:
E <C object Array of Char {'nolength': True} at 0x23c80ad51f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ac90>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a630>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18c70>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 185, in ffiobj_init
E nstructs[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x23cf6b1b430>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2a90>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2840>:
E <C object Array of Char {'nolength': True} at 0x23c80ad28f0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2cc0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad33c0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2c30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2980>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3160>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b4f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1add0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1adf0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b370>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1af50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b3f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b0b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ae30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2fc0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3710>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3360>:
E <C object Array of Char {'nolength': True} at 0x23c80ad33e0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3040>:
E <C object Array of Char {'nolength': True} at 0x23c80ad33f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ae10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b130>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2860>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3350>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2b80>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ae50>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3990>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b450>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ae90>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3ad0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2ee0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b290>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1b030>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2a10>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3570>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3de0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4220>:
E <C object Array of Char {'nolength': True} at 0x23c80ad2a50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b185b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b189d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18c30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3a20>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18ad0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18bf0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18c10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b186b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b189f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18ff0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4120>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4460>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19270>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3810>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3070>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3dd0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4140>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19010>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3d30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18ed0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b190f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19130>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19b30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad41c0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19770>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19610>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19710>:
E <C object Array of Char {'nolength': True} at 0x23cf6b195d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19810>:
E <C object Array of Char {'nolength': True} at 0x23cf6b195f0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4790>:
E <C object Array of Char {'nolength': True} at 0x23c80ad49d0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad38a0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19670>:
E <C object Array of Char {'nolength': True} at 0x23cf6b197f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19890>:
E <C object Array of Char {'nolength': True} at 0x23cf6b198f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19930>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19910>:
E <C object Array of Char {'nolength': True} at 0x23cf6b199f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a330>:
E <C object Array of Char {'nolength': True} at 0x23c80ad31d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19f90>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19db0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a410>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a4d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a170>:
E <C object Array of Char {'nolength': True} at 0x23c80ad53f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a4f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a2d0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad3910>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a510>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4d90>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a570>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4c60>:
E <C object Array of Char {'nolength': True} at 0x23c80ad5460>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4180>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a550>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a350>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a110>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19f50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a390>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a1b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19dd0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19e30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19e90>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19fb0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a0f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19f10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19e70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a3b0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a1f0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a210>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19f30>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a010>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a3d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a290>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19eb0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19f70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a310>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19fd0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19e50>:
E <C object Array of Char {'nolength': True} at 0x23c80ad5e80>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a0d0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a990>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ad90>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a730>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4b30>:
E <C object Array of Char {'nolength': True} at 0x23c80ad4b70>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1acb0>:
E <C object Array of Char {'nolength': True} at 0x23c80ad60a0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ad50>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a810>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1a910>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1af10>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18690>:
E <C object Array of Char {'nolength': True} at 0x23cf6b18ef0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19170>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19c70>:
E <C object Array of Char {'nolength': True} at 0x23c80ad5540>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 209, in ffiobj_init
E nfields[nf].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x23cf56b5630>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 235, in ffiobj_init
E ntypenames = allocate_array(ffi, TYPENAME_S, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x23cf6b19ed0>:
E <C object Array of Char {'nolength': True} at 0x23cf6b1ad70>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe290>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19110>:
E <C object Array of Char {'nolength': True} at 0x23cf6b19ef0>:
E <C object Array of Char {'nolength': True} at 0x23cfe8788a0>:
E <C object Array of Char {'nolength': True} at 0x23cfe8789a0>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff680>:
E <C object Array of Char {'nolength': True} at 0x23cfe878800>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe970>:
E <C object Array of Char {'nolength': True} at 0x23cfe878840>:
E <C object Array of Char {'nolength': True} at 0x23cfe878600>:
E <C object Array of Char {'nolength': True} at 0x23cfe878900>:
E <C object Array of Char {'nolength': True} at 0x23cfe8784a0>:
E <C object Array of Char {'nolength': True} at 0x23cfe8787c0>:
E <C object Array of Char {'nolength': True} at 0x23cfeafefe0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878ac0>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8b90>:
E <C object Array of Char {'nolength': True} at 0x23cfe8786c0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878780>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff090>:
E <C object Array of Char {'nolength': True} at 0x23cfe878760>:
E <C object Array of Char {'nolength': True} at 0x23cfe8787a0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878620>:
E <C object Array of Char {'nolength': True} at 0x23cfe878740>:
E <C object Array of Char {'nolength': True} at 0x23cfe8784e0>:
E <C object Array of Char {'nolength': True} at 0x23cfe8789e0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878700>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8e60>:
E <C object Array of Char {'nolength': True} at 0x23cfe8786e0>:
E <C object Array of Char {'nolength': True} at 0x23cfe8788c0>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8860>:
E <C object Array of Char {'nolength': True} at 0x23cfe8785e0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878b60>:
E <C object Array of Char {'nolength': True} at 0x23cfe878680>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff1f0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878420>:
E <C object Array of Char {'nolength': True} at 0x23cfe878b40>:
E <C object Array of Char {'nolength': True} at 0x23cfeafe4a0>:
E <C object Array of Char {'nolength': True} at 0x23cf79f8d10>:
E <C object Array of Char {'nolength': True} at 0x23cfe878a80>:
E <C object Array of Char {'nolength': True} at 0x23cfe8785a0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878640>:
E <C object Array of Char {'nolength': True} at 0x23cfe878860>:
E <C object Array of Char {'nolength': True} at 0x23cfe878500>:
E <C object Array of Char {'nolength': True} at 0x23cfe878a20>:
E <C object Array of Char {'nolength': True} at 0x23cfe878660>:
E <C object Array of Char {'nolength': True} at 0x23cfe878c40>:
E <C object Array of Char {'nolength': True} at 0x23cfe878f80>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff520>:
E <C object Array of Char {'nolength': True} at 0x23cfe879240>:
E <C object Array of Char {'nolength': True} at 0x23cfe878f60>:
E <C object Array of Char {'nolength': True} at 0x23cfe878fe0>:
E <C object Array of Char {'nolength': True} at 0x23cfe878d80>:
E <C object Array of Char {'nolength': True} at 0x23cfe879180>:
E <C object Array of Char {'nolength': True} at 0x23cfe878d60>:
E <C object Array of Char {'nolength': True} at 0x23cfeafed00>:
E <C object Array of Char {'nolength': True} at 0x23cfe878f20>:
E <C object Array of Char {'nolength': True} at 0x23cfe878c60>:
E <C object Array of Char {'nolength': True} at 0x23cfe8793a0>:
E <C object Array of Char {'nolength': True} at 0x23cfe879380>:
E <C object Array of Char {'nolength': True} at 0x23cf79f85f0>:
E <C object Array of Char {'nolength': True} at 0x23cfeaff5c0>:
E <C object Array of Char {'nolength': True} at 0x23cfe879200>:
E <C object Array of Char {'nolength': True} at 0x23cfe878fa0>:
E <C object Array of Char {'nolength': True} at 0x23cfeaffe20>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 239, in ffiobj_init
E ntypenames[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Struct CIF_DESCRIPTION { cif, abi, nargs, rtype, atypes, exchange_size, exchange_result, exchange_args } at 0x23c81a66c40>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\newtype.py", line 752, in _build_function_type
E fct = ctypefunc.W_CTypeFunc(space, fargs, fresult, ellipsis, abi)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 53, in __init__
E builder.rawallocate(self)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 523, in rawallocate
E flavor='raw')
E }
..\rpython\conftest.py:103: MallocMismatch
=============== 11 passed, 2 skipped, 1 error in 192.56 seconds ===============
++ 06:47:39 starting module/_random/test [31 started in total]
__ module/_pickle/test [28 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 96 items
module\_pickle\test\apptest_optional_frames.py ..
module\_pickle\test\apptest_pickle.py ...............................................................s...
module\_pickle\test\apptest_pypy_extensions.py ...........................
=================== 95 passed, 1 skipped in 140.43 seconds ====================
++ 06:47:47 starting module/_rawffi/alt/test [32 started in total]
__ module/_pypyjson/test [29 done in total, somefailed=False] _________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 56 items
module\_pypyjson\test\apptest__pypyjson.py .........
module\_pypyjson\test\test__pypyjson.py ............................................
module\_pypyjson\test\test_simd.py ...
========================= 56 passed in 143.61 seconds =========================
++ 06:48:33 starting module/_rawffi/test [33 started in total]
__ module/_random/test [30 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 13 items
module\_random\test\test_random.py ............
module\_random\test\test_ztranslation.py .
========================= 13 passed in 55.57 seconds ==========================
++ 06:48:39 starting module/_socket/test [34 started in total]
__ module/_rawffi/alt/test [31 done in total, somefailed=False] _______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\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 ..s..............................ss.ss....
module\_rawffi\alt\test\test_struct.py ...............
module\_rawffi\alt\test\test_type_converter.py ...........
==================== 68 passed, 5 skipped in 66.12 seconds ====================
++ 06:49:02 starting module/_sre/test [35 started in total]
__ module/_rawffi/test [32 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 84 items
module\_rawffi\test\apptest_rawffi.py .
module\_rawffi\test\test__rawffi.py .................s.................................s.................
module\_rawffi\test\test_exit.py s
module\_rawffi\test\test_nested.py ......
module\_rawffi\test\test_struct.py ...
module\_rawffi\test\test_tracker.py ...
module\_rawffi\test\test_ztranslation.py .
=================== 81 passed, 3 skipped in 146.76 seconds ====================
n: 2
Arg 0: 3
Arg 1: 15
++ 06:51:07 starting module/_vmprof/test [36 started in total]
__ module/_vmprof/test [33 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.00 seconds =========================
++ 06:51:10 starting module/_warnings/test [37 started in total]
__ module/_socket/test [34 done in total, somefailed=True] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 87 items
module\_socket\test\apptest_socket.py ..........ss.............F..s.....s...s.ss..s...s....s...sssss
module\_socket\test\test_sock_app.py .......s.........ss.s...
module\_socket\test\test_ztranslation.py .
================================== FAILURES ===================================
___________________________ test_recvmsg_issue2649 ____________________________
@pytest.mark.skipif(sys.platform == 'win32', reason="no recvmsg on win32")
@pytest.mark.skipif(sys.platform == 'darwin', reason="no MSG_ERRQUEUE on macos")
def test_recvmsg_issue2649():
import _socket as socket
listener = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
listener.bind(('127.0.0.1', 1234))
s = socket.socket(family=socket.AF_INET, type=socket.SOCK_DGRAM)
s.sendto(b'x', ('127.0.0.1', 1234))
> with pytest.raises(BlockingIOError):
queue = s.recvmsg(1024, 1024, socket.MSG_ERRQUEUE)
E (application-level) AssertionError: raises() expected <class 'BlockingIOError'>, but got <class 'AttributeError'>
module\_socket\test\apptest_socket.py:334: AssertionError
=========================== short test summary info ===========================
FAIL module\_socket\test\apptest_socket.py::test_recvmsg_issue2649
============== 1 failed, 67 passed, 19 skipped in 202.05 seconds ==============
++ 06:52:05 starting module/_weakref/test [38 started in total]
__ module/_sre/test [35 done in total, somefailed=False] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 160 items
module\_sre\test\apptest_sre.py ......................................................................................................
module\_sre\test\test_app_sre.py ..............................
module\_sre\test\test_sre_buf.py ............................
======================== 160 passed in 175.94 seconds =========================
++ 06:52:06 starting module/_winreg/test [39 started in total]
__ module/_winreg/test [36 done in total, somefailed=True] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 22 items
module\_winreg\test\test_winreg.py ..F...........s..ss...
================================== FAILURES ===================================
________________________ AppTestFfi.test_simple_write _________________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000020c3330cbf0>
def test_simple_write(self):
from winreg import SetValue, QueryValue, REG_SZ
value = u"Some Default value"
SetValue(self.root_key, self.test_key_name, REG_SZ, value)
> assert QueryValue(self.root_key, self.test_key_name) == value
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_winreg\test\test_winreg.py:76]:5: AssertionError
=========================== short test summary info ===========================
FAIL module\_winreg\test\test_winreg.py::AppTestFfi::()::test_simple_write
=============== 1 failed, 18 passed, 3 skipped in 34.83 seconds ===============
++ 06:52:45 starting module/array/test [40 started in total]
__ module/_warnings/test [37 done in total, somefailed=False] _________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 17 items
module\_warnings\test\apptest_warnings.py ........s.s.....
module\_warnings\test\test_warnings.py .
==================== 15 passed, 2 skipped in 98.64 seconds ====================
++ 06:52:54 starting module/atexit/test [41 started in total]
__ module/_cffi_backend/test [38 done in total, somefailed=False] _____________
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 468 items
module\_cffi_backend\test\test_c.py s.....................s........................................................ssss.s....................................................s.....s...................sss...........................s...s........................s......
module\_cffi_backend\test\test_fastpath.py ..................
module\_cffi_backend\test\test_ffi_obj.py ...............................................
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 .................s..
module\_cffi_backend\test\test_recompiler.py .............................s...........................................................s..s............ssss..s.s.ss.......
module\_cffi_backend\test\test_unicode_literals.py .......
module\_cffi_backend\test\test_wchar_helper.py .
module\_cffi_backend\test\test_ztranslation.py s
================== 438 passed, 30 skipped in 1057.32 seconds ==================
++ 06:53:02 starting module/binascii/test [42 started in total]
__ module/_weakref/test [39 done in total, somefailed=False] __________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 43 items
module\_weakref\test\apptest_weakref.py ...........................................
========================= 43 passed in 81.62 seconds ==========================
++ 06:53:34 starting module/bz2/test [43 started in total]
__ module/atexit/test [40 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 2 items
module\atexit\test\apptest_atexit.py ..
========================== 2 passed in 50.85 seconds ==========================
++ 06:53:48 starting module/cmath/test [44 started in total]
__ module/binascii/test [41 done in total, somefailed=False] __________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 18 items
module\binascii\test\test_binascii.py ..................
========================= 18 passed in 68.28 seconds ==========================
++ 06:54:17 starting module/cpyext/test/test_api.py [45 started in total]
__ module/cmath/test [42 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 18 items
module\cmath\test\test_cmath.py ..................
========================= 18 passed in 42.75 seconds ==========================
++ 06:54:33 starting module/cpyext/test/test_arraymodule.py [46 started in total]
__ module/bz2/test [43 done in total, somefailed=False] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1 items / 3 skipped
module\bz2\test\test_large.py s
========================= 4 skipped in 65.13 seconds ==========================
++ 06:54:41 starting module/cpyext/test/test_async_iter.py [47 started in total]
__ module/array/test [44 done in total, somefailed=True] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 61 items / 1 errors
module\array\test\test_array.py EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE..F..
module\array\test\test_ztranslation.py .
=================================== ERRORS ====================================
__________ ERROR collecting pypy/module/array/test/apptest_array.py ___________
tool\pytest\apptest2.py:37: in collect
w_mod = create_module(space, w_name, fname, source)
tool\pytest\apptest2.py:56: in create_module
space.exec_(source, w_dict, w_dict, filename=filename)
interpreter\baseobjspace.py:1408: in exec_
return statement.exec_code(self, w_globals, w_locals)
interpreter\eval.py:33: in exec_code
return frame.run()
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:349: in dispatch_bytecode
self.IMPORT_NAME(oparg, next_instr)
interpreter\pyopcode.py:1129: in IMPORT_NAME
w_locals, w_fromlist, w_flag)
interpreter\baseobjspace.py:1241: in call_function
return self.call_args(w_func, args)
objspace\descroperation.py:201: in call_args
return w_obj.call_args(args)
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\gateway.py:869: in funcrun
return BuiltinCode.funcrun_obj(self, func, None, args)
interpreter\gateway.py:884: in funcrun_obj
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:878: in funcrun_obj
w_result = activation._run(space, scope_w)
<2112-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3: in _run
return self.behavior(space, scope_w[0], scope_w[1], scope_w[2], scope_w[3], scope_w[4])
module\_frozen_importlib\interp_import.py:96: in interp___import__
w_level)
interpreter\baseobjspace.py:1241: in call_function
return self.call_args(w_func, args)
objspace\descroperation.py:201: in call_args
return w_obj.call_args(args)
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\pycode.py:280: in funcrun
return frame.run(func.name, func.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:193: in funccall_valuestack
natural_arity - nargs, dropvalues)
interpreter\function.py:231: in _flat_pycall_defaults
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:313: in dispatch_bytecode
self.CALL_METHOD(oparg, next_instr)
objspace\std\callmethod.py:93: in CALL_METHOD
w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:203: in funccall_valuestack
return self.call_args(args)
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\pycode.py:280: in funcrun
return frame.run(func.name, func.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:311: in dispatch_bytecode
self.CALL_FUNCTION_EX(oparg, next_instr)
interpreter\pyopcode.py:1441: in CALL_FUNCTION_EX
w_result = self.space.call_args(w_function, args)
objspace\descroperation.py:201: in call_args
return w_obj.call_args(args)
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\gateway.py:869: in funcrun
return BuiltinCode.funcrun_obj(self, func, None, args)
interpreter\gateway.py:884: in funcrun_obj
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:878: in funcrun_obj
w_result = activation._run(space, scope_w)
<393-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3: in _run
return self.behavior(space, scope_w[0])
module\imp\interp_imp.py:65: in create_builtin
return space.getbuiltinmodule(name, force_init=True, reuse=reuse)
interpreter\baseobjspace.py:583: in getbuiltinmodule
w_mod.init(self)
interpreter\mixedmodule.py:66: in init
Module.init(self, space)
interpreter\module.py:65: in init
self.startup(space)
module\array\moduledef.py:15: in startup
w_mod = space.call_function(space.w_default_importlib_import, space.newtext("_collections_abc"))
interpreter\baseobjspace.py:1237: in call_function
return w_func.funccall(*args_w)
interpreter\function.py:137: in funccall
return self.call_args(Arguments(self.space, list(args_w)))
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\gateway.py:869: in funcrun
return BuiltinCode.funcrun_obj(self, func, None, args)
interpreter\gateway.py:884: in funcrun_obj
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:878: in funcrun_obj
w_result = activation._run(space, scope_w)
<2112-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3: in _run
return self.behavior(space, scope_w[0], scope_w[1], scope_w[2], scope_w[3], scope_w[4])
module\_frozen_importlib\interp_import.py:96: in interp___import__
w_level)
interpreter\baseobjspace.py:1241: in call_function
return self.call_args(w_func, args)
objspace\descroperation.py:201: in call_args
return w_obj.call_args(args)
interpreter\function.py:81: in call_args
w_res = self.getcode().funcrun(self, args)
interpreter\pycode.py:280: in funcrun
return frame.run(func.name, func.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:193: in funccall_valuestack
natural_arity - nargs, dropvalues)
interpreter\function.py:231: in _flat_pycall_defaults
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:307: in dispatch_bytecode
self.CALL_FUNCTION(oparg, next_instr)
interpreter\pyopcode.py:1399: in CALL_FUNCTION
w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:313: in dispatch_bytecode
self.CALL_METHOD(oparg, next_instr)
objspace\std\callmethod.py:93: in CALL_METHOD
w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:313: in dispatch_bytecode
self.CALL_METHOD(oparg, next_instr)
objspace\std\callmethod.py:93: in CALL_METHOD
w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:313: in dispatch_bytecode
self.CALL_METHOD(oparg, next_instr)
objspace\std\callmethod.py:93: in CALL_METHOD
w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:187: in funccall_valuestack
return self._flat_pycall(code, nargs, frame, dropvalues)
interpreter\function.py:214: in _flat_pycall
return new_frame.run(self.name, self.qualname)
interpreter\pyframe.py:257: in run
return self.execute_frame(None)
interpreter\pyframe.py:354: in execute_frame
raise self._convert_unexpected_exception(e)
interpreter\pyframe.py:845: in _convert_unexpected_exception
operr = error.get_converted_unexpected_exception(self.space, e)
interpreter\pyframe.py:350: in execute_frame
executioncontext)
interpreter\pyopcode.py:68: in dispatch
next_instr = self.handle_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:74: in handle_bytecode
next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
interpreter\pyopcode.py:313: in dispatch_bytecode
self.CALL_METHOD(oparg, next_instr)
objspace\std\callmethod.py:93: in CALL_METHOD
w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
interpreter\baseobjspace.py:1264: in call_valuestack
nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
interpreter\function.py:162: in funccall_valuestack
return code.fastcall_1(self.space, self, f_0)
interpreter\gateway.py:982: in fastcall_1
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:977: in fastcall_1
w_result = self.fastfunc_1(space, w1)
module\_io\interp_io.py:177: in open_code
return open(space, w_file, "rb")
module\_io\interp_io.py:27: in open
closefd, w_opener)
<2646-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rlib\jit.py:246>:13: in f
return func(space, w_file, mode, buffering, encoding, errors, newline, closefd, w_opener)
module\_io\interp_io.py:120: in _open
space.newbool(bool(closefd)), w_opener)
interpreter\baseobjspace.py:1241: in call_function
return self.call_args(w_func, args)
objspace\descroperation.py:208: in call_args
return space.get_and_call_args(w_descr, w_obj, args)
objspace\descroperation.py:173: in get_and_call_args
return w_descr.call_obj_args(w_obj, args)
interpreter\function.py:87: in call_obj_args
w_res = self.getcode().funcrun_obj(self, w_obj, args)
interpreter\gateway.py:941: in funcrun_obj
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:937: in funcrun_obj
w_result = self.func__args__(space, w_obj, args)
<282-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:4: in _call
return func(self, space, args)
objspace\std\typeobject.py:743: in descr_call
__args__)
objspace\descroperation.py:173: in get_and_call_args
return w_descr.call_obj_args(w_obj, args)
interpreter\function.py:87: in call_obj_args
w_res = self.getcode().funcrun_obj(self, w_obj, args)
interpreter\gateway.py:884: in funcrun_obj
self.handle_exception(space, e)
interpreter\gateway.py:908: in handle_exception
raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:878: in funcrun_obj
w_result = activation._run(space, scope_w)
<2566-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3: in _run
return self.behavior(space.interp_w(W_FileIO, scope_w[0]), space, scope_w[1], space.text_w(scope_w[2]), space.gateway_int_w(scope_w[3]), scope_w[4])
module\_io\interp_fileio.py:211: in descr_init
self.fd = _open_fd(space, w_name, flags)
module\_io\interp_fileio.py:141: in _open_fd
space, w_path, flags, 0666)
module\posix\interp_posix.py:101: in dispatch
return func(fname, *args)
..\rpython\rlib\rposix.py:468: in open
fd = c_wopen(buf, flags, mode)
..\rpython\rtyper\lltypesystem\rffi.py:321: in wrapper
res = call_external_function(*real_args)
<99-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py:217>:19: in call_external_function
rposix._errno_after(1)
..\rpython\rlib\rposix.py:192: in _errno_after
rthread.tlfield_rpy_errno.setraw(_get_errno())
..\rpython\rtyper\lltypesystem\lltype.py:1384: in __call__
return callb(*args)
..\rpython\rtyper\lltypesystem\ll2ctypes.py:1339: in __call__
self.natural_arity)
..\rpython\rtyper\lltypesystem\ll2ctypes.py:1236: in get_ctypes_callable
symbolic=True)
..\rpython\translator\tool\cbuild.py:345: in compile_shared_lib
standalone=False))
..\rpython\translator\platform\__init__.py:57: in compile
ofiles = self._compile_o_files(cfiles, eci, standalone)
..\rpython\translator\platform\__init__.py:79: in _compile_o_files
ofiles.append(self._compile_c_file(self.cc, cfile, compile_args))
..\rpython\translator\platform\windows.py:290: in _compile_c_file
self._execute_c_compiler(cc, args, oname)
..\rpython\translator\platform\__init__.py:143: in _execute_c_compiler
self._handle_error(returncode, stdout, stderr, outname)
..\rpython\translator\platform\windows.py:319: in _handle_error
raise CompilationError(stdout, stderr)
E CompilationError: CompilationError(out="""
E """)
__________________ ERROR at setup of AppTestArray.test_ctor ___________________
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 0x000001f6a1f2fcb8>, 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_ctor'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ctor'>}
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_ctor'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ctor'>}
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_ctor'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_ctor'>}
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_ctor'>, '__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 0x000001f6a2026c78>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_ctor'>, '__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 0x000001f6a6e1f360>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6e1f360>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_ctor'>, '__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_ctor'>, '__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_ctor'>
@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 0x000001f6a6e277c0>
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 0x000001f6a6e277c0>
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 0x000001f6a6e277c0>
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 0x000001f6a6e277c0>
@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 0x000001f6a718fcc8>
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 0x000001f6a718ffa0>)
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 0x000001f6a718ffa0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a718ffa0>)
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 0x000001f6a1a6eaa0>
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 0x000001f6a1a6eaa0>
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 0x000001f6a1a6eaa0>
@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 0x000001f6a1a6eaa0>
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 0x000001f6a70c6a30>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a1a6eaa0>
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
_______________ ERROR at setup of AppTestArray.test_value_range _______________
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 0x000001f6a23ffe20>, 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_value_range'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_value_range'>}
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_value_range'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_value_range'>}
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_value_range'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_value_range'>}
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_value_range'>, '__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 0x000001f69fbcff10>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...alue_range'>, '__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 0x000001f6a4743ca0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4743ca0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...alue_range'>, '__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_value_range'>, '__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_value_range'>
@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 0x000001f6a3dfa8a8>
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 0x000001f6a3dfa8a8>
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 0x000001f6a3dfa8a8>
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 0x000001f6a3dfa8a8>
@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 0x000001f6a434a678>
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 0x000001f6a434a950>)
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 0x000001f6a434a950>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a434a950>)
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 0x000001f6a4601670>
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 0x000001f6a4601670>
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 0x000001f6a4601670>
@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 0x000001f6a4601670>
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 0x000001f6a42f6608>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4601670>
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
__________________ ERROR at setup of AppTestArray.test_float __________________
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 0x000001f6a6c76818>, 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_float'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_float'>}
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_float'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_float'>}
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_float'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_float'>}
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_float'>, '__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 0x000001f6a0a000e8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...test_float'>, '__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 0x000001f6a6c8c820>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6c8c820>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...test_float'>, '__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_float'>, '__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_float'>
@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 0x000001f6a6c6ae90>
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 0x000001f6a6c6ae90>
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 0x000001f6a6c6ae90>
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 0x000001f6a6c6ae90>
@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 0x000001f6a29c51a0>
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 0x000001f6a29c5478>)
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 0x000001f6a29c5478>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a29c5478>)
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 0x000001f6a2a817c0>
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 0x000001f6a2a817c0>
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 0x000001f6a2a817c0>
@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 0x000001f6a2a817c0>
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 0x000001f6a290f478>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2a817c0>
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
___________________ ERROR at setup of AppTestArray.test_nan ___________________
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 0x000001f6a1d325c0>, 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_nan'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_nan'>}
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_nan'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_nan'>}
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_nan'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_nan'>}
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_nan'>, '__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 0x000001f6a1226b88>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_nan'>, '__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 0x000001f6a3f5ed60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a3f5ed60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i... 'test_nan'>, '__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_nan'>, '__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_nan'>
@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 0x000001f6a70c63d8>
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 0x000001f6a70c63d8>
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 0x000001f6a70c63d8>
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 0x000001f6a70c63d8>
@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 0x000001f6a2d268a8>
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 0x000001f6a2d26b80>)
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 0x000001f6a2d26b80>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2d26b80>)
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 0x000001f6a2abec98>
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 0x000001f6a2abec98>
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 0x000001f6a2abec98>
@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 0x000001f6a2abec98>
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 0x000001f6a235cb48>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2abec98>
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
________________ ERROR at setup of AppTestArray.test_itemsize _________________
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 0x000001f6a23fef20>, 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_itemsize'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_itemsize'>}
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_itemsize'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_itemsize'>}
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_itemsize'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_itemsize'>}
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_itemsize'>, '__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 0x000001f69f44c390>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_itemsize'>, '__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 0x000001f6a41b8a60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a41b8a60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_itemsize'>, '__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_itemsize'>, '__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_itemsize'>
@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 0x000001f6a41f2d40>
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 0x000001f6a41f2d40>
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 0x000001f6a41f2d40>
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 0x000001f6a41f2d40>
@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 0x000001f6a3682aa0>
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 0x000001f6a3682d78>)
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 0x000001f6a3682d78>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a3682d78>)
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 0x000001f6a660aa68>
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 0x000001f6a660aa68>
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 0x000001f6a660aa68>
@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 0x000001f6a660aa68>
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 0x000001f6a367a448>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a660aa68>
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
______________ ERROR at setup of AppTestArray.test_errormessage _______________
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 0x000001f6a6c77970>, 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_errormessage'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_errormessage'>}
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_errormessage'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_errormessage'>}
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_errormessage'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_errormessage'>}
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_errormessage'>, '__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 0x000001f69e769e48>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rormessage'>, '__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 0x000001f6a20310e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a20310e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rormessage'>, '__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_errormessage'>, '__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_errormessage'>
@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 0x000001f6a2397cc8>
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 0x000001f6a2397cc8>
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 0x000001f6a2397cc8>
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 0x000001f6a2397cc8>
@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 0x000001f6a37ea330>
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 0x000001f6a37ea608>)
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 0x000001f6a37ea608>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a37ea608>)
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 0x000001f6a3c15050>
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 0x000001f6a3c15050>
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 0x000001f6a3c15050>
@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 0x000001f6a3c15050>
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 0x000001f6a3774058>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a3c15050>
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
_______________ ERROR at setup of 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
________________ ERROR at setup of AppTestArray.test_frombytes ________________
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 0x000001f69f29eea8>, 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_frombytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_frombytes'>}
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_frombytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_frombytes'>}
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_frombytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_frombytes'>}
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_frombytes'>, '__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 0x000001f6a7161a88>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._frombytes'>, '__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 0x000001f6a1a953a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a1a953a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._frombytes'>, '__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_frombytes'>, '__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_frombytes'>
@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 0x000001f6a1cd8e90>
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 0x000001f6a1cd8e90>
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 0x000001f6a1cd8e90>
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 0x000001f6a1cd8e90>
@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 0x000001f6a0fff4b0>
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 0x000001f6a0fff788>)
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 0x000001f6a0fff788>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a0fff788>)
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 0x000001f6a0ab1e88>
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 0x000001f6a0ab1e88>
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 0x000001f6a0ab1e88>
@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 0x000001f6a0ab1e88>
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 0x000001f6a1154138>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a0ab1e88>
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
________________ ERROR at setup of AppTestArray.test_fromfile _________________
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 0x000001f6a0d29010>, 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_fromfile'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile'>}
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_fromfile'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile'>}
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_fromfile'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile'>}
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_fromfile'>, '__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 0x000001f6a0f5c930>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_fromfile'>, '__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 0x000001f6a4e613a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4e613a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_fromfile'>, '__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_fromfile'>, '__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_fromfile'>
@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 0x000001f6a28cbfa0>
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 0x000001f6a28cbfa0>
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 0x000001f6a28cbfa0>
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 0x000001f6a28cbfa0>
@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 0x000001f6a2c0c800>
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 0x000001f6a2c0cad8>)
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 0x000001f6a2c0cad8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2c0cad8>)
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 0x000001f6a6008f00>
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 0x000001f6a6008f00>
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 0x000001f6a6008f00>
@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 0x000001f6a6008f00>
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 0x000001f6a2c15600>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a6008f00>
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
___________ ERROR at setup of AppTestArray.test_fromfile_no_warning ___________
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 0x000001f6a26c65c0>, 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_fromfile_no_warning'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile_no_warning'>}
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_fromfile_no_warning'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile_no_warning'>}
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_fromfile_no_warning'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromfile_no_warning'>}
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_fromfile_no_warning'>, '__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 0x000001f6a0898250>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...no_warning'>, '__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 0x000001f6a4fc34e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4fc34e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...no_warning'>, '__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_fromfile_no_warning'>, '__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_fromfile_no_warning'>
@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 0x000001f6a4fdffa0>
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 0x000001f6a4fdffa0>
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 0x000001f6a4fdffa0>
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 0x000001f6a4fdffa0>
@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 0x000001f6a748bda8>
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 0x000001f6a74920c8>)
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 0x000001f6a74920c8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a74920c8>)
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 0x000001f6a756a838>
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 0x000001f6a756a838>
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 0x000001f6a756a838>
@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 0x000001f6a756a838>
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 0x000001f6a7472b48>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a756a838>
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
________________ ERROR at setup of AppTestArray.test_fromlist _________________
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 0x000001f6a02f2c50>, 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_fromlist'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromlist'>}
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_fromlist'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromlist'>}
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_fromlist'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromlist'>}
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_fromlist'>, '__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 0x000001f6a1d110b0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_fromlist'>, '__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 0x000001f6a408e260>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a408e260>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_fromlist'>, '__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_fromlist'>, '__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_fromlist'>
@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 0x000001f6a4605130>
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 0x000001f6a4605130>
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 0x000001f6a4605130>
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 0x000001f6a4605130>
@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 0x000001f6a2a970c0>
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 0x000001f6a2aad6e0>)
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 0x000001f6a2aad6e0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2aad6e0>)
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 0x000001f6a4dc0790>
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 0x000001f6a4dc0790>
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 0x000001f6a4dc0790>
@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 0x000001f6a4dc0790>
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 0x000001f6a2904598>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4dc0790>
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
_______________ ERROR at setup of AppTestArray.test_fromunicode _______________
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 0x000001f6a05695b0>, 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_fromunicode'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromunicode'>}
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_fromunicode'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromunicode'>}
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_fromunicode'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fromunicode'>}
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_fromunicode'>, '__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 0x000001f69f413038>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...romunicode'>, '__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 0x000001f6a68f5c20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a68f5c20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...romunicode'>, '__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_fromunicode'>, '__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_fromunicode'>
@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 0x000001f6a778ae90>
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 0x000001f6a778ae90>
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 0x000001f6a778ae90>
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 0x000001f6a778ae90>
@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 0x000001f6a32a6aa0>
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 0x000001f6a32a6d78>)
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 0x000001f6a32a6d78>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a32a6d78>)
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 0x000001f6a440fe18>
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 0x000001f6a440fe18>
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 0x000001f6a440fe18>
@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 0x000001f6a440fe18>
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 0x000001f6a32c36e0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a440fe18>
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
___________ ERROR at setup of AppTestArray.test_setslice_to_extend ____________
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 0x000001f6a74de818>, 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_setslice_to_extend'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_to_extend'>}
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_setslice_to_extend'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_to_extend'>}
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_setslice_to_extend'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_to_extend'>}
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_setslice_to_extend'>, '__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 0x000001f6a7518318>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._to_extend'>, '__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 0x000001f6a56ca320>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a56ca320>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._to_extend'>, '__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_setslice_to_extend'>, '__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_setslice_to_extend'>
@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 0x000001f6a1eee678>
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 0x000001f6a1eee678>
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 0x000001f6a1eee678>
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 0x000001f6a1eee678>
@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 0x000001f6a11efa28>
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 0x000001f6a11efd00>)
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 0x000001f6a11efd00>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a11efd00>)
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 0x000001f6a0e48d78>
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 0x000001f6a0e48d78>
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 0x000001f6a0e48d78>
@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 0x000001f6a0e48d78>
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 0x000001f6a150fc20>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a0e48d78>
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
________________ ERROR at setup of AppTestArray.test_sequence _________________
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 0x000001f69f37e188>, 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_sequence'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_sequence'>}
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_sequence'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_sequence'>}
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_sequence'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_sequence'>}
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_sequence'>, '__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 0x000001f6a18e5b28>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_sequence'>, '__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 0x000001f6a4b11560>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4b11560>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_sequence'>, '__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_sequence'>, '__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_sequence'>
@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 0x000001f6a41d8988>
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 0x000001f6a41d8988>
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 0x000001f6a41d8988>
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 0x000001f6a41d8988>
@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 0x000001f6a32b9088>
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 0x000001f6a32d8918>)
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 0x000001f6a32d8918>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a32d8918>)
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 0x000001f6a61325d0>
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 0x000001f6a61325d0>
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 0x000001f6a61325d0>
@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 0x000001f6a61325d0>
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 0x000001f6a2ee76e0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a61325d0>
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
______________ ERROR at setup of AppTestArray.test_resizingslice ______________
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 0x000001f6a0f14890>, 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_resizingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_resizingslice'>}
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_resizingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_resizingslice'>}
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_resizingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_resizingslice'>}
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_resizingslice'>, '__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 0x000001f69f4d4f20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...izingslice'>, '__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 0x000001f6a78925a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a78925a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...izingslice'>, '__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_resizingslice'>, '__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_resizingslice'>
@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 0x000001f6a7885d00>
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 0x000001f6a7885d00>
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 0x000001f6a7885d00>
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 0x000001f6a7885d00>
@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 0x000001f6a77083d8>
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 0x000001f6a77087c8>)
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 0x000001f6a77087c8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a77087c8>)
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 0x000001f6a3200de8>
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 0x000001f6a3200de8>
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 0x000001f6a3200de8>
@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 0x000001f6a3200de8>
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 0x000001f6a771bbb0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a3200de8>
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
_____________ ERROR at setup of AppTestArray.test_reversingslice ______________
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 0x000001f6a1382a70>, 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_reversingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reversingslice'>}
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_reversingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reversingslice'>}
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_reversingslice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reversingslice'>}
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_reversingslice'>, '__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 0x000001f6a7093218>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rsingslice'>, '__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 0x000001f6a1d0fe20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a1d0fe20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rsingslice'>, '__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_reversingslice'>, '__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_reversingslice'>
@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 0x000001f6a23284b8>
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 0x000001f6a23284b8>
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 0x000001f6a23284b8>
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 0x000001f6a23284b8>
@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 0x000001f6a2bc0288>
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 0x000001f6a2bc0560>)
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 0x000001f6a2bc0560>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2bc0560>)
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 0x000001f6a39609f8>
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 0x000001f6a39609f8>
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 0x000001f6a39609f8>
@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 0x000001f6a39609f8>
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 0x000001f6a2b6a3d8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a39609f8>
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
___________ ERROR at setup of AppTestArray.test_getslice_large_step ___________
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 0x000001f6a26c6a70>, 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_getslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getslice_large_step'>}
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_getslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getslice_large_step'>}
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_getslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getslice_large_step'>}
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_getslice_large_step'>, '__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 0x000001f6a11db290>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...large_step'>, '__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 0x000001f6a71015a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a71015a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...large_step'>, '__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_getslice_large_step'>, '__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_getslice_large_step'>
@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 0x000001f6a6f2a448>
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 0x000001f6a6f2a448>
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 0x000001f6a6f2a448>
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 0x000001f6a6f2a448>
@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 0x000001f6a7415088>
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 0x000001f6a7415478>)
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 0x000001f6a7415478>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a7415478>)
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 0x000001f6a4e97980>
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 0x000001f6a4e97980>
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 0x000001f6a4e97980>
@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 0x000001f6a4e97980>
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 0x000001f6a73c12f0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4e97980>
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
___________ ERROR at setup of AppTestArray.test_setslice_large_step ___________
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 0x000001f6a02f2b60>, 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_setslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_large_step'>}
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_setslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_large_step'>}
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_setslice_large_step'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_setslice_large_step'>}
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_setslice_large_step'>, '__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 0x000001f69f25ade0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...large_step'>, '__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 0x000001f6a60bcae0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a60bcae0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...large_step'>, '__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_setslice_large_step'>, '__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_setslice_large_step'>
@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 0x000001f6a6097520>
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 0x000001f6a6097520>
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 0x000001f6a6097520>
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 0x000001f6a6097520>
@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 0x000001f69f461d00>
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 0x000001f69ea4c330>)
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 0x000001f69ea4c330>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f69ea4c330>)
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 0x000001f69f8b14e8>
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 0x000001f69f8b14e8>
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 0x000001f69f8b14e8>
@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 0x000001f69f8b14e8>
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 0x000001f6a2f93a98>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f69f8b14e8>
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
__________________ ERROR at setup of AppTestArray.test_toxxx __________________
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 0x000001f69f29fa60>, 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_toxxx'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_toxxx'>}
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_toxxx'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_toxxx'>}
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_toxxx'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_toxxx'>}
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_toxxx'>, '__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 0x000001f6a7075178>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...test_toxxx'>, '__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 0x000001f6a456b4e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a456b4e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...test_toxxx'>, '__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_toxxx'>, '__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_toxxx'>
@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 0x000001f6a3247980>
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 0x000001f6a3247980>
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 0x000001f6a3247980>
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 0x000001f6a3247980>
@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 0x000001f6a4f0dbe8>
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 0x000001f6a4da4020>)
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 0x000001f6a4da4020>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4da4020>)
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 0x000001f6a2930250>
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 0x000001f6a2930250>
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 0x000001f6a2930250>
@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 0x000001f6a2930250>
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 0x000001f6a69db3d0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2930250>
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
_____________ ERROR at setup of AppTestArray.test_empty_tostring ______________
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 0x000001f6a71dd6a0>, 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_empty_tostring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_empty_tostring'>}
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_empty_tostring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_empty_tostring'>}
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_empty_tostring'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_empty_tostring'>}
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_empty_tostring'>, '__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 0x000001f6a1013150>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...y_tostring'>, '__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 0x000001f6a78929a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a78929a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...y_tostring'>, '__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_empty_tostring'>, '__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_empty_tostring'>
@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 0x000001f6a640dcc8>
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 0x000001f6a640dcc8>
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 0x000001f6a640dcc8>
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 0x000001f6a640dcc8>
@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 0x000001f6a5f52f38>
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 0x000001f6a5f53210>)
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 0x000001f6a5f53210>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a5f53210>)
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 0x000001f6a49273d0>
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 0x000001f6a49273d0>
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 0x000001f6a49273d0>
@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 0x000001f6a49273d0>
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 0x000001f6a6149ef8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a49273d0>
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
_________________ ERROR at setup of AppTestArray.test_buffer __________________
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 0x000001f6a755fd30>, 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_buffer'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer'>}
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_buffer'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer'>}
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_buffer'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer'>}
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_buffer'>, '__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 0x000001f6a03eb128>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_buffer'>, '__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 0x000001f69a47bde0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f69a47bde0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_buffer'>, '__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_buffer'>, '__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_buffer'>
@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 0x000001f6a0d2c678>
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 0x000001f6a0d2c678>
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 0x000001f6a0d2c678>
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 0x000001f6a0d2c678>
@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 0x000001f6a223cb10>
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 0x000001f6a223cde8>)
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 0x000001f6a223cde8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a223cde8>)
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 0x000001f6a26788e0>
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 0x000001f6a26788e0>
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 0x000001f6a26788e0>
@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 0x000001f6a26788e0>
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 0x000001f6a1fd5168>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a26788e0>
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
______________ ERROR at setup of AppTestArray.test_buffer_write _______________
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 0x000001f6a227e4d0>, 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_buffer_write'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_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 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_buffer_write'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_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_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_buffer_write'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_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, 5 meths, kwargs={'item': <AppTestMethod 'test_buffer_write'>, '__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 0x000001f6a26b43b8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ffer_write'>, '__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 0x000001f6a6ec10e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6ec10e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ffer_write'>, '__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_buffer_write'>, '__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_buffer_write'>
@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 0x000001f6a716d9f0>
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 0x000001f6a716d9f0>
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 0x000001f6a716d9f0>
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 0x000001f6a716d9f0>
@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 0x000001f6a36b25d0>
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 0x000001f6a36b28a8>)
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 0x000001f6a36b28a8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a36b28a8>)
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 0x000001f6a3ea8b10>
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 0x000001f6a3ea8b10>
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 0x000001f6a3ea8b10>
@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 0x000001f6a3ea8b10>
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 0x000001f6a3cf5718>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a3ea8b10>
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
____________ ERROR at setup of AppTestArray.test_buffer_keepalive _____________
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 0x000001f6a02f2818>, 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_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 5 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 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_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 5 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_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_buffer_keepalive'>, '__multicall__': <_MultiCall 0 results, 5 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, 5 meths, kwargs={'item': <AppTestMethod 'test_buffer_keepalive'>, '__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 0x000001f69f755240>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._keepalive'>, '__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 0x000001f6a5a90f20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a5a90f20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._keepalive'>, '__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_buffer_keepalive'>, '__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_buffer_keepalive'>
@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 0x000001f6a5abd718>
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 0x000001f6a5abd718>
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 0x000001f6a5abd718>
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 0x000001f6a5abd718>
@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 0x000001f6a60dc4f0>
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 0x000001f6a60dc838>)
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 0x000001f6a60dc838>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a60dc838>)
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 0x000001f69d3a1050>
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 0x000001f69d3a1050>
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 0x000001f69d3a1050>
@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 0x000001f69d3a1050>
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 0x000001f6a7925638>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f69d3a1050>
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
__________ ERROR at setup of AppTestArray.test_memview_multi_tobytes __________
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 0x000001f6a1383ad8>, 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_memview_multi_tobytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_memview_multi_tobytes'>}
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_memview_multi_tobytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_memview_multi_tobytes'>}
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_memview_multi_tobytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_memview_multi_tobytes'>}
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_memview_multi_tobytes'>, '__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 0x000001f69fa63920>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ti_tobytes'>, '__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 0x000001f6a43aa420>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a43aa420>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ti_tobytes'>, '__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_memview_multi_tobytes'>, '__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_memview_multi_tobytes'>
@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 0x000001f6a667fde0>
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 0x000001f6a667fde0>
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 0x000001f6a667fde0>
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 0x000001f6a667fde0>
@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 0x000001f6a4f0c5d0>
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 0x000001f6a4f0c9c0>)
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 0x000001f6a4f0c9c0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4f0c9c0>)
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 0x000001f6a6af9e50>
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 0x000001f6a6af9e50>
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 0x000001f6a6af9e50>
@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 0x000001f6a6af9e50>
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 0x000001f6a69c18a0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a6af9e50>
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
______________ ERROR at setup of AppTestArray.test_list_methods _______________
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 0x000001f6a1d322f0>, 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_list_methods'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_list_methods'>}
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_list_methods'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_list_methods'>}
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_list_methods'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_list_methods'>}
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_list_methods'>, '__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 0x000001f6a2761880>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_methods'>, '__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 0x000001f6a45104e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a45104e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_methods'>, '__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_list_methods'>, '__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_list_methods'>
@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 0x000001f6a78dda60>
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 0x000001f6a78dda60>
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 0x000001f6a78dda60>
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 0x000001f6a78dda60>
@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 0x000001f6a6ce39f0>
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 0x000001f6a6ce3cc8>)
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 0x000001f6a6ce3cc8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a6ce3cc8>)
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 0x000001f6a5ec3980>
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 0x000001f6a5ec3980>
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 0x000001f6a5ec3980>
@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 0x000001f6a5ec3980>
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 0x000001f6a6ce8640>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a5ec3980>
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
_________________ ERROR at setup of AppTestArray.test_compare _________________
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 0x000001f6a07dd4c0>, 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_compare'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_compare'>}
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_compare'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_compare'>}
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_compare'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_compare'>}
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_compare'>, '__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 0x000001f69f4ae138>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_compare'>, '__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 0x000001f69ed5fd60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f69ed5fd60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_compare'>, '__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_compare'>, '__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_compare'>
@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 0x000001f6a0feb1a0>
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 0x000001f6a0feb1a0>
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 0x000001f6a0feb1a0>
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 0x000001f6a0feb1a0>
@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 0x000001f6a20b2480>
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 0x000001f6a20b2790>)
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 0x000001f6a20b2790>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a20b2790>)
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 0x000001f6a2609248>
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 0x000001f6a2609248>
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 0x000001f6a2609248>
@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 0x000001f6a2609248>
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 0x000001f6a09dde50>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2609248>
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
_________________ ERROR at setup of AppTestArray.test_reduce __________________
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 0x000001f6a23fe548>, 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_reduce'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reduce'>}
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_reduce'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reduce'>}
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_reduce'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_reduce'>}
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_reduce'>, '__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 0x000001f69b813920>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_reduce'>, '__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 0x000001f6a6817ea0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6817ea0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_reduce'>, '__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_reduce'>, '__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_reduce'>
@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 0x000001f6a7315cc8>
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 0x000001f6a7315cc8>
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 0x000001f6a7315cc8>
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 0x000001f6a7315cc8>
@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 0x000001f6a4c88fe0>
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 0x000001f6a4c892b8>)
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 0x000001f6a4c892b8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4c892b8>)
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 0x000001f6a3efe058>
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 0x000001f6a3efe058>
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 0x000001f6a3efe058>
@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 0x000001f6a3efe058>
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 0x000001f6a4a71088>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a3efe058>
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
________________ ERROR at setup of AppTestArray.test_copy_swap ________________
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 0x000001f6a02f2548>, 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_copy_swap'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_copy_swap'>}
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_copy_swap'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_copy_swap'>}
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_copy_swap'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_copy_swap'>}
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_copy_swap'>, '__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 0x000001f6a11dad68>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._copy_swap'>, '__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 0x000001f6a5d10b60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a5d10b60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._copy_swap'>, '__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_copy_swap'>, '__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_copy_swap'>
@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 0x000001f6a5d4dbe8>
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 0x000001f6a5d4dbe8>
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 0x000001f6a5d4dbe8>
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 0x000001f6a5d4dbe8>
@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 0x000001f6a4abf9f0>
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 0x000001f6a4abfde0>)
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 0x000001f6a4abfde0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4abfde0>)
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 0x000001f69ed2ce90>
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 0x000001f69ed2ce90>
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 0x000001f69ed2ce90>
@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 0x000001f69ed2ce90>
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 0x000001f6a78b95c8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f69ed2ce90>
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
________________ ERROR at setup of AppTestArray.test_deepcopy _________________
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 0x000001f6a2ab3970>, 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_deepcopy'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_deepcopy'>}
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_deepcopy'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_deepcopy'>}
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_deepcopy'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_deepcopy'>}
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_deepcopy'>, '__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 0x000001f69f5a6138>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_deepcopy'>, '__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 0x000001f6a4161760>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4161760>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_deepcopy'>, '__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_deepcopy'>, '__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_deepcopy'>
@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 0x000001f6a27dd2f0>
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 0x000001f6a27dd2f0>
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 0x000001f6a27dd2f0>
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 0x000001f6a27dd2f0>
@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 0x000001f6a2cd14e8>
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 0x000001f6a21c0f38>)
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 0x000001f6a21c0f38>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a21c0f38>)
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 0x000001f6a4d9c250>
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 0x000001f6a4d9c250>
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 0x000001f6a4d9c250>
@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 0x000001f6a4d9c250>
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 0x000001f6a6fa8d78>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4d9c250>
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
_________________ ERROR at setup of AppTestArray.test_addmul __________________
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 0x000001f6a205ca70>, 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_addmul'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_addmul'>}
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_addmul'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_addmul'>}
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_addmul'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_addmul'>}
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_addmul'>, '__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 0x000001f69eb20a70>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_addmul'>, '__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 0x000001f6a67cdc20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a67cdc20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...est_addmul'>, '__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_addmul'>, '__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_addmul'>
@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 0x000001f6a64caaa0>
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 0x000001f6a64caaa0>
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 0x000001f6a64caaa0>
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 0x000001f6a64caaa0>
@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 0x000001f6a3837910>
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 0x000001f6a3837d00>)
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 0x000001f6a3837d00>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a3837d00>)
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 0x000001f6a748e2f8>
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 0x000001f6a748e2f8>
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 0x000001f6a748e2f8>
@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 0x000001f6a748e2f8>
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 0x000001f6a382e448>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a748e2f8>
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
_________________ ERROR at setup of AppTestArray.test_delitem _________________
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 0x000001f6a1a8fb50>, 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_delitem'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_delitem'>}
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_delitem'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_delitem'>}
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_delitem'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_delitem'>}
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_delitem'>, '__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 0x000001f6a1bbd970>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_delitem'>, '__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 0x000001f69bf2f7a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f69bf2f7a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_delitem'>, '__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_delitem'>, '__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_delitem'>
@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 0x000001f6a0fe8ec8>
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 0x000001f6a0fe8ec8>
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 0x000001f6a0fe8ec8>
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 0x000001f6a0fe8ec8>
@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 0x000001f6a2246f70>
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 0x000001f6a22475c8>)
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 0x000001f6a22475c8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a22475c8>)
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 0x000001f6a26c2058>
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 0x000001f6a26c2058>
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 0x000001f6a26c2058>
@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 0x000001f6a26c2058>
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 0x000001f6a20ec0c8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a26c2058>
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
__________________ ERROR at setup of AppTestArray.test_iter ___________________
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 0x000001f6a26c65c0>, 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_iter'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iter'>}
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_iter'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iter'>}
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_iter'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iter'>}
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_iter'>, '__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 0x000001f69f0c8f48>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_iter'>, '__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 0x000001f6a57ff6a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a57ff6a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_iter'>, '__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_iter'>, '__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_iter'>
@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 0x000001f6a514cb10>
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 0x000001f6a514cb10>
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 0x000001f6a514cb10>
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 0x000001f6a514cb10>
@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 0x000001f6a5067788>
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 0x000001f6a5067a98>)
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 0x000001f6a5067a98>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a5067a98>)
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 0x000001f6a5d254e8>
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 0x000001f6a5d254e8>
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 0x000001f6a5d254e8>
@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 0x000001f6a5d254e8>
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 0x000001f6a60b8bf0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a5d254e8>
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
________________ ERROR at setup of AppTestArray.test_contains _________________
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 0x000001f6a023c098>, 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_contains'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_contains'>}
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_contains'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_contains'>}
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_contains'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_contains'>}
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_contains'>, '__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 0x000001f6a7916f98>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_contains'>, '__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 0x000001f6a7b61aa0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a7b61aa0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_contains'>, '__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_contains'>, '__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_contains'>
@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 0x000001f6a7ba2c60>
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 0x000001f6a7ba2c60>
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 0x000001f6a7ba2c60>
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 0x000001f6a7ba2c60>
@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 0x000001f6a35d85d0>
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 0x000001f6a35d88a8>)
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 0x000001f6a35d88a8>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a35d88a8>)
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 0x000001f6a470e678>
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 0x000001f6a470e678>
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 0x000001f6a470e678>
@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 0x000001f6a470e678>
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 0x000001f6a35952f0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a470e678>
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
_____________ ERROR at setup of AppTestArray.test_lying_iterable ______________
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 0x000001f6a261c020>, 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_lying_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_lying_iterable'>}
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_lying_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_lying_iterable'>}
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_lying_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_lying_iterable'>}
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_lying_iterable'>, '__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 0x000001f6a1b133d0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...g_iterable'>, '__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 0x000001f6a30bbe60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a30bbe60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...g_iterable'>, '__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_lying_iterable'>, '__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_lying_iterable'>
@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 0x000001f6a6f8ea30>
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 0x000001f6a6f8ea30>
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 0x000001f6a6f8ea30>
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 0x000001f6a6f8ea30>
@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 0x000001f6a42417f8>
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 0x000001f6a4241ad0>)
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 0x000001f6a4241ad0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4241ad0>)
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 0x000001f6a5e98330>
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 0x000001f6a5e98330>
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 0x000001f6a5e98330>
@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 0x000001f6a5e98330>
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 0x000001f6a54b8d78>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a5e98330>
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
__________________ ERROR at setup of AppTestArray.test_type ___________________
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 0x000001f6a1383cb8>, 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_type'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type'>}
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_type'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type'>}
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_type'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_type'>}
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_type'>, '__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 0x000001f69e4be9d0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_type'>, '__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 0x000001f6a6d1c120>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6d1c120>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...'test_type'>, '__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_type'>, '__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_type'>
@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 0x000001f6a5d585d0>
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 0x000001f6a5d585d0>
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 0x000001f6a5d585d0>
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 0x000001f6a5d585d0>
@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 0x000001f6a37cc1a8>
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 0x000001f6a37cc480>)
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 0x000001f6a37cc480>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a37cc480>)
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 0x000001f6a57b9c58>
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 0x000001f6a57b9c58>
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 0x000001f6a57b9c58>
@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 0x000001f6a57b9c58>
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 0x000001f6a37b0b48>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a57b9c58>
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
________________ ERROR at setup of AppTestArray.test_iterable _________________
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 0x000001f6a114cb60>, 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_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iterable'>}
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_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iterable'>}
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_iterable'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_iterable'>}
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_iterable'>, '__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 0x000001f6a20007f0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_iterable'>, '__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 0x000001f6a6768020>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a6768020>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_iterable'>, '__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_iterable'>, '__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_iterable'>
@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 0x000001f69ea36e58>
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 0x000001f69ea36e58>
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 0x000001f69ea36e58>
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 0x000001f69ea36e58>
@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 0x000001f69f6ccd40>
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 0x000001f69f6cd018>)
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 0x000001f69f6cd018>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f69f6cd018>)
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 0x000001f6a032f910>
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 0x000001f6a032f910>
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 0x000001f6a032f910>
@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 0x000001f6a032f910>
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 0x000001f69f320090>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a032f910>
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
________________ ERROR at setup of AppTestArray.test_subclass _________________
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 0x000001f6a2ab3c40>, 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_subclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass'>}
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_subclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass'>}
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_subclass'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass'>}
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_subclass'>, '__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 0x000001f6a13b15d8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_subclass'>, '__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 0x000001f6a4ed2660>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4ed2660>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...t_subclass'>, '__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_subclass'>, '__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_subclass'>
@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 0x000001f6a514c1a8>
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 0x000001f6a514c1a8>
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 0x000001f6a514c1a8>
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 0x000001f6a514c1a8>
@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 0x000001f6a71bb718>
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 0x000001f6a71bbb08>)
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 0x000001f6a71bbb08>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a71bbb08>)
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 0x000001f6a5d25168>
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 0x000001f6a5d25168>
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 0x000001f6a5d25168>
@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 0x000001f6a5d25168>
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 0x000001f6a60b90f8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a5d25168>
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
______________ ERROR at setup of AppTestArray.test_subclass_new _______________
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 0x000001f6a22634c0>, 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_subclass_new'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_new'>}
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_subclass_new'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_new'>}
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_subclass_new'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_new'>}
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_subclass_new'>, '__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 0x000001f6a0fe5df8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...bclass_new'>, '__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 0x000001f6a5c377a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a5c377a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...bclass_new'>, '__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_subclass_new'>, '__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_subclass_new'>
@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 0x000001f6a5c21980>
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 0x000001f6a5c21980>
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 0x000001f6a5c21980>
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 0x000001f6a5c21980>
@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 0x000001f6a46c40c8>
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 0x000001f6a46c43a0>)
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 0x000001f6a46c43a0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a46c43a0>)
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 0x000001f6a35b14b0>
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 0x000001f6a35b14b0>
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 0x000001f6a35b14b0>
@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 0x000001f6a35b14b0>
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 0x000001f6a47163d8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a35b14b0>
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
______________ ERROR at setup of AppTestArray.test_override_from ______________
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 0x000001f6a2993358>, 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_override_from'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_from'>}
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_override_from'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_from'>}
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_override_from'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_from'>}
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_override_from'>, '__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 0x000001f6a7519510>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rride_from'>, '__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 0x000001f6a0e16f20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a0e16f20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...rride_from'>, '__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_override_from'>, '__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_override_from'>
@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 0x000001f6a1d43248>
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 0x000001f6a1d43248>
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 0x000001f6a1d43248>
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 0x000001f6a1d43248>
@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 0x000001f6a2424b80>
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 0x000001f6a2424e58>)
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 0x000001f6a2424e58>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2424e58>)
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 0x000001f6a2b78950>
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 0x000001f6a2b78950>
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 0x000001f6a2b78950>
@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 0x000001f6a2b78950>
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 0x000001f6a22a8918>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2b78950>
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
_______________ ERROR at setup of AppTestArray.test_override_to _______________
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 0x000001f6a0062278>, 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_override_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_to'>}
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_override_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_to'>}
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_override_to'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_override_to'>}
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_override_to'>, '__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 0x000001f6a161e598>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...verride_to'>, '__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 0x000001f6a55df320>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a55df320>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...verride_to'>, '__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_override_to'>, '__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_override_to'>
@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 0x000001f6a7b92678>
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 0x000001f6a7b92678>
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 0x000001f6a7b92678>
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 0x000001f6a7b92678>
@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 0x000001f6a2d54678>
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 0x000001f6a2d54a68>)
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 0x000001f6a2d54a68>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2d54a68>)
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 0x000001f6a761c598>
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 0x000001f6a761c598>
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 0x000001f6a761c598>
@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 0x000001f6a761c598>
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 0x000001f6a2f16678>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a761c598>
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
___________ ERROR at setup of AppTestArray.test_unicode_outofrange ____________
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 0x000001f6a0953d30>, 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_unicode_outofrange'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_outofrange'>}
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_unicode_outofrange'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_outofrange'>}
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_unicode_outofrange'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_outofrange'>}
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_unicode_outofrange'>, '__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 0x000001f69e4bfe20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...outofrange'>, '__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 0x000001f6a4f44c60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4f44c60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...outofrange'>, '__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_unicode_outofrange'>, '__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_unicode_outofrange'>
@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 0x000001f6a4f64100>
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 0x000001f6a4f64100>
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 0x000001f6a4f64100>
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 0x000001f6a4f64100>
@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 0x000001f6a7289b78>
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 0x000001f6a3319590>)
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 0x000001f6a3319590>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a3319590>)
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 0x000001f6a0827f30>
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 0x000001f6a0827f30>
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 0x000001f6a0827f30>
@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 0x000001f6a0827f30>
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 0x000001f6a5668de8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a0827f30>
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
____________ ERROR at setup of AppTestArray.test_unicode_surrogate ____________
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 0x000001f6a227fd30>, 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_unicode_surrogate'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_surrogate'>}
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_unicode_surrogate'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_surrogate'>}
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_unicode_surrogate'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_unicode_surrogate'>}
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_unicode_surrogate'>, '__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 0x000001f6a753ac00>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._surrogate'>, '__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 0x000001f6a37c3f20>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a37c3f20>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._surrogate'>, '__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_unicode_surrogate'>, '__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_unicode_surrogate'>
@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 0x000001f6a33b36e0>
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 0x000001f6a33b36e0>
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 0x000001f6a33b36e0>
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 0x000001f6a33b36e0>
@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 0x000001f6a666d0f8>
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 0x000001f6a666d440>)
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 0x000001f6a666d440>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a666d440>)
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 0x000001f6a2e9c020>
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 0x000001f6a2e9c020>
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 0x000001f6a2e9c020>
@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 0x000001f6a2e9c020>
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 0x000001f6a602c720>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2e9c020>
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
_________________ ERROR at setup of AppTestArray.test_weakref _________________
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 0x000001f6a71dc980>, 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_weakref'>, '__multicall__': <_MultiCall 0 results, 5 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 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_weakref'>, '__multicall__': <_MultiCall 0 results, 5 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_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_weakref'>, '__multicall__': <_MultiCall 0 results, 5 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, 5 meths, kwargs={'item': <AppTestMethod 'test_weakref'>, '__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 0x000001f6a1509308>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_weakref'>, '__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 0x000001f6a3309ee0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a3309ee0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...st_weakref'>, '__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_weakref'>, '__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_weakref'>
@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 0x000001f6a44eafa8>
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 0x000001f6a44eafa8>
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 0x000001f6a44eafa8>
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 0x000001f6a44eafa8>
@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 0x000001f6a4ba9948>
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 0x000001f6a4ba9c20>)
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 0x000001f6a4ba9c20>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a4ba9c20>)
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 0x000001f6a2116e58>
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 0x000001f6a2116e58>
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 0x000001f6a2116e58>
@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 0x000001f6a2116e58>
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 0x000001f6a4bd5b08>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2116e58>
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
______________ ERROR at setup of AppTestArray.test_subclass_del _______________
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 0x000001f6a153a980>, 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_subclass_del'>, '__multicall__': <_MultiCall 0 results, 5 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 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_subclass_del'>, '__multicall__': <_MultiCall 0 results, 5 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_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_subclass_del'>, '__multicall__': <_MultiCall 0 results, 5 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, 5 meths, kwargs={'item': <AppTestMethod 'test_subclass_del'>, '__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 0x000001f6a733fad8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...bclass_del'>, '__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 0x000001f6a7920860>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a7920860>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...bclass_del'>, '__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_subclass_del'>, '__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_subclass_del'>
@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 0x000001f6a0177210>
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 0x000001f6a0177210>
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 0x000001f6a0177210>
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 0x000001f6a0177210>
@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 0x000001f6a0275ec0>
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 0x000001f6a028a758>)
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 0x000001f6a028a758>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a028a758>)
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 0x000001f6a07508e0>
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 0x000001f6a07508e0>
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 0x000001f6a07508e0>
@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 0x000001f6a07508e0>
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 0x000001f6a00bf830>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a07508e0>
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
___ ERROR at setup of AppTestArray.test_assign_object_with_special_methods ____
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 0x000001f6a1bae4d0>, 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_assign_object_with_special_meth..._': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assign_object_with_special_methods'>}
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_assign_object_with_special_meth..._': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assign_object_with_special_methods'>}
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_assign_object_with_special_meth..._': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_assign_object_with_special_methods'>}
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_assign_object_with_special_methods'>, '__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 0x000001f69f7d5308>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...al_methods'>, '__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 0x000001f6a4d717a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4d717a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...al_methods'>, '__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_assign_object_with_special_methods'>, '__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_assign_object_with_special_methods'>
@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 0x000001f6a7741670>
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 0x000001f6a7741670>
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 0x000001f6a7741670>
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 0x000001f6a7741670>
@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 0x000001f6a2f68288>
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 0x000001f6a2f68560>)
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 0x000001f6a2f68560>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2f68560>)
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 0x000001f6a4773bb0>
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 0x000001f6a4773bb0>
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 0x000001f6a4773bb0>
@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 0x000001f6a4773bb0>
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 0x000001f6a50b6c60>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4773bb0>
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
________________ ERROR at setup of AppTestArray.test_bytearray ________________
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 0x000001f6a25a8368>, 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_bytearray'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytearray'>}
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_bytearray'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytearray'>}
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_bytearray'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_bytearray'>}
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_bytearray'>, '__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 0x000001f6a1d59c90>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._bytearray'>, '__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 0x000001f6a5a027a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a5a027a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._bytearray'>, '__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_bytearray'>, '__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_bytearray'>
@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 0x000001f6a599f8d8>
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 0x000001f6a599f8d8>
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 0x000001f6a599f8d8>
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 0x000001f6a599f8d8>
@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 0x000001f6a43d3de0>
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 0x000001f6a43ec218>)
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 0x000001f6a43ec218>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a43ec218>)
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 0x000001f6a5c30de8>
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 0x000001f6a5c30de8>
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 0x000001f6a5c30de8>
@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 0x000001f6a5c30de8>
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 0x000001f6a2c569c0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a5c30de8>
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
_______________ ERROR at setup of AppTestArray.test_buffer_info _______________
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 0x000001f6a03f7718>, 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_buffer_info'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_info'>}
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_buffer_info'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_info'>}
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_buffer_info'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_buffer_info'>}
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_buffer_info'>, '__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 0x000001f69f5a6228>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...uffer_info'>, '__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 0x000001f6a0429620>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a0429620>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...uffer_info'>, '__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_buffer_info'>, '__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_buffer_info'>
@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 0x000001f6a06b0b48>
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 0x000001f6a06b0b48>
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 0x000001f6a06b0b48>
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 0x000001f6a06b0b48>
@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 0x000001f6a1d67670>
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 0x000001f6a1d67a60>)
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 0x000001f6a1d67a60>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a1d67a60>)
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 0x000001f6a226efe0>
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 0x000001f6a226efe0>
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 0x000001f6a226efe0>
@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 0x000001f6a226efe0>
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 0x000001f6a152e800>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a226efe0>
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
_____ ERROR at setup of AppTestArray.test_array_reverse_slice_assign_self _____
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 0x000001f6a755e458>, 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_array_reverse_slice_assign_self...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_reverse_slice_assign_self'>}
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_array_reverse_slice_assign_self...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_reverse_slice_assign_self'>}
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_array_reverse_slice_assign_self...ll__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_reverse_slice_assign_self'>}
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_array_reverse_slice_assign_self'>, '__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 0x000001f6a0217920>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ssign_self'>, '__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 0x000001f6a4af31e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4af31e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ssign_self'>, '__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_array_reverse_slice_assign_self'>, '__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_array_reverse_slice_assign_self'>
@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 0x000001f6a3e94330>
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 0x000001f6a3e94330>
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 0x000001f6a3e94330>
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 0x000001f6a3e94330>
@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 0x000001f6a5ec3638>
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 0x000001f6a5ec3a60>)
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 0x000001f6a5ec3a60>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a5ec3a60>)
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 0x000001f6a484f590>
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 0x000001f6a484f590>
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 0x000001f6a484f590>
@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 0x000001f6a484f590>
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 0x000001f6a56f33d0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a484f590>
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
_____________ ERROR at setup of AppTestArray.test_array_multiply ______________
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 0x000001f6a2263880>, 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_array_multiply'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_multiply'>}
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_array_multiply'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_multiply'>}
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_array_multiply'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_array_multiply'>}
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_array_multiply'>, '__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 0x000001f6a1ba29f8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...y_multiply'>, '__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 0x000001f6a4be9260>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a4be9260>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...y_multiply'>, '__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_array_multiply'>, '__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_array_multiply'>
@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 0x000001f6a518bda8>
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 0x000001f6a518bda8>
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 0x000001f6a518bda8>
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 0x000001f6a518bda8>
@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 0x000001f6a555a918>
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 0x000001f6a555abf0>)
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 0x000001f6a555abf0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a555abf0>)
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 0x000001f6a3311d00>
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 0x000001f6a3311d00>
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 0x000001f6a3311d00>
@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 0x000001f6a3311d00>
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 0x000001f6a49f2b10>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a3311d00>
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
____________ ERROR at setup of AppTestArray.test_getitem_only_ints ____________
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 0x000001f6a205ce30>, 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_getitem_only_ints'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getitem_only_ints'>}
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_getitem_only_ints'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getitem_only_ints'>}
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_getitem_only_ints'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_getitem_only_ints'>}
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_getitem_only_ints'>, '__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 0x000001f6a0fb5f10>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._only_ints'>, '__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 0x000001f69eaff6a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f69eaff6a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i..._only_ints'>, '__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_getitem_only_ints'>, '__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_getitem_only_ints'>
@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 0x000001f6a7195d70>
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 0x000001f6a7195d70>
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 0x000001f6a7195d70>
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 0x000001f6a7195d70>
@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 0x000001f6a613b280>
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 0x000001f6a613b788>)
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 0x000001f6a613b788>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a613b788>)
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 0x000001f6a2978aa0>
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 0x000001f6a2978aa0>
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 0x000001f6a2978aa0>
@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 0x000001f6a2978aa0>
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 0x000001f6a4888c98>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2978aa0>
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
__________ ERROR at setup of AppTestArray.test_index_special_method ___________
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 0x000001f69f67be20>, 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_index_special_method'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_index_special_method'>}
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_index_special_method'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_index_special_method'>}
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_index_special_method'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_index_special_method'>}
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_index_special_method'>, '__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 0x000001f69f7d44f8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ial_method'>, '__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 0x000001f6a65402e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a65402e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ial_method'>, '__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_index_special_method'>, '__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_index_special_method'>
@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 0x000001f6a221fb08>
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 0x000001f6a221fb08>
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 0x000001f6a221fb08>
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 0x000001f6a221fb08>
@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 0x000001f6a36b2ad8>
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 0x000001f6a36b2db0>)
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 0x000001f6a36b2db0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a36b2db0>)
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 0x000001f6a537fde0>
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 0x000001f6a537fde0>
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 0x000001f6a537fde0>
@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 0x000001f6a537fde0>
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 0x000001f6a36dcdb0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a537fde0>
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
________ ERROR at setup of AppTestArray.test_fresh_array_buffer_bytes _________
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 0x000001f6a26c6818>, 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_fresh_array_buffer_bytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fresh_array_buffer_bytes'>}
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_fresh_array_buffer_bytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fresh_array_buffer_bytes'>}
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_fresh_array_buffer_bytes'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_fresh_array_buffer_bytes'>}
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_fresh_array_buffer_bytes'>, '__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 0x000001f69f940548>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ffer_bytes'>, '__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 0x000001f6a72eb0e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a72eb0e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...ffer_bytes'>, '__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_fresh_array_buffer_bytes'>, '__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_fresh_array_buffer_bytes'>
@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 0x000001f6a5d56a30>
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 0x000001f6a5d56a30>
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 0x000001f6a5d56a30>
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 0x000001f6a5d56a30>
@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 0x000001f69f962330>
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 0x000001f69f962608>)
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 0x000001f69f962608>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f69f962608>)
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 0x000001f69f13a288>
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 0x000001f69f13a288>
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 0x000001f69f13a288>
@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 0x000001f69f13a288>
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 0x000001f6a3ae7be8>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f69f13a288>
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
_________ ERROR at setup of AppTestArray.test_mview_slice_aswritebuf __________
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 0x000001f69fac5178>, 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_mview_slice_aswritebuf'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mview_slice_aswritebuf'>}
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_mview_slice_aswritebuf'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mview_slice_aswritebuf'>}
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_mview_slice_aswritebuf'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mview_slice_aswritebuf'>}
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_mview_slice_aswritebuf'>, '__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 0x000001f69e4d0070>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...aswritebuf'>, '__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 0x000001f6a1e04aa0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a1e04aa0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...aswritebuf'>, '__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_mview_slice_aswritebuf'>, '__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_mview_slice_aswritebuf'>
@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 0x000001f6a69c06b0>
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 0x000001f6a69c06b0>
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 0x000001f6a69c06b0>
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 0x000001f6a69c06b0>
@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 0x000001f6a2930988>
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 0x000001f6a2930c60>)
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 0x000001f6a2930c60>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2930c60>)
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 0x000001f6a2aa8170>
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 0x000001f6a2aa8170>
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 0x000001f6a2aa8170>
@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 0x000001f6a2aa8170>
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 0x000001f6a6af88e0>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a2aa8170>
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
______________ ERROR at setup of AppTestArray.test_subclass_repr ______________
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 0x000001f6a71dd628>, 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_subclass_repr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_repr'>}
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_subclass_repr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_repr'>}
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_subclass_repr'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_subclass_repr'>}
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_subclass_repr'>, '__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 0x000001f6a73057b8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...class_repr'>, '__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 0x000001f6a3659520>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a3659520>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...class_repr'>, '__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_subclass_repr'>, '__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_subclass_repr'>
@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 0x000001f6a44344b8>
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 0x000001f6a44344b8>
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 0x000001f6a44344b8>
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 0x000001f6a44344b8>
@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 0x000001f6a3983b78>
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 0x000001f6a3983e50>)
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 0x000001f6a3983e50>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a3983e50>)
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 0x000001f6a4ae5cc8>
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 0x000001f6a4ae5cc8>
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 0x000001f6a4ae5cc8>
@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 0x000001f6a4ae5cc8>
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 0x000001f6a39a2838>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a4ae5cc8>
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
___________ ERROR at setup of AppTestArray.test_mutate_while_slice ____________
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 0x000001f6a1d32bd8>, 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_mutate_while_slice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mutate_while_slice'>}
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_mutate_while_slice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mutate_while_slice'>}
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_mutate_while_slice'>, '__multicall__': <_MultiCall 0 results, 5 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_mutate_while_slice'>}
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_mutate_while_slice'>, '__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 0x000001f6a052f5d8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...hile_slice'>, '__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 0x000001f6a64f84a0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001f6a64f84a0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 5 meths, kwargs={'i...hile_slice'>, '__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_mutate_while_slice'>, '__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_mutate_while_slice'>
@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 0x000001f6a0e50c60>
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 0x000001f6a0e50c60>
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 0x000001f6a0e50c60>
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 0x000001f6a0e50c60>
@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 0x000001f6a22656e0>
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 0x000001f6a2265ad0>)
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 0x000001f6a2265ad0>)
w_locals = W_ModuleDictObject(<pypy.objspace.std.celldict.ModuleDictStrategy object at 0x000001f6a2265ad0>)
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 0x000001f6a26c8170>
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 0x000001f6a26c8170>
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 0x000001f6a26c8170>
@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 0x000001f6a26c8170>
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 0x000001f6a20ed558>
executioncontext = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001f6a26c8170>
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
================================== FAILURES ===================================
___________________ AppTestArrayReconstructor.test_unicode ____________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001f6a487a870>
def test_unicode(self):
import array
array_reconstructor = array._array_reconstructor
UTF16_LE = 18
UTF16_BE = 19
UTF32_LE = 20
UTF32_BE = 21
teststr = "Bonne Journ\xe9e \U0002030a\U00020347"
testcases = (
(UTF16_LE, "UTF-16-LE"),
(UTF16_BE, "UTF-16-BE"),
(UTF32_LE, "UTF-32-LE"),
(UTF32_BE, "UTF-32-BE")
)
for testcase in testcases:
mformat_code, encoding = testcase
a = array.array('u', teststr)
b = array_reconstructor(
array.array, 'u', mformat_code, teststr.encode(encoding))
> assert a == b
E (application-level) AssertionError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\array\test\test_array.py:1272]:20: AssertionError
=========================== short test summary info ===========================
FAIL module\array\test\test_array.py::AppTestArrayReconstructor::()::test_unicode
=============== 1 failed, 5 passed, 56 error in 139.78 seconds ================
++ 06:55:13 starting module/cpyext/test/test_boolobject.py [48 started in total]
__ module/cpyext/test/test_api.py [45 done in total, somefailed=False] ________
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 4 items
module\cpyext\test\test_api.py ....
========================== 4 passed in 58.13 seconds ==========================
++ 06:56:07 starting module/cpyext/test/test_borrow.py [49 started in total]
__ module/cpyext/test/test_async_iter.py [46 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_async_iter.py sss
========================= 3 skipped in 62.29 seconds ==========================
++ 06:56:24 starting module/cpyext/test/test_buffer.py [50 started in total]
__ module/cpyext/test/test_boolobject.py [47 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 4 items
module\cpyext\test\test_boolobject.py ....
========================= 4 passed in 122.62 seconds ==========================
++ 06:57:54 starting module/cpyext/test/test_bytearrayobject.py [51 started in total]
__ module/cpyext/test/test_arraymodule.py [48 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 18 items
module\cpyext\test\test_arraymodule.py ..........x.......
=================== 17 passed, 1 xfailed in 171.11 seconds ====================
++ 06:58:05 starting module/cpyext/test/test_bytesobject.py [52 started in total]
__ module/cpyext/test/test_borrow.py [49 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_borrow.py ...
========================= 3 passed in 128.45 seconds ==========================
++ 06:59:10 starting module/cpyext/test/test_capsule.py [53 started in total]
__ module/cpyext/test/test_buffer.py [50 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 5 items
module\cpyext\test\test_buffer.py .....
========================= 5 passed in 144.71 seconds ==========================
++ 06:59:41 starting module/cpyext/test/test_cell.py [54 started in total]
__ module/cpyext/test/test_bytearrayobject.py [51 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 6 items
module\cpyext\test\test_bytearrayobject.py ......
========================= 6 passed in 119.22 seconds ==========================
++ 07:00:43 starting module/cpyext/test/test_classobject.py [55 started in total]
__ module/cpyext/test/test_bytesobject.py [52 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 20 items
module\cpyext\test\test_bytesobject.py ....................
========================= 20 passed in 173.10 seconds =========================
++ 07:01:45 starting module/cpyext/test/test_codecs.py [56 started in total]
__ module/cpyext/test/test_cell.py [53 done in total, somefailed=False] _______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_cell.py .
========================= 1 passed in 121.92 seconds ==========================
++ 07:02:23 starting module/cpyext/test/test_complexobject.py [57 started in total]
__ module/cpyext/test/test_capsule.py [54 done in total, somefailed=False] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_capsule.py ...
========================= 3 passed in 139.66 seconds ==========================
++ 07:02:28 starting module/cpyext/test/test_contextvars.py [58 started in total]
__ module/cpyext/test/test_complexobject.py [55 done in total, somefailed=True]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\main.py", line 90, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\config.py", line 839, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\vendored_packages\pluggy.py", line 729, in call_historic
INTERNALERROR> self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\vendored_packages\pluggy.py", line 338, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\vendored_packages\pluggy.py", line 333, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\_pytest\vendored_packages\pluggy.py", line 596, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\cpyext\test\conftest.py", line 32, in pytest_configure
INTERNALERROR> space = gettestobjspace(usemodules=['time'])
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\tool\pytest\objspace.py", line 24, in gettestobjspace
INTERNALERROR> space = maketestobjspace(config)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\tool\pytest\objspace.py", line 34, in maketestobjspace
INTERNALERROR> space = make_objspace(config)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\tool\option.py", line 33, in make_objspace
INTERNALERROR> return StdObjSpace(config)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 458, in __init__
INTERNALERROR> self.initialize()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\std\objspace.py", line 118, in initialize
INTERNALERROR> self.setup_builtin_modules()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 733, in setup_builtin_modules
INTERNALERROR> self.install_mixedmodule('zipimport')
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 707, in install_mixedmodule
INTERNALERROR> self.setbuiltinmodule(mixedname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 545, in setbuiltinmodule
INTERNALERROR> mod.install()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\zipimport\moduledef.py", line 25, in install
INTERNALERROR> directory=".")
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_frozen_importlib\moduledef.py", line 29, in _compile_bootstrap_module
INTERNALERROR> code_w.exec_code(space, w_dict, w_dict)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\eval.py", line 33, in exec_code
INTERNALERROR> return frame.run()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 349, in dispatch_bytecode
INTERNALERROR> self.IMPORT_NAME(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1129, in IMPORT_NAME
INTERNALERROR> w_locals, w_fromlist, w_flag)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1241, in call_function
INTERNALERROR> return self.call_args(w_func, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\descroperation.py", line 201, in call_args
INTERNALERROR> return w_obj.call_args(args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 81, in call_args
INTERNALERROR> w_res = self.getcode().funcrun(self, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 869, in funcrun
INTERNALERROR> return BuiltinCode.funcrun_obj(self, func, None, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 884, in funcrun_obj
INTERNALERROR> self.handle_exception(space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 908, in handle_exception
INTERNALERROR> raise error.get_converted_unexpected_exception(space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 878, in funcrun_obj
INTERNALERROR> w_result = activation._run(space, scope_w)
INTERNALERROR> File "<2112-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>", line 3, in _run
INTERNALERROR> return self.behavior(space, scope_w[0], scope_w[1], scope_w[2], scope_w[3], scope_w[4])
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_frozen_importlib\interp_import.py", line 96, in interp___import__
INTERNALERROR> w_level)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1241, in call_function
INTERNALERROR> return self.call_args(w_func, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\descroperation.py", line 201, in call_args
INTERNALERROR> return w_obj.call_args(args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 81, in call_args
INTERNALERROR> w_res = self.getcode().funcrun(self, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pycode.py", line 280, in funcrun
INTERNALERROR> return frame.run(func.name, func.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 193, in funccall_valuestack
INTERNALERROR> natural_arity - nargs, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 231, in _flat_pycall_defaults
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 187, in funccall_valuestack
INTERNALERROR> return self._flat_pycall(code, nargs, frame, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 214, in _flat_pycall
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 187, in funccall_valuestack
INTERNALERROR> return self._flat_pycall(code, nargs, frame, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 214, in _flat_pycall
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 187, in funccall_valuestack
INTERNALERROR> return self._flat_pycall(code, nargs, frame, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 214, in _flat_pycall
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 187, in funccall_valuestack
INTERNALERROR> return self._flat_pycall(code, nargs, frame, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 214, in _flat_pycall
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 313, in dispatch_bytecode
INTERNALERROR> self.CALL_METHOD(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\std\callmethod.py", line 93, in CALL_METHOD
INTERNALERROR> w_callable, n, f, methodcall=w_self is not None, dropvalues=n_args+2)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 187, in funccall_valuestack
INTERNALERROR> return self._flat_pycall(code, nargs, frame, dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 214, in _flat_pycall
INTERNALERROR> return new_frame.run(self.name, self.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 307, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1399, in CALL_FUNCTION
INTERNALERROR> w_result = self.space.call_valuestack(w_function, nargs, self, dropvalues=nargs+1)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 1264, in call_valuestack
INTERNALERROR> nargs, frame, methodcall=methodcall, dropvalues=dropvalues)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 203, in funccall_valuestack
INTERNALERROR> return self.call_args(args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 81, in call_args
INTERNALERROR> w_res = self.getcode().funcrun(self, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pycode.py", line 280, in funcrun
INTERNALERROR> return frame.run(func.name, func.qualname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 257, in run
INTERNALERROR> return self.execute_frame(None)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 354, in execute_frame
INTERNALERROR> raise self._convert_unexpected_exception(e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 845, in _convert_unexpected_exception
INTERNALERROR> operr = error.get_converted_unexpected_exception(self.space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyframe.py", line 350, in execute_frame
INTERNALERROR> executioncontext)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 68, in dispatch
INTERNALERROR> next_instr = self.handle_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 74, in handle_bytecode
INTERNALERROR> next_instr = self.dispatch_bytecode(co_code, next_instr, ec)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 311, in dispatch_bytecode
INTERNALERROR> self.CALL_FUNCTION_EX(oparg, next_instr)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\pyopcode.py", line 1441, in CALL_FUNCTION_EX
INTERNALERROR> w_result = self.space.call_args(w_function, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\objspace\descroperation.py", line 201, in call_args
INTERNALERROR> return w_obj.call_args(args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\function.py", line 81, in call_args
INTERNALERROR> w_res = self.getcode().funcrun(self, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 869, in funcrun
INTERNALERROR> return BuiltinCode.funcrun_obj(self, func, None, args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 884, in funcrun_obj
INTERNALERROR> self.handle_exception(space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 908, in handle_exception
INTERNALERROR> raise error.get_converted_unexpected_exception(space, e)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\gateway.py", line 878, in funcrun_obj
INTERNALERROR> w_result = activation._run(space, scope_w)
INTERNALERROR> File "<393-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>", line 3, in _run
INTERNALERROR> return self.behavior(space, scope_w[0])
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\imp\interp_imp.py", line 65, in create_builtin
INTERNALERROR> return space.getbuiltinmodule(name, force_init=True, reuse=reuse)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\baseobjspace.py", line 583, in getbuiltinmodule
INTERNALERROR> w_mod.init(self)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\mixedmodule.py", line 66, in init
INTERNALERROR> Module.init(self, space)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\interpreter\module.py", line 65, in init
INTERNALERROR> self.startup(space)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\time\moduledef.py", line 63, in startup
INTERNALERROR> interp_time._init_timezone(space)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\time\interp_time.py", line 517, in _init_timezone
INTERNALERROR> c_tzset()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 321, in wrapper
INTERNALERROR> res = call_external_function(*real_args)
INTERNALERROR> File "<2066-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py:264>", line 6, in call_external_function
INTERNALERROR> res = funcptr()
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\lltype.py", line 1384, in __call__
INTERNALERROR> return callb(*args)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\ll2ctypes.py", line 1339, in __call__
INTERNALERROR> self.natural_arity)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\ll2ctypes.py", line 1236, in get_ctypes_callable
INTERNALERROR> symbolic=True)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\tool\cbuild.py", line 345, in compile_shared_lib
INTERNALERROR> standalone=False))
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 58, in compile
INTERNALERROR> return self._finish_linking(ofiles, eci, outputfilename, standalone)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 235, in _finish_linking
INTERNALERROR> return self._link(cc_link, ofiles, largs, standalone, exe_name)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\windows.py", line 303, in _link
INTERNALERROR> self._execute_c_compiler(self.link, args, exe_name)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\__init__.py", line 143, in _execute_c_compiler
INTERNALERROR> self._handle_error(returncode, stdout, stderr, outname)
INTERNALERROR> File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\translator\platform\windows.py", line 319, in _handle_error
INTERNALERROR> raise CompilationError(stdout, stderr)
INTERNALERROR> CompilationError: CompilationError(out="""
INTERNALERROR> """)
++ 07:02:47 starting module/cpyext/test/test_cpyext.py [59 started in total]
__ module/cpyext/test/test_classobject.py [56 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 2 items
module\cpyext\test\test_classobject.py ..
========================= 2 passed in 110.01 seconds ==========================
++ 07:03:39 starting module/cpyext/test/test_datetime.py [60 started in total]
__ module/cpyext/test/test_codecs.py [57 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_codecs.py ...
========================= 3 passed in 120.70 seconds ==========================
++ 07:04:26 starting module/cpyext/test/test_dictobject.py [61 started in total]
__ module/cpyext/test/test_contextvars.py [58 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_contextvars.py .
========================= 1 passed in 111.32 seconds ==========================
++ 07:05:03 starting module/cpyext/test/test_eval.py [62 started in total]
__ module/cpyext/test/test_cpyext.py [59 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 26 items
module\cpyext\test\test_cpyext.py ...........s..............
=================== 25 passed, 1 skipped in 234.40 seconds ====================
++ 07:07:18 starting module/cpyext/test/test_exception.py [63 started in total]
__ module/cpyext/test/test_datetime.py [60 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 16 items
module\cpyext\test\test_datetime.py ................
========================= 16 passed in 184.51 seconds =========================
++ 07:07:25 starting module/cpyext/test/test_fileobject.py [64 started in total]
__ module/cpyext/test/test_dictobject.py [61 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 19 items
module\cpyext\test\test_dictobject.py ...................
========================= 19 passed in 215.18 seconds =========================
++ 07:08:50 starting module/cpyext/test/test_floatobject.py [65 started in total]
__ module/cpyext/test/test_eval.py [62 done in total, somefailed=False] _______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 19 items
module\cpyext\test\test_eval.py ...............x...
=================== 18 passed, 1 xfailed in 214.93 seconds ====================
++ 07:09:48 starting module/cpyext/test/test_frameobject.py [66 started in total]
__ module/cpyext/test/test_fileobject.py [63 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_fileobject.py .
========================= 1 passed in 108.19 seconds ==========================
++ 07:09:52 starting module/cpyext/test/test_funcobject.py [67 started in total]
__ module/cpyext/test/test_exception.py [64 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 7 items
module\cpyext\test\test_exception.py .......
========================= 7 passed in 133.38 seconds ==========================
++ 07:10:13 starting module/cpyext/test/test_genobject.py [68 started in total]
__ module/cpyext/test/test_frameobject.py [65 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 4 items
module\cpyext\test\test_frameobject.py ....
========================= 4 passed in 133.23 seconds ==========================
++ 07:12:37 starting module/cpyext/test/test_getargs.py [69 started in total]
__ module/cpyext/test/test_floatobject.py [66 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_floatobject.py ..............
========================= 14 passed in 189.75 seconds =========================
++ 07:12:59 starting module/cpyext/test/test_import.py [70 started in total]
__ module/cpyext/test/test_genobject.py [67 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_genobject.py ...
========================= 3 passed in 169.36 seconds ==========================
++ 07:13:38 starting module/cpyext/test/test_iterator.py [71 started in total]
__ module/cpyext/test/test_funcobject.py [68 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_funcobject.py ..............
========================= 14 passed in 203.57 seconds =========================
++ 07:14:01 starting module/cpyext/test/test_listobject.py [72 started in total]
__ module/cpyext/test/test_getargs.py [69 done in total, somefailed=False] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 16 items
module\cpyext\test\test_getargs.py ................
========================= 16 passed in 189.25 seconds =========================
++ 07:16:32 starting module/cpyext/test/test_longobject.py [73 started in total]
__ module/cpyext/test/test_iterator.py [70 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 6 items
module\cpyext\test\test_iterator.py ......
========================= 6 passed in 155.10 seconds ==========================
++ 07:16:56 starting module/cpyext/test/test_mapping.py [74 started in total]
__ module/cpyext/test/test_import.py [71 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 8 items
module\cpyext\test\test_import.py ........
========================= 8 passed in 202.40 seconds ==========================
++ 07:17:08 starting module/cpyext/test/test_marshal.py [75 started in total]
__ module/cpyext/test/test_listobject.py [72 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_listobject.py ..............
========================= 14 passed in 181.98 seconds =========================
++ 07:17:47 starting module/cpyext/test/test_memoryobject.py [76 started in total]
__ module/cpyext/test/test_mapping.py [73 done in total, somefailed=False] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 5 items
module\cpyext\test\test_mapping.py .....
========================== 5 passed in 73.49 seconds ==========================
++ 07:18:47 starting module/cpyext/test/test_methodobject.py [77 started in total]
__ module/cpyext/test/test_marshal.py [74 done in total, somefailed=False] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 2 items
module\cpyext\test\test_marshal.py ..
========================= 2 passed in 146.10 seconds ==========================
++ 07:20:11 starting module/cpyext/test/test_misc.py [78 started in total]
__ module/cpyext/test/test_longobject.py [75 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 25 items
module\cpyext\test\test_longobject.py .........................
========================= 25 passed in 184.07 seconds =========================
++ 07:20:11 starting module/cpyext/test/test_module.py [79 started in total]
__ module/cpyext/test/test_memoryobject.py [76 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_memoryobject.py ...s...s......
=================== 12 passed, 2 skipped in 180.07 seconds ====================
++ 07:21:42 starting module/cpyext/test/test_namespaceobject.py [80 started in total]
__ module/cpyext/test/test_methodobject.py [77 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_methodobject.py ..............
========================= 14 passed in 188.41 seconds =========================
++ 07:22:33 starting module/cpyext/test/test_ndarrayobject.py [81 started in total]
__ module/cpyext/test/test_misc.py [78 done in total, somefailed=False] _______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_misc.py .
========================= 1 passed in 121.40 seconds ==========================
++ 07:22:52 starting module/cpyext/test/test_number.py [82 started in total]
__ module/cpyext/test/test_ndarrayobject.py [79 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 1 skipped
========================== 1 skipped in 8.30 seconds ==========================
++ 07:23:18 starting module/cpyext/test/test_object.py [83 started in total]
__ module/cpyext/test/test_namespaceobject.py [80 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_namespaceobject.py .
========================= 1 passed in 107.14 seconds ==========================
++ 07:24:31 starting module/cpyext/test/test_pyerrors.py [84 started in total]
__ module/cpyext/test/test_module.py [81 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 25 items
module\cpyext\test\test_module.py .........................
========================= 25 passed in 236.78 seconds =========================
++ 07:24:57 starting module/cpyext/test/test_pyfile.py [85 started in total]
__ module/cpyext/test/test_number.py [82 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 7 items
module\cpyext\test\test_number.py .......
========================= 7 passed in 142.32 seconds ==========================
++ 07:25:56 starting module/cpyext/test/test_pymem.py [86 started in total]
__ module/cpyext/test/test_pyfile.py [83 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 7 items
module\cpyext\test\test_pyfile.py ...x...
==================== 6 passed, 1 xfailed in 103.04 seconds ====================
++ 07:27:17 starting module/cpyext/test/test_pysignals.py [87 started in total]
__ module/cpyext/test/test_object.py [84 done in total, somefailed=False] _____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 40 items
module\cpyext\test\test_object.py .......................s................
=================== 39 passed, 1 skipped in 293.68 seconds ====================
++ 07:29:09 starting module/cpyext/test/test_pystate.py [88 started in total]
__ module/cpyext/test/test_pymem.py [85 done in total, somefailed=False] ______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_pymem.py .
========================= 1 passed in 152.30 seconds ==========================
++ 07:29:35 starting module/cpyext/test/test_pystrhex.py [89 started in total]
__ module/cpyext/test/test_pyerrors.py [86 done in total, somefailed=True] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 33 items
module\cpyext\test\test_pyerrors.py ........s.....sF.......s...s.....
================================== FAILURES ===================================
______________ AppTestFetch.test_SetFromErrnoWithFilename_basic _______________
self = <CallInfo when='call' exception: 'ascii' codec can't encode character u'\xe4' in position 106: ordinal not in range(128)>
func = <function <lambda> at 0x0000023736f3c458>, 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_SetFromErrnoWithFilename_basic'...all__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_SetFromErrnoWithFilename_basic'>}
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 0x000002372b591440>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x00000237325401e0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_SetFromErrnoWithFilename_basic'...all__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_SetFromErrnoWithFilename_basic'>}
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 0x00000237325401e0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_SetFromErrnoWithFilename_basic'...all__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_SetFromErrnoWithFilename_basic'>}
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_SetFromErrnoWithFilename_basic'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x0000023737ca3948>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...name_basic'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000002372b7d2420>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000002372b7d2420>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...name_basic'>, '__multicall__': <_MultiCall 0 results, 1 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_SetFromErrnoWithFilename_basic'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x0000023737ca38f8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...name_basic'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000002372b7d23e0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000002372b7d23e0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...name_basic'>, '__multicall__': <_MultiCall 0 results, 1 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_SetFromErrnoWithFilename_basic'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.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_SetFromErrnoWithFilename_basic'>
def pytest_runtest_call(item):
try:
> item.runtest()
..\_pytest\runner.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_SetFromErrnoWithFilename_basic'>
def runtest(self):
target = self.obj
src = extract_docstring_if_empty_function(target.im_func)
space = target.im_self.space
if self.config.option.runappdirect:
appexec_definitions = self.parent.obj.__dict__
spaceconfig = getattr(self.parent.obj, 'spaceconfig', None)
usemodules = spaceconfig.get('usemodules') if spaceconfig else None
return run_with_python(self.config.option.python, src, usemodules,
**appexec_definitions)
filename = self._getdynfilename(target)
func = app2interp_temp(src, filename=filename)
w_instance = self.parent.w_instance
> self.execute_appex(space, func, space, w_instance)
tool\pytest\apptest.py:345:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_SetFromErrnoWithFilename_basic'>
space = StdObjSpace
target = <function test_SetFromErrnoWithFilename_basic at 0x0000023736f3c9f8>
args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002373666c3a0>)
def execute_appex(self, space, target, *args):
self.space = space
space.getexecutioncontext().set_sys_exc_info(None)
try:
> target(*args)
tool\pytest\apptest.py:281:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002373666c3a0>,)
w_func = <Function test_SetFromErrnoWithFilename_basic>
args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002373666c3a0>
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:1409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, w_func = <Function test_SetFromErrnoWithFilename_basic>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002373666c3a0>,)
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):
if nargs < 4:
func = w_func.w_function
if isinstance(func, Function):
return func.funccall(w_func.w_instance, *args_w)
if isinstance(w_func, Function):
> return w_func.funccall(*args_w)
interpreter\baseobjspace.py:1237:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Function test_SetFromErrnoWithFilename_basic>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000002373666c3a0>,)
gateway = <module 'pypy.interpreter.gateway' from 'd:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\interpreter\\gateway.pyc'>
PyCode = <class 'pypy.interpreter.pycode.PyCode'>
code = <code object test_SetFromErrnoWithFilename_basic, file "[d:\pypy_stuff\buildbo...ve\own-win-x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", 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(self.name, self.qualname)
interpreter\function.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
name = 'test_SetFromErrnoWithFilename_basic'
qualname = 'test_SetFromErrnoWithFilename_basic'
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
e = UnicodeEncodeError('ascii', u'\n errno = EBADF;\n ... return NULL;\n ', 106, 107, 'ordinal not in range(128)')
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
pycode = <code object test_SetFromErrnoWithFilename_basic, file "[d:\pypy_stuff\buildbo...ve\own-win-x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1>
next_instr = 72
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000237327371d8>
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
co_code = '|\x00j\x00}\x01|\x01d\x00u\x00r\td\x01}\x01d\x02d\x00l\x01}\x02d\x02d\x00l\x02}\x03d\x02d\x00l\x03}\x04d\x03d\x04d\x0...01|\x07j\tj\nd\x13k\x02\x90\x01s\x0cJ\x00\x82\x01|\x07j\tj\x14d\x14k\x02\x90\x01s\x15J\x00\x82\x01d\x00S\x00d\x00S\x00'
next_instr = 72
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000237327371d8>
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 test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
co_code = '|\x00j\x00}\x01|\x01d\x00u\x00r\td\x01}\x01d\x02d\x00l\x01}\x02d\x02d\x00l\x02}\x03d\x02d\x00l\x03}\x04d\x03d\x04d\x0...01|\x07j\tj\nd\x13k\x02\x90\x01s\x0cJ\x00\x82\x01|\x07j\tj\x14d\x14k\x02\x90\x01s\x15J\x00\x82\x01d\x00S\x00d\x00S\x00'
next_instr = 102
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x00000237327371d8>
@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)
next_instr = r_uint(self.last_instr)
opcode = ord(co_code[next_instr])
oparg = ord(co_code[next_instr + 1])
next_instr += 2
# note: the structure of the code here is such that it makes
# (after translation) a big "if/elif" chain, which is then
# turned into computed gotos.
while opcode == opcodedesc.EXTENDED_ARG.index:
opcode = ord(co_code[next_instr])
arg = ord(co_code[next_instr + 1])
if opcode < HAVE_ARGUMENT:
raise BytecodeCorruption
next_instr += 2
oparg = (oparg * 256) | arg
if opcode == opcodedesc.RETURN_VALUE.index:
self.frame_finished_execution = True # for generators
raise Return
elif opcode == opcodedesc.JUMP_ABSOLUTE.index:
return self.jump_absolute(oparg, next_instr, ec)
elif opcode == opcodedesc.RERAISE.index:
return self.RERAISE(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:
return self.JUMP_IF_FALSE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index:
return self.JUMP_IF_TRUE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index:
return self.POP_JUMP_IF_FALSE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index:
return self.POP_JUMP_IF_TRUE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NONE(oparg, next_instr)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NOT_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NOT_NONE(oparg, next_instr)
elif opcode == opcodedesc.JUMP_IF_NOT_EXC_MATCH.index:
next_instr = self.JUMP_IF_NOT_EXC_MATCH(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_FLOOR_DIVIDE.index:
self.BINARY_FLOOR_DIVIDE(oparg, next_instr)
elif opcode == opcodedesc.BINARY_MATRIX_MULTIPLY.index:
self.BINARY_MATRIX_MULTIPLY(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_CONST_KEY_MAP.index:
self.BUILD_CONST_KEY_MAP(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_EX.index:
self.CALL_FUNCTION_EX(oparg, next_instr)
elif opcode == opcodedesc.CALL_METHOD.index:
self.CALL_METHOD(oparg, next_instr)
elif opcode == opcodedesc.CALL_METHOD_KW.index:
> self.CALL_METHOD_KW(oparg, next_instr)
interpreter\pyopcode.py:315:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_SetFromE...x86-64\build\pypy\module\cpyext\test\test_pyerrors.py:250]", line 1> at line 56
n_arguments = 2, ignored = (102,)
W_AbstractTupleObject = <class 'pypy.objspace.std.tupleobject.W_AbstractTupleObject'>
w_self = None, space = StdObjSpace
@jit.unroll_safe
def CALL_METHOD_KW(f, n_arguments, *ignored):
from pypy.objspace.std.tupleobject import W_AbstractTupleObject
# opargs contains the arg + kwarg count, excluding the implicit 'self'
w_self = f.peekvalue_maybe_none(n_arguments + 1)
space = f.space
# like in BUILD_CONST_KEY_MAP we can't use space.fixedview because then
# the immutability of the tuple is lost
w_tup_varnames = space.interp_w(W_AbstractTupleObject, f.popvalue())
n_keywords = space.len_w(w_tup_varnames)
keyword_names_w = [None] * n_keywords
keywords_w = [None] * n_keywords
for i in range(n_keywords):
keyword_names_w[i] = w_tup_varnames.getitem(space, i)
w_value = f.peekvalue(n_keywords - 1 - i)
keywords_w[i] = w_value
f.dropvalues(n_keywords)
n_arguments -= n_keywords
n = n_arguments + (w_self is not None)
arguments = f.popvalues(n) # includes w_self if it is not None
if w_self is None:
f.popvalue_maybe_none() # removes w_self, which is None
w_callable = f.popvalue()
args = f.argument_factory(
arguments, keyword_names_w, keywords_w, None, None,
methodcall=w_self is not None, w_function=w_callable)
if f.get_is_being_profiled() and function.is_builtin_code(w_callable):
w_result = f.space.call_args_and_c_profile(f, w_callable, args)
else:
> w_result = f.space.call_args(w_callable, args)
objspace\std\callmethod.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, w_obj = <FunctionWithFixedCode import_extension>
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....n '))])], ['prologue'], [W_UnicodeObject('#include <errno.h>')])
def call_args(space, w_obj, args):
# two special cases for performance
if isinstance(w_obj, Function):
> return w_obj.call_args(args)
objspace\descroperation.py:201:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <FunctionWithFixedCode import_extension>
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....n '))])], ['prologue'], [W_UnicodeObject('#include <errno.h>')])
def call_args(self, args):
# delegate activation to code
> w_res = self.getcode().funcrun(self, args)
interpreter\function.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000002373685c4b8>
func = <FunctionWithFixedCode import_extension>
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....n '))])], ['prologue'], [W_UnicodeObject('#include <errno.h>')])
def funcrun(self, func, args):
> return BuiltinCode.funcrun_obj(self, func, None, args)
interpreter\gateway.py:869:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000002373685c4b8>
func = <FunctionWithFixedCode import_extension>, w_obj = None
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....n '))])], ['prologue'], [W_UnicodeObject('#include <errno.h>')])
def funcrun_obj(self, func, w_obj, args):
space = func.space
activation = self.activation
scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
func.defs_w, func.w_kw_defs, self.minargs)
try:
w_result = activation._run(space, scope_w)
except DescrMismatch:
if w_obj is not None:
args = args.prepend(w_obj)
return self._type_unwrap_mismatch(space, args)
except Exception as e:
> self.handle_exception(space, e)
interpreter\gateway.py:884:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000002373685c4b8>
space = StdObjSpace
e = UnicodeEncodeError('ascii', u'\n errno = EBADF;\n ... return NULL;\n ', 106, 107, 'ordinal not in range(128)')
def handle_exception(self, space, e):
try:
if not we_are_translated():
raise
raise e
except OperationError:
raise
except Exception as e: # general fall-back
from pypy.interpreter import error
> raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:908:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000002373685c4b8>
func = <FunctionWithFixedCode import_extension>, w_obj = None
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....n '))])], ['prologue'], [W_UnicodeObject('#include <errno.h>')])
def funcrun_obj(self, func, w_obj, args):
space = func.space
activation = self.activation
scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
func.defs_w, func.w_kw_defs, self.minargs)
try:
> w_result = activation._run(space, scope_w)
interpreter\gateway.py:878:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinActivation_UwS_ObjSpace_text_W_Root_text_W_Root_text_bool object at 0x000002373685c758>
space = StdObjSpace
scope_w = [W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject.ObjectListStrategy object at 0x0000...or, code, ar...rn NULL;\n '))]), W_UnicodeObject('#include <errno.h>'), None, W_UnicodeObject(''), W_BoolObject(False)]
def _run(self, space, scope_w):
> return self.behavior(space, space.text_w(scope_w[0]), scope_w[1], space.text_w(scope_w[2]), scope_w[3], space.text_w(scope_w[4]), space.is_true(scope_w[5]))
<6978-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, modname = 'foo'
w_functions = W_ListObject(<pypy.objspace.std.listobject.ObjectListStrategy object at 0x0000...or, code, arg1, arg2);\n return NULL;\n '))])
prologue = '#include <errno.h>', w_include_dirs = None, more_init = ''
PY_SSIZE_T_CLEAN = False
@unwrap_spec(modname='text', prologue='text',
more_init='text', PY_SSIZE_T_CLEAN=bool)
def import_extension(space, modname, w_functions, prologue="",
w_include_dirs=None, more_init="", PY_SSIZE_T_CLEAN=False):
functions = space.unwrap(w_functions)
include_dirs = _unwrap_include_dirs(space, w_include_dirs)
# If there's already a module under this name (file-based or a
# previous inline extension), save it in _module_keepalive before
# it's displaced. This prevents its raw allocations (method-name
# strings, type dicts, etc.) from being freed during a later
# test's leakfinder tracking window.
self._file_module_cache.pop(modname, None)
w_modules = space.sys.get('modules')
try:
w_old = space.getitem(w_modules, space.newtext(modname))
self._module_keepalive.append(w_old)
except OperationError:
pass
w_result = self.sys_info.import_extension(
modname, functions, prologue, include_dirs, more_init,
> PY_SSIZE_T_CLEAN)
module\cpyext\test\test_cpyext.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x0000023736989c20>
modname = 'foo'
functions = [(u'set_from_errno', u'METH_NOARGS', u'\n errno = EBADF;\n PyErr_SetFromErrnoWithFilen...mWindowsErrWithFilenameObjects(PyExc_OSError, code, arg1, arg2);\n return NULL;\n ')]
prologue = '#include <errno.h>', include_dirs = None, more_init = ''
PY_SSIZE_T_CLEAN = False
def import_extension(self, modname, functions, prologue="",
include_dirs=None, more_init="", PY_SSIZE_T_CLEAN=False):
> body = prologue + make_methods(functions, modname)
tool\cpyext\extbuild.py:88:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
functions = [(u'set_from_errno', u'METH_NOARGS', u'\n errno = EBADF;\n PyErr_SetFromErrnoWithFilen...mWindowsErrWithFilenameObjects(PyExc_OSError, code, arg1, arg2);\n return NULL;\n ')]
modname = 'foo'
def make_methods(functions, modname):
methods_table = []
codes = []
for funcname, flags, code in functions:
cfuncname = "%s_%s" % (modname, funcname)
if 'METH_FASTCALL' in flags and 'METH_KEYWORDS' in flags:
signature = ('(PyObject *self, PyObject *const *args, '
'Py_ssize_t len_args, PyObject *kwnames)')
elif 'METH_KEYWORDS' in flags:
signature = '(PyObject *self, PyObject *args, PyObject *kwargs)'
elif 'METH_FASTCALL' in flags:
signature = ('(PyObject *self, PyObject *const *args, '
'Py_ssize_t len_args)')
else:
signature = '(PyObject *self, PyObject *args)'
methods_table.append(
"{\"%s\", (PyCFunction)%s, %s}," % (funcname, cfuncname, flags))
func_code = """
static PyObject* {cfuncname}{signature}
{{
{code}
}}
> """.format(cfuncname=cfuncname, signature=signature, code=code)
E UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 106: ordinal not in range(128)
tool\cpyext\extbuild.py:139: UnicodeEncodeError
=========================== short test summary info ===========================
FAIL module\cpyext\test\test_pyerrors.py::AppTestFetch::()::test_SetFromErrnoWithFilename_basic
============== 1 failed, 28 passed, 4 skipped in 279.96 seconds ===============
++ 07:30:07 starting module/cpyext/test/test_pystrtod.py [90 started in total]
__ module/cpyext/test/test_pysignals.py [87 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_pysignals.py .
========================= 1 passed in 132.90 seconds ==========================
++ 07:30:13 starting module/cpyext/test/test_sequence.py [91 started in total]
__ module/cpyext/test/test_pystate.py [88 done in total, somefailed=False] ____
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 14 items
module\cpyext\test\test_pystate.py ....x.....sx..
============== 11 passed, 1 skipped, 2 xfailed in 176.59 seconds ==============
++ 07:32:57 starting module/cpyext/test/test_setobject.py [92 started in total]
__ module/cpyext/test/test_pystrhex.py [89 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_pystrhex.py .
========================= 1 passed in 168.96 seconds ==========================
++ 07:33:00 starting module/cpyext/test/test_sliceobject.py [93 started in total]
__ module/cpyext/test/test_pystrtod.py [90 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 20 items
module\cpyext\test\test_pystrtod.py ....................
========================= 20 passed in 161.89 seconds =========================
++ 07:33:25 starting module/cpyext/test/test_structseq.py [94 started in total]
__ module/cpyext/test/test_sequence.py [91 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 23 items
module\cpyext\test\test_sequence.py .......................
========================= 23 passed in 172.21 seconds =========================
++ 07:33:45 starting module/cpyext/test/test_sysmodule.py [95 started in total]
__ module/cpyext/test/test_sliceobject.py [92 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 8 items
module\cpyext\test\test_sliceobject.py ........
========================= 8 passed in 119.36 seconds ==========================
++ 07:35:42 starting module/cpyext/test/test_thread.py [96 started in total]
__ module/cpyext/test/test_setobject.py [93 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 9 items
module\cpyext\test\test_setobject.py .........
========================= 9 passed in 129.73 seconds ==========================
++ 07:35:45 starting module/cpyext/test/test_traceback.py [97 started in total]
__ module/cpyext/test/test_structseq.py [94 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_structseq.py .
========================= 1 passed in 132.71 seconds ==========================
++ 07:36:21 starting module/cpyext/test/test_translate.py [98 started in total]
__ module/cpyext/test/test_sysmodule.py [95 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_sysmodule.py ...
========================= 3 passed in 119.32 seconds ==========================
++ 07:36:48 starting module/cpyext/test/test_tupleobject.py [99 started in total]
__ module/cpyext/test/test_translate.py [96 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_translate.py .
========================== 1 passed in 23.66 seconds ==========================
++ 07:37:27 starting module/cpyext/test/test_typedeallocate.py [100 started in total]
__ module/cpyext/test/test_traceback.py [97 done in total, somefailed=False] __
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items
module\cpyext\test\test_traceback.py .
========================== 1 passed in 66.55 seconds ==========================
++ 07:37:28 starting module/cpyext/test/test_typeobject.py [101 started in total]
__ module/cpyext/test/test_thread.py [98 done in total, somefailed=True] ______
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 6 items
module\cpyext\test\test_thread.py x..Fx.
================================== FAILURES ===================================
________________________ AppTestThread.test_timed_lock ________________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00000206b9c20800>
def test_timed_lock(self):
module = self.import_extension('foo', [
("timed_acquire_lock", "METH_O",
"""
#ifndef PyThread_acquire_lock_timed
#error "seems we are not accessing PyPy's functions"
#endif
PyLockStatus acquire_result;
int microseconds = PyLong_AsLong(args);
Py_BEGIN_ALLOW_THREADS
acquire_result = PyThread_acquire_lock_timed(global_lock, microseconds, 0);
Py_END_ALLOW_THREADS
if (acquire_result == PY_LOCK_ACQUIRED) {
Py_RETURN_TRUE;
} else {
Py_RETURN_FALSE;
}
"""),
("release_lock", "METH_NOARGS",
"""
PyThread_release_lock(global_lock);
Py_RETURN_NONE;
"""),
("cleanup_lock", "METH_NOARGS",
"""
// cleanup isn't part of the test, but I'd feel guilty otherwise
PyThread_free_lock(global_lock); global_lock=NULL;
Py_RETURN_NONE;
"""
)
],
prologue="static PyThread_type_lock global_lock;",
more_init="global_lock = PyThread_allocate_lock();"
)
try:
import threading
import time
failure = []
assert module.timed_acquire_lock(-1)
main_thread_should_release_the_lock_barrier = threading.Barrier(2)
def thread_func():
try:
if module.timed_acquire_lock(0):
failure.append("Lock should be held elsewhere")
return
if module.timed_acquire_lock(1):
failure.append("Lock should be held elsewhere")
return
finally:
main_thread_should_release_the_lock_barrier.wait()
if not module.timed_acquire_lock(1000000):
failure.append("Lock should have become available")
return
module.release_lock()
thread = threading.Thread(target=thread_func)
thread.start()
main_thread_should_release_the_lock_barrier.wait()
# At this point, thread_func should be waiting 1s for the lock,
# so sleep a short amount of time then let it have the lock.
time.sleep(0.01)
module.release_lock()
thread.join()
> assert not failure, failure
E (application-level) AssertionError: ['Lock should have become available']
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\cpyext\test\test_thread.py:84]:65: AssertionError
---------------------------- Captured stdout call -----------------------------
source_0.c
Creating library d:\systemtemp\pytest\usession-py3.11-1071\foo-2\foo.lib and object d:\systemtemp\pytest\usession-py3.11-1071\foo-2\foo.exp
Generating code
Finished generating code
---------------------------- Captured stderr call -----------------------------
<function PyModule_Create2 at 0x00000206bb1fb970> DONE
<function PyLong_AsLong at 0x00000206bb2287a0> DONE
<function PyEval_SaveThread at 0x00000206ba7edf10> DONE
<function PyEval_RestoreThread at 0x00000206ba7ede20> DONE
<function PyLong_AsLong at 0x00000206bb2287a0> DONE
<function PyEval_SaveThread at 0x00000206ba7edf10> DONE
<function PyEval_RestoreThread at 0x00000206ba7ede20> DONE
<function PyLong_AsLong at 0x00000206bb2287a0> DONE
<function PyEval_SaveThread at 0x00000206ba7edf10> DONE
<function PyEval_RestoreThread at 0x00000206ba7ede20> DONE
<function PyLong_AsLong at 0x00000206bb2287a0> DONE
<function PyEval_SaveThread at 0x00000206ba7edf10> DONE
<function PyEval_RestoreThread at 0x00000206ba7ede20> DONE
=========================== short test summary info ===========================
FAIL module\cpyext\test\test_thread.py::AppTestThread::()::test_timed_lock
=============== 1 failed, 3 passed, 2 xfailed in 163.64 seconds ===============
++ 07:39:00 starting module/cpyext/test/test_unicodeobject.py [102 started in total]
__ module/cpyext/test/test_tupleobject.py [99 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 10 items
module\cpyext\test\test_tupleobject.py ..........
========================= 10 passed in 155.79 seconds =========================
++ 07:40:13 starting module/cpyext/test/test_userslots.py [103 started in total]
__ module/cpyext/test/test_typedeallocate.py [100 done in total, somefailed=False]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 5 items
module\cpyext\test\test_typedeallocate.py ..s..
==================== 4 passed, 1 skipped in 180.11 seconds ====================
++ 07:41:07 starting module/cpyext/test/test_version.py [104 started in total]
__ module/cpyext/test/test_unicodeobject.py [101 done in total, somefailed=True]
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 62 items
module\cpyext\test\test_unicodeobject.py .......................................FF.....................
================================== FAILURES ===================================
____________________________ TestUnicode.test_mbcs ____________________________
self = <pypy.module.cpyext.test.test_unicodeobject.TestUnicode object at 0x000001dca31c05d0>
space = StdObjSpace
def test_mbcs(self, space):
if sys.platform != 'win32':
py.test.skip("mcbs encoding only exists on Windows")
unichars = u"abc"
wbuf = rffi.unicode2wcharp(unichars)
try:
w_bytes = PyUnicode_EncodeMBCS(space, wbuf, 3, None)
finally:
rffi.free_wcharp(wbuf)
assert space.type(w_bytes) is space.w_bytes
> assert space.utf8_w(w_bytes) == "abc"
module\cpyext\test\test_unicodeobject.py:1225:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interpreter\baseobjspace.py:1957: in utf8_w
return w_obj.utf8_w(self)
interpreter\baseobjspace.py:274: in utf8_w
self._typed_unwrap_error(space, "str")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = W_BytesObject('abc'), space = StdObjSpace, expected = 'str'
def _typed_unwrap_error(self, space, expected):
raise oefmt(space.w_TypeError,
> "expected %s, got %T object", expected, self)
E OpErrFmt: [<W_TypeObject 'TypeError' at 0x1dca21daaa0>: expected str, got bytes object]
interpreter\baseobjspace.py:318: OpErrFmt
__________________________ TestUnicode.test_codepage __________________________
self = <pypy.module.cpyext.test.test_unicodeobject.TestUnicode object at 0x000001dca01dc288>
space = StdObjSpace
def test_codepage(self, space):
if sys.platform != 'win32':
py.test.skip("codepage encoding only exists on Windows")
chars = "abc"
w_obj = space.newtext(chars)
w_bytes = PyUnicode_EncodeCodePage(space, 932, w_obj, None)
assert space.type(w_bytes) is space.w_bytes
> assert space.utf8_w(w_bytes) == "abc"
module\cpyext\test\test_unicodeobject.py:1234:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
interpreter\baseobjspace.py:1957: in utf8_w
return w_obj.utf8_w(self)
interpreter\baseobjspace.py:274: in utf8_w
self._typed_unwrap_error(space, "str")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = W_BytesObject('abc'), space = StdObjSpace, expected = 'str'
def _typed_unwrap_error(self, space, expected):
raise oefmt(space.w_TypeError,
> "expected %s, got %T object", expected, self)
E OpErrFmt: [<W_TypeObject 'TypeError' at 0x1dca21daaa0>: expected str, got bytes object]
interpreter\baseobjspace.py:318: OpErrFmt
=========================== short test summary info ===========================
FAIL module\cpyext\test\test_unicodeobject.py::TestUnicode::()::test_mbcs
FAIL module\cpyext\test\test_unicodeobject.py::TestUnicode::()::test_codepage
==================== 2 failed, 60 passed in 372.98 seconds ====================
++ 07:46:04 starting module/cpyext/test/test_weakref.py [105 started in total]
__ module/cpyext/test/test_typeobject.py [102 done in total, somefailed=True] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 64 items
module\cpyext\test\test_typeobject.py ...................s..............................F....s........
================================== FAILURES ===================================
___________________ AppTestSlots.test_multiple_inheritance3 ___________________
self = <CallInfo when='call' exception: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2>
func = <function <lambda> at 0x000001feb73687a0>, 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_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_multiple_inheritance3'>}
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 0x000001fea3961440>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl instance at 0x000001feab4672e0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_multiple_inheritance3'>}
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 0x000001feab4672e0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <AppTestMethod 'test_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <AppTestMethod 'test_multiple_inheritance3'>}
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_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x000001feb63dc278>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...heritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001feb64dee60>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001feb64dee60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...heritance3'>, '__multicall__': <_MultiCall 0 results, 1 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_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_call at 0x000001feb63dc228>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...heritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001feb64deae0>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001feb64deae0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'i...heritance3'>, '__multicall__': <_MultiCall 0 results, 1 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_multiple_inheritance3'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.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_multiple_inheritance3'>
def pytest_runtest_call(item):
try:
> item.runtest()
..\_pytest\runner.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_multiple_inheritance3'>
def runtest(self):
target = self.obj
src = extract_docstring_if_empty_function(target.im_func)
space = target.im_self.space
if self.config.option.runappdirect:
appexec_definitions = self.parent.obj.__dict__
spaceconfig = getattr(self.parent.obj, 'spaceconfig', None)
usemodules = spaceconfig.get('usemodules') if spaceconfig else None
return run_with_python(self.config.option.python, src, usemodules,
**appexec_definitions)
filename = self._getdynfilename(target)
func = app2interp_temp(src, filename=filename)
w_instance = self.parent.w_instance
> self.execute_appex(space, func, space, w_instance)
tool\pytest\apptest.py:345:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <AppTestMethod 'test_multiple_inheritance3'>, space = StdObjSpace
target = <function test_multiple_inheritance3 at 0x000001feb7380020>
args = (StdObjSpace, <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001feb4050058>)
def execute_appex(self, space, target, *args):
self.space = space
space.getexecutioncontext().set_sys_exc_info(None)
try:
> target(*args)
tool\pytest\apptest.py:281:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001feb4050058>,)
w_func = <Function test_multiple_inheritance3>
args = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001feb4050058>
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:1409:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, w_func = <Function test_multiple_inheritance3>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001feb4050058>,)
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):
if nargs < 4:
func = w_func.w_function
if isinstance(func, Function):
return func.funccall(w_func.w_instance, *args_w)
if isinstance(w_func, Function):
> return w_func.funccall(*args_w)
interpreter\baseobjspace.py:1237:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Function test_multiple_inheritance3>
args_w = (<pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x000001feb4050058>,)
gateway = <module 'pypy.interpreter.gateway' from 'd:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\interpreter\\gateway.pyc'>
PyCode = <class 'pypy.interpreter.pycode.PyCode'>
code = <code object test_multiple_inheritance3, file "[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", 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(self.name, self.qualname)
interpreter\function.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
name = 'test_multiple_inheritance3', qualname = 'test_multiple_inheritance3'
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
e = CompileError(DistutilsExecError("command 'd:\\\\Microsoft Visual Studio\\\\202...\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\cl.exe' failed with exit status 2",),)
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
pycode = <code object test_multiple_inheritance3, file "[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1>
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001feaa582b48>
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
co_code = '|\x00\xa0\x00d\x01d\x02d\x03d\x04d\x05d\x06d\x07d\x08g\x07\xa1\x02}\x01|\x01\xa0\x01\xa1\x00}\x02d\tt\x02|\x02\x83\x0...04\x83\x04}\x05|\x05\x83\x00}\x02t\r|\x02|\x03\x83\x02sxJ\x00\x82\x01t\r|\x02|\x04\x83\x02s\x7fJ\x00\x82\x01d\x00S\x00'
next_instr = 0L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001feaa582b48>
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 test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
co_code = '|\x00\xa0\x00d\x01d\x02d\x03d\x04d\x05d\x06d\x07d\x08g\x07\xa1\x02}\x01|\x01\xa0\x01\xa1\x00}\x02d\tt\x02|\x02\x83\x0...04\x83\x04}\x05|\x05\x83\x00}\x02t\r|\x02|\x03\x83\x02sxJ\x00\x82\x01t\r|\x02|\x04\x83\x02s\x7fJ\x00\x82\x01d\x00S\x00'
next_instr = 24L
ec = <pypy.interpreter.executioncontext.ExecutionContext object at 0x000001feaa582b48>
@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)
next_instr = r_uint(self.last_instr)
opcode = ord(co_code[next_instr])
oparg = ord(co_code[next_instr + 1])
next_instr += 2
# note: the structure of the code here is such that it makes
# (after translation) a big "if/elif" chain, which is then
# turned into computed gotos.
while opcode == opcodedesc.EXTENDED_ARG.index:
opcode = ord(co_code[next_instr])
arg = ord(co_code[next_instr + 1])
if opcode < HAVE_ARGUMENT:
raise BytecodeCorruption
next_instr += 2
oparg = (oparg * 256) | arg
if opcode == opcodedesc.RETURN_VALUE.index:
self.frame_finished_execution = True # for generators
raise Return
elif opcode == opcodedesc.JUMP_ABSOLUTE.index:
return self.jump_absolute(oparg, next_instr, ec)
elif opcode == opcodedesc.RERAISE.index:
return self.RERAISE(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:
return self.JUMP_IF_FALSE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.JUMP_IF_TRUE_OR_POP.index:
return self.JUMP_IF_TRUE_OR_POP(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_FALSE.index:
return self.POP_JUMP_IF_FALSE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_IF_TRUE.index:
return self.POP_JUMP_IF_TRUE(oparg, next_instr, ec)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NONE(oparg, next_instr)
elif opcode == opcodedesc.POP_JUMP_FORWARD_IF_NOT_NONE.index:
next_instr = self.POP_JUMP_FORWARD_IF_NOT_NONE(oparg, next_instr)
elif opcode == opcodedesc.JUMP_IF_NOT_EXC_MATCH.index:
next_instr = self.JUMP_IF_NOT_EXC_MATCH(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_FLOOR_DIVIDE.index:
self.BINARY_FLOOR_DIVIDE(oparg, next_instr)
elif opcode == opcodedesc.BINARY_MATRIX_MULTIPLY.index:
self.BINARY_MATRIX_MULTIPLY(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_CONST_KEY_MAP.index:
self.BUILD_CONST_KEY_MAP(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_EX.index:
self.CALL_FUNCTION_EX(oparg, next_instr)
elif opcode == opcodedesc.CALL_METHOD.index:
> self.CALL_METHOD(oparg, next_instr)
interpreter\pyopcode.py:313:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
f = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
oparg = 2, ignored = (24L,), n_args = 2, w_self = None, n = 2
@jit.unroll_safe
def CALL_METHOD(f, oparg, *ignored):
# opargs contains the arg, and kwarg count, excluding the implicit 'self'
n_args = oparg
w_self = f.peekvalue_maybe_none(n_args)
n = n_args + (w_self is not None)
w_callable = f.peekvalue(n_args + 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:93:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = StdObjSpace, w_func = <FunctionWithFixedCode import_extension>, nargs = 2
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
dropvalues = 4, 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, w_function=w_func)
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):
# reuse callable stack place for w_inst
frame.settopvalue(w_func.w_instance, nargs)
nargs += 1
methodcall = True
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:1264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <FunctionWithFixedCode import_extension>, nargs = 2
frame = <pypy.objspace.std.frame.StdObjSpaceFrame executing <code object test_multiple...6-64\build\pypy\module\cpyext\test\test_typeobject.py:1712]", line 1> at line 2
dropvalues = 4, 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)
elif fast_natural_arity == Code.PASSTHROUGHARGS1 and nargs >= 1:
assert isinstance(code, gateway.BuiltinCodePassThroughArguments1)
w_obj = frame.peekvalue(nargs-1)
args = frame.make_arguments(nargs-1, w_function=self)
frame.dropvalues(dropvalues)
return code.funcrun_obj(self, w_obj, args)
args = frame.make_arguments(nargs, methodcall=methodcall, w_function=self)
frame.dropvalues(dropvalues)
> return self.call_args(args)
interpreter\function.py:203:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <FunctionWithFixedCode import_extension>
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....ucceed");\n }\n return NULL;\n '))])])
def call_args(self, args):
# delegate activation to code
> w_res = self.getcode().funcrun(self, args)
interpreter\function.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000001feb24f7e18>
func = <FunctionWithFixedCode import_extension>
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....ucceed");\n }\n return NULL;\n '))])])
def funcrun(self, func, args):
> return BuiltinCode.funcrun_obj(self, func, None, args)
interpreter\gateway.py:869:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000001feb24f7e18>
func = <FunctionWithFixedCode import_extension>, w_obj = None
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....ucceed");\n }\n return NULL;\n '))])])
def funcrun_obj(self, func, w_obj, args):
space = func.space
activation = self.activation
scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
func.defs_w, func.w_kw_defs, self.minargs)
try:
w_result = activation._run(space, scope_w)
except DescrMismatch:
if w_obj is not None:
args = args.prepend(w_obj)
return self._type_unwrap_mismatch(space, args)
except Exception as e:
> self.handle_exception(space, e)
interpreter\gateway.py:884:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000001feb24f7e18>
space = StdObjSpace
e = CompileError(DistutilsExecError("command 'd:\\\\Microsoft Visual Studio\\\\202...\14.41.34120\\\\bin\\\\HostX64\\\\x64\\\\cl.exe' failed with exit status 2",),)
def handle_exception(self, space, e):
try:
if not we_are_translated():
raise
raise e
except OperationError:
raise
except Exception as e: # general fall-back
from pypy.interpreter import error
> raise error.get_converted_unexpected_exception(space, e)
interpreter\gateway.py:908:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinCode object at 0x000001feb24f7e18>
func = <FunctionWithFixedCode import_extension>, w_obj = None
args = Arguments([W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject....ucceed");\n }\n return NULL;\n '))])])
def funcrun_obj(self, func, w_obj, args):
space = func.space
activation = self.activation
scope_w = args.parse_obj(w_obj, func.qualname, self.sig,
func.defs_w, func.w_kw_defs, self.minargs)
try:
> w_result = activation._run(space, scope_w)
interpreter\gateway.py:878:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.interpreter.gateway.BuiltinActivation_UwS_ObjSpace_text_W_Root_text_W_Root_text_bool object at 0x000001feb1edc058>
space = StdObjSpace
scope_w = [W_UnicodeObject('foo'), W_ListObject(<pypy.objspace.std.listobject.ObjectListStrategy object at 0x0000... succeed");\...\n return NULL;\n '))]), W_UnicodeObject(''), None, W_UnicodeObject(''), W_BoolObject(False)]
def _run(self, space, scope_w):
> return self.behavior(space, space.text_w(scope_w[0]), scope_w[1], space.text_w(scope_w[2]), scope_w[3], space.text_w(scope_w[4]), space.is_true(scope_w[5]))
<3285-codegen d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\tool\sourcetools.py:200>:3:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
space = StdObjSpace, modname = 'foo'
w_functions = W_ListObject(<pypy.objspace.std.listobject.ObjectListStrategy object at 0x0000... succeed");\n }\n return NULL;\n '))])
prologue = '', w_include_dirs = None, more_init = '', PY_SSIZE_T_CLEAN = False
@unwrap_spec(modname='text', prologue='text',
more_init='text', PY_SSIZE_T_CLEAN=bool)
def import_extension(space, modname, w_functions, prologue="",
w_include_dirs=None, more_init="", PY_SSIZE_T_CLEAN=False):
functions = space.unwrap(w_functions)
include_dirs = _unwrap_include_dirs(space, w_include_dirs)
# If there's already a module under this name (file-based or a
# previous inline extension), save it in _module_keepalive before
# it's displaced. This prevents its raw allocations (method-name
# strings, type dicts, etc.) from being freed during a later
# test's leakfinder tracking window.
self._file_module_cache.pop(modname, None)
w_modules = space.sys.get('modules')
try:
w_old = space.getitem(w_modules, space.newtext(modname))
self._module_keepalive.append(w_old)
except OperationError:
pass
w_result = self.sys_info.import_extension(
modname, functions, prologue, include_dirs, more_init,
> PY_SSIZE_T_CLEAN)
module\cpyext\test\test_cpyext.py:426:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x000001feb53fa218>
modname = 'foo'
functions = [(u'new_obj_small_basicsize', u'METH_NOARGS', u'\n /* Simulate pybind11: instance struct is PyObject_HE...add of long");\n return NULL;\n }\n Py_RETURN_NONE;\n '), ...]
prologue = '', include_dirs = None, more_init = '', PY_SSIZE_T_CLEAN = False
def import_extension(self, modname, functions, prologue="",
include_dirs=None, more_init="", PY_SSIZE_T_CLEAN=False):
body = prologue + make_methods(functions, modname)
init = """PyObject *mod = PyModule_Create(&moduledef);
"""
if more_init:
init += """#define INITERROR return NULL
"""
init += more_init
init += "\nreturn mod;"
return self.import_module(
name=modname, init=init, body=body, include_dirs=include_dirs,
> PY_SSIZE_T_CLEAN=PY_SSIZE_T_CLEAN)
tool\cpyext\extbuild.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x000001feb53fa218>
name = 'foo'
init = 'PyObject *mod = PyModule_Create(&moduledef);\n \nreturn mod;'
body = u'\n static PyObject* foo_new_obj_small_basicsize(PyObject *self, PyObject *args)\n {\n \n ...LL, /* m_doc */\n -1, /* m_size */\n methods, /* m_methods */\n };\n '
filename = None, include_dirs = None, PY_SSIZE_T_CLEAN = False, use_imp = False
def import_module(self, name, init=None, body='', filename=None,
include_dirs=None, PY_SSIZE_T_CLEAN=False, use_imp=False):
"""
init specifies the overall template of the module.
if init is None, the module source will be loaded from a file in this
test directory, give a name given by the filename parameter.
if filename is None, the module name will be used to construct the
filename.
"""
if body or init:
if init is None:
init = "return PyModule_Create(&moduledef);"
if init is not None:
code = make_source(name, init, body, PY_SSIZE_T_CLEAN)
kwds = dict(source_strings=[code])
else:
assert not PY_SSIZE_T_CLEAN
if filename is None:
filename = name
filename = HERE / (filename + ".c")
kwds = dict(source_files=[filename])
mod = self.compile_extension_module(
> name, include_dirs=include_dirs, **kwds)
tool\cpyext\extbuild.py:83:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pypy.module.cpyext.test.test_cpyext.SpaceCompiler object at 0x000001feb53fa218>
name = 'foo', include_dirs = []
source_files = [local('d:\\systemtemp\\pytest\\usession-py3.11-1076\\foo-16\\source_0.c')]
source_strings = [u'\n \n #include <Python.h>\n\n \n static PyObject* foo_new_obj_small_basicsize(PyObject *self, PyObj...\n PyInit_foo(void) {\n PyObject *mod = PyModule_Create(&moduledef);\n \nreturn mod;\n }\n ']
def compile_extension_module(self, name, include_dirs=None,
source_files=None, source_strings=None):
"""
Build an extension module and return the filename of the resulting
native code file.
name is the name of the module, possibly including dots if it is a
module inside a package.
"""
include_dirs = include_dirs or []
modname = name.split('.')[-1]
dirname = self.get_builddir(name=modname)
if source_strings:
assert not source_files
files = convert_sources_to_files(source_strings, dirname)
source_files = files
soname = c_compile(source_files, outputfilename=str(dirname / modname),
compile_extra=self.compile_extra,
link_extra=self.link_extra,
include_dirs=self.include_extra + include_dirs,
> libraries=self.extra_libs)
tool\cpyext\extbuild.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cfilenames = [local('d:\\systemtemp\\pytest\\usession-py3.11-1076\\foo-16\\source_0.c')]
outputfilename = local('d:\\systemtemp\\pytest\\usession-py3.11-1076\\foo-16\\foo.dll')
compile_extra = ['/we4013', '/c', '/nologo', '/Ox', '/W3', '/GL', ...]
link_extra = ['/NODEFAULTLIB:Python311.lib', '/DEBUG']
include_dirs = [local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\module\\cpyext\\PC'), local('d:\\systemtemp\\p...py\\module\\cpyext\\parse'), local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\rpython\\translator\\c')]
libraries = ['d:\\systemtemp\\pytest\\usession-py3.11-1076\\module_cache\\pypyapi']
library_dirs = []
def c_compile(cfilenames, outputfilename,
compile_extra=None, link_extra=None,
include_dirs=None, libraries=None, library_dirs=None):
compile_extra = compile_extra or []
link_extra = link_extra or []
include_dirs = include_dirs or []
libraries = libraries or []
library_dirs = library_dirs or []
if sys.platform == 'win32':
link_extra = link_extra + ['/DEBUG'] # generate .pdb file
if sys.platform == 'darwin':
# support Fink & Darwinports
for s in ('/sw/', '/opt/local/'):
if (s + 'include' not in include_dirs
and os.path.exists(s + 'include')):
include_dirs.append(s + 'include')
if s + 'lib' not in library_dirs and os.path.exists(s + 'lib'):
library_dirs.append(s + 'lib')
outputfilename = py.path.local(outputfilename).new(ext=so_ext)
saved_environ = os.environ.copy()
try:
_build(
cfilenames, outputfilename,
compile_extra, link_extra,
> include_dirs, libraries, library_dirs)
tool\cpyext\extbuild.py:200:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cfilenames = [local('d:\\systemtemp\\pytest\\usession-py3.11-1076\\foo-16\\source_0.c')]
outputfilename = local('d:\\systemtemp\\pytest\\usession-py3.11-1076\\foo-16\\foo.dll')
compile_extra = ['/we4013', '/c', '/nologo', '/Ox', '/W3', '/GL', ...]
link_extra = ['/NODEFAULTLIB:Python311.lib', '/DEBUG']
include_dirs = [local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\module\\cpyext\\PC'), local('d:\\systemtemp\\p...py\\module\\cpyext\\parse'), local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\rpython\\translator\\c')]
libraries = ['d:\\systemtemp\\pytest\\usession-py3.11-1076\\module_cache\\pypyapi']
library_dirs = []
def _build(cfilenames, outputfilename, compile_extra, link_extra,
include_dirs, libraries, library_dirs):
try:
# monkeypatch distutils for some versions of msvc compiler
import setuptools
except ImportError:
# XXX if this fails and is required,
# we must call pypy -mensurepip after translation
pass
from distutils.ccompiler import new_compiler
from distutils import sysconfig
# XXX for Darwin running old versions of CPython 2.7.x
sysconfig.get_config_vars()
compiler = new_compiler(force=1)
sysconfig.customize_compiler(compiler) # XXX
objects = []
for cfile in cfilenames:
cfile = py.path.local(cfile)
old = cfile.dirpath().chdir()
try:
res = compiler.compile([cfile.basename],
> include_dirs=include_dirs, extra_preargs=compile_extra)
tool\cpyext\extbuild.py:232:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler instance at 0x000001feae112b20>
sources = ['source_0.c'], output_dir = None, macros = []
include_dirs = [local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\module\\cpyext\\PC'), local('d:\\systemtemp\\p...py\\module\\cpyext\\parse'), local('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\rpython\\translator\\c')]
debug = 0
extra_preargs = ['/we4013', '/c', '/nologo', '/Ox', '/W3', '/GL', ...]
extra_postargs = [], depends = None
def compile(self, sources,
output_dir=None, macros=None, include_dirs=None, debug=0,
extra_preargs=None, extra_postargs=None, depends=None):
if not self.initialized:
self.initialize()
compile_info = self._setup_compile(output_dir, macros, include_dirs,
sources, depends, extra_postargs)
macros, objects, extra_postargs, pp_opts, build = compile_info
compile_opts = extra_preargs or []
compile_opts.append('/c')
if debug:
compile_opts.extend(self.compile_options_debug)
else:
compile_opts.extend(self.compile_options)
add_cpp_opts = False
for obj in objects:
try:
src, ext = build[obj]
except KeyError:
continue
if debug:
# pass the full pathname to MSVC in debug mode,
# this allows the debugger to find the source file
# without asking the user to browse for it
src = os.path.abspath(src)
if ext in self._c_extensions:
input_opt = "/Tc" + src
elif ext in self._cpp_extensions:
input_opt = "/Tp" + src
add_cpp_opts = True
elif ext in self._rc_extensions:
# compile .RC to .RES file
input_opt = src
output_opt = "/fo" + obj
try:
self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
except DistutilsExecError as msg:
raise CompileError(msg)
continue
elif ext in self._mc_extensions:
# Compile .MC to .RC file to .RES file.
# * '-h dir' specifies the directory for the
# generated include file
# * '-r dir' specifies the target directory of the
# generated RC file and the binary message resource
# it includes
#
# For now (since there are no options to change this),
# we use the source-directory for the include file and
# the build directory for the RC file and message
# resources. This works at least for win32all.
h_dir = os.path.dirname(src)
rc_dir = os.path.dirname(obj)
try:
# first compile .MC to .RC and .H file
self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
base, _ = os.path.splitext(os.path.basename (src))
rc_file = os.path.join(rc_dir, base + '.rc')
# then compile .RC to .RES file
self.spawn([self.rc, "/fo" + obj, rc_file])
except DistutilsExecError as msg:
raise CompileError(msg)
continue
else:
# how to handle this file?
raise CompileError("Don't know how to compile {} to {}"
.format(src, obj))
args = [self.cc] + compile_opts + pp_opts
if add_cpp_opts:
args.append('/EHsc')
args.append(input_opt)
args.append("/Fo" + obj)
args.extend(extra_postargs)
try:
self.spawn(args)
except DistutilsExecError as msg:
> raise CompileError(msg)
E CompileError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX64\\x64\\cl.exe' failed with exit status 2
d:\pypy_stuff\pypy2.7-v7.3.18\lib-python\2.7\distutils\_msvccompiler.py:403: CompileError
---------------------------- Captured stdout call -----------------------------
source_0.c
source_0.c(11): error C2059: syntax error: ';'
source_0.c(15): error C2040: 'B1': 'int' differs in levels of indirection from 'PyTypeObject *'
source_0.c(16): error C2040: 'B2': 'int' differs in levels of indirection from 'PyTypeObject *'
source_0.c(17): error C2040: 'B12': 'int' differs in levels of indirection from 'PyTypeObject *'
source_0.c(19): error C2099: initializer is not a constant
source_0.c(20): error C2099: initializer is not a constant
source_0.c(21): error C2099: initializer is not a constant
source_0.c(23): error C2143: syntax error: missing '{' before '->'
source_0.c(23): error C2059: syntax error: '->'
source_0.c(24): error C2143: syntax error: missing '{' before '->'
source_0.c(24): error C2059: syntax error: '->'
source_0.c(25): error C2143: syntax error: missing '{' before '->'
source_0.c(25): error C2059: syntax error: '->'
source_0.c(27): error C2143: syntax error: missing '{' before '->'
source_0.c(27): error C2059: syntax error: '->'
source_0.c(28): error C2143: syntax error: missing '{' before '->'
source_0.c(28): error C2059: syntax error: '->'
source_0.c(29): error C2143: syntax error: missing '{' before '->'
source_0.c(29): error C2059: syntax error: '->'
source_0.c(31): error C2059: syntax error: '<parameter-list>'
source_0.c(32): error C2059: syntax error: '<parameter-list>'
source_0.c(33): error C2059: syntax error: '<parameter-list>'
source_0.c(34): error C2059: syntax error: '<parameter-list>'
source_0.c(35): error C2059: syntax error: '<parameter-list>'
source_0.c(36): error C2059: syntax error: '<parameter-list>'
source_0.c(38): error C2143: syntax error: missing '{' before '->'
source_0.c(38): error C2059: syntax error: '->'
source_0.c(39): error C2143: syntax error: missing '{' before '->'
source_0.c(39): error C2059: syntax error: '->'
source_0.c(40): error C2143: syntax error: missing '{' before '->'
source_0.c(40): error C2059: syntax error: '->'
source_0.c(42): error C2143: syntax error: missing '{' before '->'
source_0.c(42): error C2059: syntax error: '->'
source_0.c(43): error C2143: syntax error: missing '{' before '->'
source_0.c(43): error C2059: syntax error: '->'
source_0.c(45): error C2059: syntax error: 'if'
source_0.c(46): error C2059: syntax error: 'if'
source_0.c(47): error C2059: syntax error: 'if'
source_0.c(49): error C2099: initializer is not a constant
source_0.c(50): error C2059: syntax error: 'return'
source_0.c(52): error C2059: syntax error: '}'
source_0.c(191): error C2065: 'foo_get_bases': undeclared identifier
source_0.c(191): warning C4312: 'type cast': conversion from 'int' to 'PyCFunction' of greater size
source_0.c(189): error C2099: initializer is not a constant
source_0.c(191): warning C4047: 'initializing': 'PyCFunction' differs in levels of indirection from 'int'
=========================== short test summary info ===========================
FAIL module\cpyext\test\test_typeobject.py::AppTestSlots::()::test_multiple_inheritance3
============== 1 failed, 61 passed, 2 skipped in 495.93 seconds ===============
++ 07:46:20 starting module/crypt/test [106 started in total]
__ module/crypt/test [103 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 1 skipped
========================== 1 skipped in 0.03 seconds ==========================
++ 07:46:22 starting module/errno/test [107 started in total]
__ module/cpyext/test/test_userslots.py [104 done in total, somefailed=False] _
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 7 items
module\cpyext\test\test_userslots.py .......
========================= 7 passed in 282.81 seconds ==========================
called power
++ 07:46:33 starting module/exceptions/test [108 started in total]
__ module/cpyext/test/test_version.py [105 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\cpyext\test\test_version.py ...
========================= 3 passed in 271.81 seconds ==========================
++ 07:46:37 starting module/faulthandler/test [109 started in total]
__ module/faulthandler/test [106 done in total, somefailed=False] _____________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 1 items / 1 skipped
module\faulthandler\test\test_ztranslation.py .
===================== 1 passed, 1 skipped in 9.88 seconds =====================
++ 07:46:50 starting module/fcntl/test [110 started in total]
__ module/fcntl/test [107 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 1 skipped
========================== 1 skipped in 0.89 seconds ==========================
++ 07:46:53 starting module/gc/test [111 started in total]
__ module/errno/test [108 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items
module\errno\test\test_errno.py ...
========================== 3 passed in 31.78 seconds ==========================
++ 07:46:55 starting module/imp/test [112 started in total]
__ module/exceptions/test [109 done in total, somefailed=False] _______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 101 items
module\exceptions\test\apptest_exceptions.py .....................................................
module\exceptions\test\test_exc.py ................................................
========================= 101 passed in 71.56 seconds =========================
++ 07:47:47 starting module/itertools/test [113 started in total]
__ module/gc/test [110 done in total, somefailed=False] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 30 items
module\gc\test\test_app_referents.py ....
module\gc\test\test_gc.py .....x...
module\gc\test\test_hook.py ........
module\gc\test\test_referents.py ...s....
module\gc\test\test_ztranslation.py .
============== 28 passed, 1 skipped, 1 xfailed in 84.21 seconds ===============
++ 07:48:22 starting module/marshal/test [114 started in total]
__ module/marshal/test [111 done in total, somefailed=False] __________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 51 items
module\marshal\test\apptest_marshal.py ...............................................
module\marshal\test\test_marshal.py s
module\marshal\test\test_marshalimpl.py ...
==================== 50 passed, 1 skipped in 79.96 seconds ====================
++ 07:49:44 starting module/math/test [115 started in total]
__ module/cpyext/test/test_weakref.py [112 done in total, somefailed=False] ___
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 5 items
module\cpyext\test\test_weakref.py .....
========================= 5 passed in 185.57 seconds ==========================
++ 07:49:59 starting module/micronumpy/test [116 started in total]
__ module/micronumpy/test [113 done in total, somefailed=False] _______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items
======================== no tests ran in 0.01 seconds =========================
++ 07:50:14 starting module/mmap/test [117 started in total]
__ module/itertools/test [114 done in total, somefailed=False] ________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 91 items
module\itertools\test\apptest_itertools.py .........
module\itertools\test\test_itertools.py .................................................................................
module\itertools\test\test_ztranslation.py .
========================= 91 passed in 183.51 seconds =========================
++ 07:50:59 starting module/operator/test [118 started in total]
__ module/imp/test [115 done in total, somefailed=True] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 123 items
module\imp\test\test_app.py .E......................
module\imp\test\test_import.py ...............................................................s...........s......s..s..............
=================================== ERRORS ====================================
___________ ERROR at teardown of AppTestImpModule.test_find_module ____________
self = <CallInfo when='teardown' exception: {
array [ '%', 'L', 'E', '\x00' ]:
...
File "d:\pypy_stuff\buildbot64\slav...bot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 523, in rawallocate
flavor='raw')
}>
func = <function <lambda> at 0x000001e6abf02a70>, when = 'teardown'
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_teardown'>
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_find_module'>, 'nextitem': <App...rgs={...}>}>, 'item': <AppTestMethod 'test_find_module'>, 'nextitem': <AppTestMethod 'test_find_module_with_encoding'>}
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 0x000001e69d353408>
hook = <_HookCaller 'pytest_runtest_teardown'>, methods = []
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_find_module'>, 'nextitem': <App...rgs={...}>}>, 'item': <AppTestMethod 'test_find_module'>, 'nextitem': <AppTestMethod 'test_find_module_with_encoding'>}
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_teardown'>, methods = []
kwargs = {'__multicall__': <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_find_module'>, 'nextitem': <App...rgs={...}>}>, 'item': <AppTestMethod 'test_find_module'>, 'nextitem': <AppTestMethod 'test_find_module_with_encoding'>}
self._inner_hookexec = lambda hook, methods, kwargs: \
> _MultiCall(methods, kwargs, hook.spec_opts).execute()
..\_pytest\vendored_packages\pluggy.py:333:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_find_module'>, 'nextitem': <AppTestMethod 'test_find_module_with_encoding'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.pop()
args = [all_kwargs[argname] for argname in hook_impl.argnames]
if hook_impl.hookwrapper:
> return _wrapped_call(hook_impl.function(*args), self.execute)
..\_pytest\vendored_packages\pluggy.py:595:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
wrap_controller = <generator object pytest_runtest_teardown at 0x000001e6aa920cc8>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 0 meths, kwargs={'i...h_encoding'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>>
def _wrapped_call(wrap_controller, func):
""" Wrap calling to a function with a generator which needs to yield
exactly once. The yield point will trigger calling the wrapped function
and return its _CallOutcome to the yield point. The generator then needs
to finish (raise StopIteration) in order for the wrapped call to complete.
"""
try:
next(wrap_controller) # first yield
except StopIteration:
_raise_wrapfail(wrap_controller, "did not yield")
call_outcome = _CallOutcome(func)
try:
wrap_controller.send(call_outcome)
_raise_wrapfail(wrap_controller, "has second yield")
except StopIteration:
pass
> return call_outcome.get_result()
..\_pytest\vendored_packages\pluggy.py:253:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001e6aa2a0560>
def get_result(self):
if self.excinfo is None:
return self.result
else:
ex = self.excinfo
if _py3:
raise ex[1].with_traceback(ex[2])
> _reraise(*ex) # noqa
..\_pytest\vendored_packages\pluggy.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.vendored_packages.pluggy._CallOutcome instance at 0x000001e6aa2a0560>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 0 meths, kwargs={'i...h_encoding'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>>
def __init__(self, func):
try:
> self.result = func()
..\_pytest\vendored_packages\pluggy.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_MultiCall 0 results, 0 meths, kwargs={'item': <AppTestMethod 'test_find_module'>, 'nextitem': <AppTestMethod 'test_find_module_with_encoding'>, '__multicall__': <_MultiCall 0 results, 0 meths, kwargs={...}>}>
def execute(self):
all_kwargs = self.kwargs
self.results = results = []
firstresult = self.specopts.get("firstresult")
while self.hook_impls:
hook_impl = self.hook_impls.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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <rpython.conftest.LeakFinder instance at 0x000001e69ec1a060>
item = <AppTestMethod 'test_find_module'>
@pytest.hookimpl(trylast=True)
def pytest_runtest_teardown(self, item):
if not isinstance(item, py.test.collect.Function):
return
if (not getattr(item.obj, 'dont_track_allocations', False)
and leakfinder.TRACK_ALLOCATIONS):
kwds = {}
try:
kwds['do_collection'] = item.track_allocations_collect
except AttributeError:
pass
item._pypytest_leaks = leakfinder.stop_tracking_allocations(False,
**kwds)
else: # stop_tracking_allocations() already called
item._pypytest_leaks = None
# check for leaks, but only if the test passed so far
if getattr(item, '_success', False) and item._pypytest_leaks:
> raise leakfinder.MallocMismatch(item._pypytest_leaks)
E MallocMismatch: {
E
E array [ '%', 'L', 'E', '\x00' ]:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdataobj.py", line 13, in <module>
E from pypy.module._cffi_backend import misc
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\misc.py", line 125, in <module>
E FORMAT_LONGDOUBLE = rffi.str2charp("%LE")
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Struct cffi_ctxobj { ctx, info } at 0x1e69c2ee9a0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 738, in make_plain_ffi_object
E r.__init__(space, src_ctx)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 59, in __init__
E self.ctxobj = parse_c_type.allocate_ctxobj(src_ctx)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\parse_c_type.py", line 71, in allocate_ctxobj
E p = lltype.malloc(CTXOBJ, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e6a8709bb0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 131, in ffiobj_init
E ntypes = allocate_array(ffi, _CFFI_OPCODE_T, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e6a848ff20>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ffi_obj.py", line 191, in descr_init
E w__typenames, w__includes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 146, in ffiobj_init
E p = allocate(ffi, size)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e69d796c10>:
E <C object Array of Char {'nolength': True} at 0x1e69d796e70>:
E <C object Array of Char {'nolength': True} at 0x1e69d796c90>:
E <C object Array of Char {'nolength': True} at 0x1e69d796fb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796e90>:
E <C object Array of Char {'nolength': True} at 0x1e69d796f10>:
E <C object Array of Char {'nolength': True} at 0x1e69d796d50>:
E <C object Array of Char {'nolength': True} at 0x1e69d796eb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796db0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796ed0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796d30>:
E <C object Array of Char {'nolength': True} at 0x1e69d796d70>:
E <C object Array of Char {'nolength': True} at 0x1e69d796d90>:
E <C object Array of Char {'nolength': True} at 0x1e69d796bb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796f90>:
E <C object Array of Char {'nolength': True} at 0x1e69d797170>:
E <C object Array of Char {'nolength': True} at 0x1e69d797110>:
E <C object Array of Char {'nolength': True} at 0x1e69d7971f0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796f30>:
E <C object Array of Char {'nolength': True} at 0x1e6a627a790>:
E <C object Array of Char {'nolength': True} at 0x1e69d796dd0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797190>:
E <C object Array of Char {'nolength': True} at 0x1e69d796ad0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796df0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797230>:
E <C object Array of Char {'nolength': True} at 0x1e69d796a70>:
E <C object Array of Char {'nolength': True} at 0x1e69d7976b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797730>:
E <C object Array of Char {'nolength': True} at 0x1e69d797810>:
E <C object Array of Char {'nolength': True} at 0x1e6a5370970>:
E <C object Array of Char {'nolength': True} at 0x1e69d797870>:
E <C object Array of Char {'nolength': True} at 0x1e69d797310>:
E <C object Array of Char {'nolength': True} at 0x1e69d7975b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797430>:
E <C object Array of Char {'nolength': True} at 0x1e69d7978f0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797610>:
E <C object Array of Char {'nolength': True} at 0x1e69d797890>:
E <C object Array of Char {'nolength': True} at 0x1e69d7977b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797630>:
E <C object Array of Char {'nolength': True} at 0x1e6a5370be0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797410>:
E <C object Array of Char {'nolength': True} at 0x1e6a5370a30>:
E <C object Array of Char {'nolength': True} at 0x1e69d797910>:
E <C object Array of Char {'nolength': True} at 0x1e69d797930>:
E <C object Array of Char {'nolength': True} at 0x1e6a5370790>:
E <C object Array of Char {'nolength': True} at 0x1e69d797850>:
E <C object Array of Char {'nolength': True} at 0x1e69d797770>:
E <C object Array of Char {'nolength': True} at 0x1e69d7972b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797330>:
E <C object Array of Char {'nolength': True} at 0x1e69d7975d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797830>:
E <C object Array of Char {'nolength': True} at 0x1e69d7973b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7977f0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7978b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797990>:
E <C object Array of Char {'nolength': True} at 0x1e69d797970>:
E <C object Array of Char {'nolength': True} at 0x1e69d7974d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797270>:
E <C object Array of Char {'nolength': True} at 0x1e69d797390>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc1bb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797290>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc2760>:
E <C object Array of Char {'nolength': True} at 0x1e69d797450>:
E <C object Array of Char {'nolength': True} at 0x1e69d797470>:
E <C object Array of Char {'nolength': True} at 0x1e69d7972f0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797510>:
E <C object Array of Char {'nolength': True} at 0x1e69d793b90>:
E <C object Array of Char {'nolength': True} at 0x1e69d7940b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793a50>:
E <C object Array of Char {'nolength': True} at 0x1e69d793fb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d794010>:
E <C object Array of Char {'nolength': True} at 0x1e69d793b30>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc1ce0>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc25b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc28d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793ed0>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc30a0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793f50>:
E <C object Array of Char {'nolength': True} at 0x1e69d793f70>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc1b50>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc1c60>:
E <C object Array of Char {'nolength': True} at 0x1e69d793f90>:
E <C object Array of Char {'nolength': True} at 0x1e69d7941b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d794030>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc1cc0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793ab0>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc2ae0>:
E <C object Array of Char {'nolength': True} at 0x1e6a6cc2f50>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 153, in ffiobj_init
E nglobs[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x1e6a3205050>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 174, in ffiobj_init
E nstructs = allocate_array(ffi, STRUCT_UNION_S, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e6a70a1210>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 175, in ffiobj_init
E nfields = allocate_array(ffi, FIELD_S, nftot)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e6a18d0a70>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf670>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf890>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf760>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf550>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d03b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf580>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf510>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf720>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0480>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf840>:
E <C object Array of Char {'nolength': True} at 0x1e69d794230>:
E <C object Array of Char {'nolength': True} at 0x1e69d793af0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793b70>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0bb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793c90>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfb10>:
E <C object Array of Char {'nolength': True} at 0x1e69d7940d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793a70>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d29f70>:
E <C object Array of Char {'nolength': True} at 0x1e69d795830>:
E <C object Array of Char {'nolength': True} at 0x1e69d7958b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796250>:
E <C object Array of Char {'nolength': True} at 0x1e69d796370>:
E <C object Array of Char {'nolength': True} at 0x1e69d7968b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796410>:
E <C object Array of Char {'nolength': True} at 0x1e69d796490>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2a0f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d20e0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7963b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796710>:
E <C object Array of Char {'nolength': True} at 0x1e69d796c70>:
E <C object Array of Char {'nolength': True} at 0x1e69d796ef0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1850>:
E <C object Array of Char {'nolength': True} at 0x1e69d796e30>:
E <C object Array of Char {'nolength': True} at 0x1e69d796cf0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796b30>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 185, in ffiobj_init
E nstructs[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x1e69d793cb0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf4c0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf9c0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfe30>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf730>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf5d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf7e0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfb20>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf830>:
E <C object Array of Char {'nolength': True} at 0x1e69d793f10>:
E <C object Array of Char {'nolength': True} at 0x1e69d793cd0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793d30>:
E <C object Array of Char {'nolength': True} at 0x1e69d793ad0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7941d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793e50>:
E <C object Array of Char {'nolength': True} at 0x1e69d794190>:
E <C object Array of Char {'nolength': True} at 0x1e69d794090>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfc40>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0250>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cff40>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0160>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfc10>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d06a0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793d70>:
E <C object Array of Char {'nolength': True} at 0x1e69d793fd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d01d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d05e0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfbe0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793c30>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfe90>:
E <C object Array of Char {'nolength': True} at 0x1e69d793e70>:
E <C object Array of Char {'nolength': True} at 0x1e69d793c10>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf520>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0800>:
E <C object Array of Char {'nolength': True} at 0x1e69d794070>:
E <C object Array of Char {'nolength': True} at 0x1e69d793b50>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d05b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d09b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf7f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d01c0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0be0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793d10>:
E <C object Array of Char {'nolength': True} at 0x1e69d793e90>:
E <C object Array of Char {'nolength': True} at 0x1e69d793bf0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfb90>:
E <C object Array of Char {'nolength': True} at 0x1e69d793bb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793bd0>:
E <C object Array of Char {'nolength': True} at 0x1e69d794050>:
E <C object Array of Char {'nolength': True} at 0x1e69d793d50>:
E <C object Array of Char {'nolength': True} at 0x1e69d793c70>:
E <C object Array of Char {'nolength': True} at 0x1e69d793c50>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1330>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf920>:
E <C object Array of Char {'nolength': True} at 0x1e69d793cf0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0cb0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1120>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d16d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cfc90>:
E <C object Array of Char {'nolength': True} at 0x1e69d793dd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18cf900>:
E <C object Array of Char {'nolength': True} at 0x1e69d793d90>:
E <C object Array of Char {'nolength': True} at 0x1e69d794110>:
E <C object Array of Char {'nolength': True} at 0x1e69d793df0>:
E <C object Array of Char {'nolength': True} at 0x1e69d793db0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0d20>:
E <C object Array of Char {'nolength': True} at 0x1e69d793e10>:
E <C object Array of Char {'nolength': True} at 0x1e69d794130>:
E <C object Array of Char {'nolength': True} at 0x1e69d794150>:
E <C object Array of Char {'nolength': True} at 0x1e69d793f30>:
E <C object Array of Char {'nolength': True} at 0x1e69d793ef0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7940f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d04a0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1310>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1660>:
E <C object Array of Char {'nolength': True} at 0x1e69d795870>:
E <C object Array of Char {'nolength': True} at 0x1e69d795630>:
E <C object Array of Char {'nolength': True} at 0x1e69d795ff0>:
E <C object Array of Char {'nolength': True} at 0x1e69d795e30>:
E <C object Array of Char {'nolength': True} at 0x1e69d795a50>:
E <C object Array of Char {'nolength': True} at 0x1e69d796870>:
E <C object Array of Char {'nolength': True} at 0x1e69d796470>:
E <C object Array of Char {'nolength': True} at 0x1e69d796390>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d11e0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796890>:
E <C object Array of Char {'nolength': True} at 0x1e69d7964d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7965d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7969b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7963f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1910>:
E <C object Array of Char {'nolength': True} at 0x1e69d796270>:
E <C object Array of Char {'nolength': True} at 0x1e69d7965f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1a80>:
E <C object Array of Char {'nolength': True} at 0x1e69d796930>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d21c0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7964b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d2130>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d04d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d16e0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796810>:
E <C object Array of Char {'nolength': True} at 0x1e69d7968d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796310>:
E <C object Array of Char {'nolength': True} at 0x1e69d796750>:
E <C object Array of Char {'nolength': True} at 0x1e69d796430>:
E <C object Array of Char {'nolength': True} at 0x1e69d796790>:
E <C object Array of Char {'nolength': True} at 0x1e69d796530>:
E <C object Array of Char {'nolength': True} at 0x1e69d7962d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796910>:
E <C object Array of Char {'nolength': True} at 0x1e69d7966b0>:
E <C object Array of Char {'nolength': True} at 0x1e69d7964f0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796510>:
E <C object Array of Char {'nolength': True} at 0x1e69d796830>:
E <C object Array of Char {'nolength': True} at 0x1e69d796690>:
E <C object Array of Char {'nolength': True} at 0x1e69d796450>:
E <C object Array of Char {'nolength': True} at 0x1e69d7967d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796990>:
E <C object Array of Char {'nolength': True} at 0x1e69d796610>:
E <C object Array of Char {'nolength': True} at 0x1e69d796770>:
E <C object Array of Char {'nolength': True} at 0x1e69d796c50>:
E <C object Array of Char {'nolength': True} at 0x1e69d796b70>:
E <C object Array of Char {'nolength': True} at 0x1e69d797210>:
E <C object Array of Char {'nolength': True} at 0x1e69d796cb0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796cd0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796a50>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d2ad0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796f50>:
E <C object Array of Char {'nolength': True} at 0x1e69d796e10>:
E <C object Array of Char {'nolength': True} at 0x1e69d797130>:
E <C object Array of Char {'nolength': True} at 0x1e69d797090>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d0a00>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d26a0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796a90>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d2480>:
E <C object Array of Char {'nolength': True} at 0x1e69d797050>:
E <C object Array of Char {'nolength': True} at 0x1e69d796b10>:
E <C object Array of Char {'nolength': True} at 0x1e69d797150>:
E <C object Array of Char {'nolength': True} at 0x1e69d796e50>:
E <C object Array of Char {'nolength': True} at 0x1e69d7970d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796ab0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796b90>:
E <C object Array of Char {'nolength': True} at 0x1e69d796bd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a18d1ef0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 209, in ffiobj_init
E nfields[nf].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Array of Char {'nolength': True} at 0x1e69f8d5de0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 235, in ffiobj_init
E ntypenames = allocate_array(ffi, TYPENAME_S, n)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 109, in allocate_array
E p = allocate(ffi, nitems * nbytes)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 102, in allocate
E p = lltype.malloc(rffi.CCHARP.TO, nbytes, flavor='raw', zero=True)
E
E <C object Array of Char {'nolength': True} at 0x1e69d7973d0>:
E <C object Array of Char {'nolength': True} at 0x1e69d794170>:
E <C object Array of Char {'nolength': True} at 0x1e6a5432fe0>:
E <C object Array of Char {'nolength': True} at 0x1e69d796fd0>:
E <C object Array of Char {'nolength': True} at 0x1e69d797590>:
E <C object Array of Char {'nolength': True} at 0x1e69d795510>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b56b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a5433930>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5370>:
E <C object Array of Char {'nolength': True} at 0x1e6a5432f00>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b56f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b4f70>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5590>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b54f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5070>:
E <C object Array of Char {'nolength': True} at 0x1e6a54332a0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5190>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2a7b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5010>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5050>:
E <C object Array of Char {'nolength': True} at 0x1e6a54330d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5090>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5270>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5150>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5290>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b53b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b53d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5030>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2a6c0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b51d0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b52b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2aa20>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5730>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5570>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b50f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a5432fc0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5110>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5430>:
E <C object Array of Char {'nolength': True} at 0x1e6a5433260>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2a150>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5250>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5530>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5710>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5450>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5310>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b55b0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b4fd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5890>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5930>:
E <C object Array of Char {'nolength': True} at 0x1e6a5433310>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5910>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b58f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5b50>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5db0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5dd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5d30>:
E <C object Array of Char {'nolength': True} at 0x1e6a5432900>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5d90>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5eb0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5bd0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5ef0>:
E <C object Array of Char {'nolength': True} at 0x1e6a3d2a390>:
E <C object Array of Char {'nolength': True} at 0x1e6a54333f0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5bf0>:
E <C object Array of Char {'nolength': True} at 0x1e6a63b5e30>:
E <C object Array of Char {'nolength': True} at 0x1e6a54329a0>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 239, in ffiobj_init
E ntypenames[i].c_name = decoder.next_name()
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\cdlopen.py", line 92, in next_name
E p = rffi.str2charp(self.string[frm : i])
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\rpython\rtyper\lltypesystem\rffi.py", line 829, in str2charp
E array = lltype.malloc(TYPEP.TO, len(s) + 1, flavor='raw', track_allocation=True)
E
E <C object Struct CIF_DESCRIPTION { cif, abi, nargs, rtype, atypes, exchange_size, exchange_result, exchange_args } at 0x1e6a7374f70>:
E ...
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\newtype.py", line 752, in _build_function_type
E fct = ctypefunc.W_CTypeFunc(space, fargs, fresult, ellipsis, abi)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 53, in __init__
E builder.rawallocate(self)
E File "d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\_cffi_backend\ctypefunc.py", line 523, in rawallocate
E flavor='raw')
E }
..\rpython\conftest.py:103: MallocMismatch
============== 119 passed, 4 skipped, 1 error in 280.33 seconds ===============
++ 07:51:40 starting module/posix/test [119 started in total]
__ module/mmap/test [116 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 46 items
module\mmap\test\test_mmap.py ....s.................s........s..ss....s..s..
=================== 39 passed, 7 skipped in 112.29 seconds ====================
++ 07:52:13 starting module/pwd/test [120 started in total]
__ module/pwd/test [117 done in total, somefailed=False] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 2 skipped
========================== 2 skipped in 8.32 seconds ==========================
++ 07:52:25 starting module/pyexpat/test [121 started in total]
__ module/operator/test [118 done in total, somefailed=False] _________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 28 items
module\operator\test\test_operator.py ........................
module\operator\test\test_tscmp.py ....
========================= 28 passed in 119.48 seconds =========================
++ 07:53:05 starting module/pypyjit/test [122 started in total]
__ module/math/test [119 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 209 items
module\math\test\apptest_math.py ...........s
module\math\test\test_direct.py ......................................................................................................................................................................
module\math\test\test_math.py ............s..................
=================== 207 passed, 2 skipped in 215.36 seconds ===================
++ 07:53:25 starting module/select/test [123 started in total]
__ module/posix/test [120 done in total, somefailed=True] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 115 items / 1 skipped
module\posix\test\apptest_posix.py .....
module\posix\test\test_interp_posix.py s...
module\posix\test\test_nt.py ..
module\posix\test\test_posix2.py .....................s........sssssss.....s..s....ss...Fs....s.s....s......F.......s
module\posix\test\test_scandir.py ....s..ssss.s.......
================================== FAILURES ===================================
_______________________ AppTestPosix.test_urandom_large _______________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000018ef801b520>
def test_urandom_large(self):
os = self.posix
import sys
if sys.maxsize < 2**32:
skip("2GB allocation is too large for 32-bit")
length = 2147479553
> s = os.urandom(length)
E (application-level) MemoryError
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\posix\test\test_posix2.py:1623]:7: MemoryError
________________________ AppTestNt.test_dll_directory _________________________
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x0000018ef73976a8>
def test_dll_directory(self):
nt = self.posix
> ret = nt._add_dll_directory(b'c:\\')
E (application-level) TypeError: expected str, got bytes object
[d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pypy\module\posix\test\test_posix2.py:1945]:3: TypeError
=========================== short test summary info ===========================
FAIL module\posix\test\test_posix2.py::AppTestPosix::()::test_urandom_large
FAIL module\posix\test\test_posix2.py::AppTestNt::()::test_dll_directory
============== 2 failed, 89 passed, 25 skipped in 143.61 seconds ==============
++ 07:54:07 starting module/signal/test [124 started in total]
__ module/pyexpat/test [121 done in total, somefailed=True] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 21 items
module\pyexpat\test\apptest_pyexpat.py .FF
module\pyexpat\test\test_build.py .
module\pyexpat\test\test_parser.py .................
================================== FAILURES ===================================
________________________ test_set_activation_threshold ________________________
def test_set_activation_threshold():
parser = pyexpat.ParserCreate()
# Raises on error
> parser.SetAllocTrackerActivationThreshold(1000)
E (application-level) ExpatError: parser must be a root parser
module\pyexpat\test\apptest_pyexpat.py:14: ExpatError
_______________________ test_set_maximum_amplification ________________________
def test_set_maximum_amplification():
parser = pyexpat.ParserCreate()
# Raises on error
> parser.SetAllocTrackerMaximumAmplification(3.0)
E (application-level) ExpatError: parser must be a root parser
module\pyexpat\test\apptest_pyexpat.py:19: ExpatError
=========================== short test summary info ===========================
FAIL module\pyexpat\test\apptest_pyexpat.py::test_set_activation_threshold
FAIL module\pyexpat\test\apptest_pyexpat.py::test_set_maximum_amplification
==================== 2 failed, 19 passed in 116.49 seconds ====================
++ 07:54:30 starting module/struct/test [125 started in total]
__ module/pypyjit/test [122 done in total, somefailed=False] __________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\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 120.81 seconds ====================
++ 07:55:10 starting module/sys/test [126 started in total]
__ module/signal/test [123 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 27 items
module\signal\test\apptest_signal.py s
module\signal\test\test_signal.py s.s.....ss..s...sssssss...
=================== 14 passed, 13 skipped in 120.15 seconds ===================
++ 07:56:14 starting module/termios/test [127 started in total]
__ module/termios/test [124 done in total, somefailed=False] __________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 1 skipped
========================== 1 skipped in 1.51 seconds ==========================
++ 07:56:18 starting module/test_lib_pypy [128 started in total]
__ module/struct/test [125 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 52 items
module\struct\test\apptest_struct.py ..........................................
module\struct\test\apptest_structbuffer.py ..
module\struct\test\test_struct.py .......
module\struct\test\test_ztranslation.py .
========================= 52 passed in 157.91 seconds =========================
++ 07:57:12 starting module/thread/test [129 started in total]
__ module/select/test [126 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 46 items
module\select\test\test_epoll.py ssssssssss
module\select\test\test_kqueue.py ssssss
module\select\test\test_select.py ssssssssssssssss..........ss
module\select\test\test_select_signal.py s
module\select\test\test_ztranslation.py .
=================== 11 passed, 35 skipped in 222.67 seconds ===================
++ 07:57:12 starting module/time/test [130 started in total]
__ module/sys/test [127 done in total, somefailed=True] _______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 96 items
module\sys\test\apptest_audit.py .........
module\sys\test\apptest_initpath.py F
module\sys\test\apptest_sys.py .
module\sys\test\test_encoding.py .s
module\sys\test\test_initpath.py ..s......
module\sys\test\test_sysmodule.py .....................ss..................ss........................
module\sys\test\test_version.py .......
================================== FAILURES ===================================
__________________________ test_pypy_find_executable __________________________
def test_pypy_find_executable():
# issue #4003
import sys
executable = sys.pypy_find_executable('*')
if sys.platform == 'win32':
> assert executable.endswith('.exe')
E (application-level) AssertionError: assert False
E + where False = <built-in method endswith of str object at 0x000000000000101b>('.exe')
E + where <built-in method endswith of str object at 0x000000000000101b> = ''.endswith
module\sys\test\apptest_initpath.py:9: AssertionError
=========================== short test summary info ===========================
FAIL module\sys\test\apptest_initpath.py::test_pypy_find_executable
============== 1 failed, 89 passed, 6 skipped in 185.79 seconds ===============
++ 07:58:21 starting module/token/test [131 started in total]
__ module/test_lib_pypy [128 done in total, somefailed=False] _________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 238 items / 5 skipped
module\test_lib_pypy\test_code_module.py ...
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_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_stackless.py ..............................
module\test_lib_pypy\test_stackless_pickling.py ..
module\test_lib_pypy\test_structseq.py ...........
module\test_lib_pypy\test_tputil.py ..s....
=================== 236 passed, 7 skipped in 176.96 seconds ===================
++ 07:59:22 starting module/unicodedata/test [132 started in total]
__ module/token/test [129 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 8 items
module\token\test\apptest_token.py ........
========================== 8 passed in 87.68 seconds ==========================
++ 07:59:58 starting module/zipimport/test [133 started in total]
__ module/time/test [130 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 43 items
module\time\test\apptest_time.py ....ssss..........ss....s.s...........s..
module\time\test\test_timeutils.py .
module\time\test\test_ztranslation.py .
=================== 34 passed, 9 skipped in 162.10 seconds ====================
++ 08:00:02 starting module/zlib/test [134 started in total]
__ module/unicodedata/test [131 done in total, somefailed=False] ______________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 35 items
module\unicodedata\test\test_hyp.py ................
module\unicodedata\test\test_unicodedata.py ...................
========================= 35 passed in 77.25 seconds ==========================
++ 08:00:44 starting objspace/fake/test [135 started in total]
__ module/zipimport/test [132 done in total, somefailed=False] ________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1 items
module\zipimport\test\apptest_zipimport.py .
========================== 1 passed in 47.67 seconds ==========================
++ 08:00:51 starting objspace/std/test [136 started in total]
__ module/zlib/test [133 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 38 items
module\zlib\test\test_zlib.py ......................................
========================= 38 passed in 80.60 seconds ==========================
++ 08:01:24 starting objspace/test [137 started in total]
__ objspace/fake/test [134 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\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 99.64 seconds ==========================
++ 08:02:27 starting sandbox/test [138 started in total]
__ sandbox/test [135 done in total, somefailed=False] _________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 0 items / 1 skipped
========================== 1 skipped in 1.14 seconds ==========================
++ 08:02:30 starting tool/bench/test [139 started in total]
__ objspace/test [136 done in total, somefailed=False] ________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 75 items
objspace\test\apptest_binop_overriding.py .
objspace\test\apptest_descriptor.py ....s....
objspace\test\apptest_descroperation.py ................s......................................
objspace\test\test_descroperation.py ..........
==================== 73 passed, 2 skipped in 62.98 seconds ====================
++ 08:02:31 starting tool/memusage/test [140 started in total]
__ tool/bench/test [137 done in total, somefailed=False] ______________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 3 items / 1 skipped
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
tool\bench\test\test_pypyresult.py ...
===================== 3 passed, 1 skipped in 6.13 seconds =====================
++ 08:02:38 starting tool/pytest/fake_pytest/test [141 started in total]
__ tool/memusage/test [138 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 5 items
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
tool\memusage\test\test_log2gnumeric.py .....
========================== 5 passed in 4.95 seconds ===========================
++ 08:02:39 starting tool/pytest/test [142 started in total]
__ module/thread/test [139 done in total, somefailed=False] ___________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 56 items
module\thread\test\test_fork.py ssss
module\thread\test\test_gil.py ....
module\thread\test\test_import_lock.py .....
module\thread\test\test_local.py .......
module\thread\test\test_lock.py ...............ssss..
module\thread\test\test_thread.py .............s.
=================== 47 passed, 9 skipped in 335.79 seconds ====================
++ 08:02:49 starting tool/release/test [143 started in total]
__ tool/pytest/fake_pytest/test [140 done in total, somefailed=False] _________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 1 items
tool\pytest\fake_pytest\test\apptest_fake_pytest.py .
========================== 1 passed in 32.47 seconds ==========================
++ 08:03:17 starting tool/test [144 started in total]
__ tool/release/test [141 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 8 items
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
tool\release\test\test_package.py ...ss
tool\release\test\test_smartstrip.py sss
==================== 3 passed, 5 skipped in 73.70 seconds =====================
__ tool/test [142 done in total, somefailed=False] ____________________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 29 items
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
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 52.19 seconds ==========================
__ tool/pytest/test [143 done in total, somefailed=False] _____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
collected 25 items
tool\pytest\test\test_appsupport.py .........
tool\pytest\test\test_astrewrite.py .....
tool\pytest\test\test_conftest1.py ...xx
tool\pytest\test\test_pytestsupport.py ......
=================== 23 passed, 2 xfailed in 264.11 seconds ====================
__ objspace/std/test [144 done in total, somefailed=False] ____________________
============================= test session starts =============================
platform win32 -- Python 2.7.18[pypy-7.3.18-alpha], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> deadline=None, database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\own-win-x86-64\\build\\pypy\\.hypothesis\\examples')
pytest-2.9.2 from d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build\pytest.pyc
rootdir: d:\pypy_stuff\buildbot64\slave\own-win-x86-64\build, inifile: pytest.ini
plugins: hypothesis-4.39.3
[platform:msg] Updated environment with vsver 160, using x64 True
[platform:msg] Updated environment with vsver 160, using x64 True
collected 2523 items
objspace\std\test\apptest_boolobject.py .........
objspace\std\test\apptest_bytearrayobject.py .....
objspace\std\test\apptest_callmethod.py ..........
objspace\std\test\apptest_complexobject.py ....................................
objspace\std\test\apptest_contains.py ..
objspace\std\test\apptest_fstring.py .....................
objspace\std\test\apptest_instmethobject.py .....
objspace\std\test\apptest_iterobject.py .....................
objspace\std\test\apptest_memoryobject.py ........
objspace\std\test\apptest_operation.py .
objspace\std\test\apptest_specializedtuple.py ........................
objspace\std\test\apptest_stringformat.py .................s......s..................s........................
objspace\std\test\apptest_tuple.py ........................
objspace\std\test\apptest_typeobjject.py ........
objspace\std\test\apptest_unicode.py ...........................s..........................................................................................
objspace\std\test\apptest_userobject.py ........................
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.s.........................................................s.........................................................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....................................................................................................................................
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 ..........................................................................................s.......................................................
objspace\std\test\test_memoryobject.py .............................................
objspace\std\test\test_methodcache.py .............................................................................................
objspace\std\test\test_newformat.py .................................................................
objspace\std\test\test_noneobject.py ...
objspace\std\test\test_obj.py .......................................
objspace\std\test\test_prebuiltint.py ...............................................................
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 s....
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_translate.py .
objspace\std\test\test_typeobject.py .............................................................................................................
objspace\std\test\test_unicodeobject.py .................
objspace\std\test\test_userobject.py .
objspace\std\test\test_versionedtype.py ...............
================== 2490 passed, 33 skipped in 516.68 seconds ==================
program finished with exit code 1
elapsedTime=6012.423000