pypy-venv\Scripts\pypy3.exe -m pytest ../build/extra_tests --junitxml=extra.log --durations=20 -raw -n 0
in dir d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv (timeout 1200 secs)
watching logfiles {'pytestLog': 'extra.log'}
argv: ['pypy-venv\\Scripts\\pypy3.exe', '-m', 'pytest', '../build/extra_tests', '--junitxml=extra.log', '--durations=20', '-raw', '-n', '0']
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
HOMEDRIVE=C:
HOMEPATH=\Users\matti
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\pypy-c-jit-win-x86-64\venv
PYPY_ENABLE_WINCONSOLEIO=1
PYTEST_XDIST_AUTO_NUM_WORKERS=4
RTOOLS40_HOME=C:\rtools40
RTOOLS43_HOME=C:\rtools43
RTOOLS44_HOME=C:\rtools44
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=D:\SystemTemp
TMP=D:\SystemTemp
USERDOMAIN=DESKTOP-RYZEN
USERDOMAIN_ROAMINGPROFILE=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
============================= test session starts =============================
platform win32 -- Python 3.12.13[pypy-8.0.0-alpha], pytest-6.2.5, py-1.11.0, pluggy-1.6.0
rootdir: d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests, configfile: pytest.ini
plugins: hypothesis-6.36.2, xdist-3.5.0
collected 2740 items / 8 skipped / 2732 selected
..\build\extra_tests\test_asyncio.py ... [ 0%]
..\build\extra_tests\test_binop_overriding.py .... [ 0%]
..\build\extra_tests\test_bufferedreader.py ..... [ 0%]
..\build\extra_tests\test_bytes.py .......... [ 0%]
..\build\extra_tests\test_capi.py . [ 0%]
..\build\extra_tests\test_code.py . [ 0%]
..\build\extra_tests\test_collections.py .. [ 0%]
..\build\extra_tests\test_complexobject.py . [ 0%]
..\build\extra_tests\test_contextvars.py . [ 1%]
..\build\extra_tests\test_datetime.py ......................s........... [ 2%]
. [ 2%]
..\build\extra_tests\test_dbm.py ..s.s... [ 2%]
..\build\extra_tests\test_decimal.py ........... [ 2%]
..\build\extra_tests\test_dis.py s [ 3%]
..\build\extra_tests\test_functools.py .. [ 3%]
..\build\extra_tests\test_gc.py ... [ 3%]
..\build\extra_tests\test_generic_alias.py ............................. [ 4%]
............. [ 4%]
..\build\extra_tests\test_greenlet_contextvars.py .......... [ 5%]
..\build\extra_tests\test_greenlet_thread.py .....ss [ 5%]
..\build\extra_tests\test_greenlet_tracing.py .. [ 5%]
..\build\extra_tests\test_hashlib.py ... [ 5%]
..\build\extra_tests\test_heapq.py ... [ 5%]
..\build\extra_tests\test_immutables_map.py ............................ [ 6%]
............................. [ 7%]
..\build\extra_tests\test_import.py . [ 7%]
..\build\extra_tests\test_inspect.py .... [ 7%]
..\build\extra_tests\test_interpreter.py . [ 7%]
..\build\extra_tests\test_itertools.py ... [ 8%]
..\build\extra_tests\test_jit.py ... [ 8%]
..\build\extra_tests\test_json.py ..... [ 8%]
..\build\extra_tests\test_linecache.py . [ 8%]
..\build\extra_tests\test_lzma.py . [ 8%]
..\build\extra_tests\test_modules.py s [ 8%]
..\build\extra_tests\test_msvcrt.py ... [ 8%]
..\build\extra_tests\test_os.py s...sss. [ 8%]
..\build\extra_tests\test_posix.py .... [ 9%]
..\build\extra_tests\test_posix_extra.py s [ 9%]
..\build\extra_tests\test_pyexpat.py . [ 9%]
..\build\extra_tests\test_pypy_modules.py ................. [ 9%]
..\build\extra_tests\test_pypy_remote_debug.py sssFFsssss.ssssss [ 10%]
..\build\extra_tests\test_pypy_util_cffi.py . [ 10%]
..\build\extra_tests\test_recursion.py s [ 10%]
..\build\extra_tests\test_scandir.py ............s....F. [ 11%]
..\build\extra_tests\test_semlock.py s [ 11%]
..\build\extra_tests\test_sqlite3.py ........s.......................... [ 12%]
..................................... [ 13%]
..\build\extra_tests\test_ssl.py s [ 13%]
..\build\extra_tests\test_startup.py ..F [ 13%]
..\build\extra_tests\test_stringio.py .F. [ 14%]
..\build\extra_tests\test_structseq.py ...... [ 14%]
..\build\extra_tests\test_sysconfig.py F [ 14%]
..\build\extra_tests\test_textio.py F [ 14%]
..\build\extra_tests\test_tk.py . [ 14%]
..\build\extra_tests\test_traceback_suggestions.py ............ [ 14%]
..\build\extra_tests\test_unicode.py .......................... [ 15%]
..\build\extra_tests\test_venv.py .F [ 15%]
..\build\extra_tests\test_weakref.py .. [ 15%]
..\build\extra_tests\cffi_tests\test_c.py s............................. [ 16%]
............................sssssssssssssss.sss..ssss.s................. [ 19%]
....................s.............s......s..s................sss........ [ 22%]
............s......s...s........................s...... [ 24%]
..\build\extra_tests\cffi_tests\test_version.py .. [ 24%]
..\build\extra_tests\cffi_tests\cffi0\test_cdata.py . [ 24%]
..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py ..................s [ 25%]
...............s.s.s.......s..........s..............sssssss..s..s...... [ 27%]
.............................s..s......ssssssssss [ 29%]
..\build\extra_tests\cffi_tests\cffi0\test_ffi_backend.py .............. [ 29%]
..............................................s.......................s. [ 32%]
..s.........................................s..s..................ss.... [ 35%]
ssssss..ssss.sssss........sssssssssssss...s.s........................ [ 37%]
..\build\extra_tests\cffi_tests\cffi0\test_function.py .ss...sssssss.sss [ 38%]
ss.sssss..sss..ss [ 38%]
..\build\extra_tests\cffi_tests\cffi0\test_model.py ............. [ 39%]
..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py ssssssssssss [ 39%]
..\build\extra_tests\cffi_tests\cffi0\test_parsing.py .sssss.........s.. [ 40%]
............s....s. [ 41%]
..\build\extra_tests\cffi_tests\cffi0\test_platform.py .... [ 41%]
..\build\extra_tests\cffi_tests\cffi0\test_unicode_literals.py ......... [ 41%]
... [ 41%]
..\build\extra_tests\cffi_tests\cffi0\test_verify.py ....sssss...s...... [ 42%]
s......s.....s.......s...ss.............................s............... [ 45%]
.......ss.......s...ss...s..s........................................... [ 47%]
ss... [ 47%]
..\build\extra_tests\cffi_tests\cffi0\test_verify2.py ....sssss...s..... [ 48%]
.s......s.....s.......s...ss.............................s.............. [ 51%]
........ss.......s...ss...s..s.......................................... [ 53%]
.ss... [ 54%]
..\build\extra_tests\cffi_tests\cffi0\test_version.py sssss [ 54%]
..\build\extra_tests\cffi_tests\cffi0\test_vgen.py ....sssss...s......s. [ 55%]
.....s.....s.......s...ss.............................s................. [ 57%]
.....ss.......s...ss...s..s...........................................ss [ 60%]
... [ 60%]
..\build\extra_tests\cffi_tests\cffi0\test_vgen2.py ....sssss...s......s [ 61%]
......s.....s.......s...ss.............................s................ [ 63%]
......ss.......s...ss...s..s...........................................s [ 66%]
s... [ 66%]
..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py .....F........s [ 67%]
ssF......F........sssF. [ 67%]
..\build\extra_tests\cffi_tests\cffi0\test_zintegration.py ssssssss [ 68%]
..\build\extra_tests\cffi_tests\cffi1\test_cffi_binary.py s [ 68%]
..\build\extra_tests\cffi_tests\cffi1\test_cffi_gen_src.py .s.s.s.s..ss. [ 68%]
s.s.s.s. [ 69%]
..\build\extra_tests\cffi_tests\cffi1\test_commontypes.py ss. [ 69%]
..\build\extra_tests\cffi_tests\cffi1\test_dlopen.py ............... [ 69%]
..\build\extra_tests\cffi_tests\cffi1\test_dlopen_unicode_literals.py .. [ 69%]
............. [ 70%]
..\build\extra_tests\cffi_tests\cffi1\test_ffi_obj.py .................. [ 70%]
......................... [ 71%]
..\build\extra_tests\cffi_tests\cffi1\test_function_args.py . [ 71%]
..\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py ................ [ 72%]
...................................................s............ss...s.. [ 75%]
.................................... [ 76%]
..\build\extra_tests\cffi_tests\cffi1\test_pkgconfig.py ... [ 76%]
..\build\extra_tests\cffi_tests\cffi1\test_re_python.py ....s........... [ 77%]
....s.. [ 77%]
..\build\extra_tests\cffi_tests\cffi1\test_realize_c_type.py ......... [ 77%]
..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py ............... [ 78%]
..................................................s..................... [ 80%]
.......................s.......................s...........s.s.s.s.s.... [ 83%]
......... [ 83%]
..\build\extra_tests\cffi_tests\cffi1\test_unicode_literals.py ....... [ 84%]
..\build\extra_tests\cffi_tests\cffi1\test_verify1.py ...sssss...s...... [ 84%]
............s.......s...ss...........................s.................. [ 87%]
....ss.......s.s.ss..xxxs...x.......................s............ss. [ 89%]
..\build\extra_tests\cffi_tests\cffi1\test_zdist.py .................... [ 90%]
... [ 90%]
..\build\extra_tests\cffi_tests\embedding\test_basic.py F.... [ 90%]
..\build\extra_tests\cffi_tests\embedding\test_performance.py sssss [ 90%]
..\build\extra_tests\cffi_tests\embedding\test_recursive.py . [ 91%]
..\build\extra_tests\cffi_tests\embedding\test_thread.py FFFF [ 91%]
..\build\extra_tests\cffi_tests\embedding\test_tlocal.py F [ 91%]
..\build\extra_tests\ctypes_tests\test_anon.py .. [ 91%]
..\build\extra_tests\ctypes_tests\test_array.py ....... [ 91%]
..\build\extra_tests\ctypes_tests\test_base.py ... [ 91%]
..\build\extra_tests\ctypes_tests\test_bitfields.py ... [ 91%]
..\build\extra_tests\ctypes_tests\test_buffers.py ..................... [ 92%]
..\build\extra_tests\ctypes_tests\test_callback_traceback.py . [ 92%]
..\build\extra_tests\ctypes_tests\test_callbacks.py .................... [ 93%]
................................ [ 94%]
..\build\extra_tests\ctypes_tests\test_cast.py ..... [ 94%]
..\build\extra_tests\ctypes_tests\test_commethods.py F [ 94%]
..\build\extra_tests\ctypes_tests\test_errno.py . [ 94%]
..\build\extra_tests\ctypes_tests\test_extra.py ............... [ 95%]
..\build\extra_tests\ctypes_tests\test_funcptr.py . [ 95%]
..\build\extra_tests\ctypes_tests\test_functions.py .............xx... [ 95%]
..\build\extra_tests\ctypes_tests\test_guess_argtypes.py .. [ 96%]
..\build\extra_tests\ctypes_tests\test_keepalive.py .................. [ 96%]
..\build\extra_tests\ctypes_tests\test_loading.py . [ 96%]
..\build\extra_tests\ctypes_tests\test_numbers.py ...............xX [ 97%]
..\build\extra_tests\ctypes_tests\test_parameters.py .. [ 97%]
..\build\extra_tests\ctypes_tests\test_pointers.py ..................... [ 98%]
[ 98%]
..\build\extra_tests\ctypes_tests\test_prototypes.py ..... [ 98%]
..\build\extra_tests\ctypes_tests\test_structures.py .................. [ 99%]
..\build\extra_tests\ctypes_tests\test_unions.py .. [ 99%]
..\build\extra_tests\ctypes_tests\test_values.py . [ 99%]
..\build\extra_tests\ctypes_tests\test_win32.py . [ 99%]
..\build\extra_tests\test_pyrepl\test_basic.py .........s.... [ 99%]
..\build\extra_tests\test_pyrepl\test_bugs.py x.s [ 99%]
..\build\extra_tests\test_pyrepl\test_keymap.py . [ 99%]
..\build\extra_tests\test_pyrepl\test_reader.py . [ 99%]
..\build\extra_tests\test_pyrepl\test_readline.py s.F. [100%]
================================== FAILURES ===================================
______________________________ test_integration _______________________________
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_integration0')
def wrapper(tmpdir):
try:
> return func(tmpdir)
..\build\extra_tests\test_pypy_remote_debug.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_integration0')
@skip_on_oserror
def test_integration(tmpdir):
import __pypy__
code = """
import sys, time
sys.stdout.write("started\\n")
sys.stdout.flush()
for i in range(10):
time.sleep(0.1)
sys.stdout.write("done\\n")
"""
debug_code = rb"""
import sys, os
sys.stdout.write('hello from %s\n' % os.getpid())
sys.stdout.flush()
"""
debug_script = tmpdir.join('debug.py')
debug_script.write(debug_code)
for func in (_pypy_remote_debug.start_debugger, __pypy__.remote_exec):
out = subprocess.Popen([sys.executable, '-c',
code], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
pid = out.pid
# wait until the child interpreter is fully started, otherwise
# libpypy-c.so might not be in its /proc/<pid>/maps yet
> assert out.stdout.readline() == b'started\n'
E AssertionError: assert b'started\r\n' == b'started\n'
E At index 7 diff: b'\r' != b'\n'
E Use -v to get the full diff
..\build\extra_tests\test_pypy_remote_debug.py:154: AssertionError
__________________________ test_disable_remote_debug __________________________
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_disable_remote_debug0')
def wrapper(tmpdir):
try:
> return func(tmpdir)
..\build\extra_tests\test_pypy_remote_debug.py:69:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_disable_remote_debug0')
@skip_on_oserror
def test_disable_remote_debug(tmpdir):
import __pypy__
code = """
import sys, time
sys.stdout.write("started\\n")
sys.stdout.flush()
for i in range(10):
time.sleep(0.1)
sys.stdout.write("done\\n")
"""
debug_code = rb"""
import sys, os
sys.stdout.write('hello from %s\n' % os.getpid())
sys.stdout.flush()
"""
debug_script = tmpdir.join('debug.py')
debug_script.write(debug_code)
for func in (_pypy_remote_debug.start_debugger, __pypy__.remote_exec):
# disable with -X option
out = subprocess.Popen([sys.executable, '-X', 'disable-remote-debug', '-c',
code], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
pid = out.pid
# wait until the child interpreter is fully started, otherwise
# libpypy-c.so might not be in its /proc/<pid>/maps yet
> assert out.stdout.readline() == b'started\n'
E AssertionError: assert b'started\r\n' == b'started\n'
E At index 7 diff: b'\r' != b'\n'
E Use -v to get the full diff
..\build\extra_tests\test_pypy_remote_debug.py:188: AssertionError
____________________________ test_context_manager _____________________________
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_context_manager0')
def test_context_manager(tmpdir):
import warnings, gc
dir1 = _make_dir1(tmpdir)
with warnings.catch_warnings(record=True) as l:
warnings.simplefilter("always")
with os.scandir(dir1) as iterator:
next(iterator)
del iterator
gc.collect()
> assert not l
E assert not [<warnings.WarningMessage object at 0x00000228000568a8>, <warnings.WarningMessage object at 0x00000228000568e0>, <warn...56950>, <warnings.WarningMessage object at 0x0000022800056988>, <warnings.WarningMessage object at 0x00000228000569c0>]
..\build\extra_tests\test_scandir.py:298: AssertionError
__________________________ test_ctrl_c_causes_atexit __________________________
def test_ctrl_c_causes_atexit():
process = subprocess.Popen(
[sys.executable,
'-c',
"import atexit, time, sys; atexit.register(lambda : print('called atexit')); print('sleeping'); sys.stdout.flush(); time.sleep(100)"],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
line = process.stdout.readline()
> assert line == b'sleeping\n'
E AssertionError: assert b'sleeping\r\n' == b'sleeping\n'
E At index 8 diff: b'\r' != b'\n'
E Use -v to get the full diff
..\build\extra_tests\test_startup.py:42: AssertionError
_______________________________ test_universal ________________________________
arguments = (), kwargs = {}, __tracebackhide__ = True
test = <function test_universal at 0x000002286ea23dd0>
settings = settings(database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\.hypo...nt_blob=False, report_multiple_bugs=True, stateful_step_count=50, suppress_health_check=(), verbosity=Verbosity.normal)
random = <random.Random object at 0x0000022871370cc0>
processed_args = ((), {}, <function default_new_style_executor at 0x000002286f44a980>, TupleStrategy((just(()), fixed_dictionaries({'va...klist_characters='\r\n'), min_size=1), sampled_from(['\n', '\r', '\r\n'])))}).map(lambda args: dict(args, **kwargs)))))
test_runner = <function default_new_style_executor at 0x000002286f44a980>
search_strategy = TupleStrategy((just(()), fixed_dictionaries({'values': lists(tuples(text(alphabet=characters(blacklist_characters='\r\n'), min_size=1), sampled_from(['\n', '\r', '\r\n'])))}).map(lambda args: dict(args, **kwargs))))
runner = None
state = <hypothesis.core.StateForActualGivenExecution object at 0x000002287c15fa28>
@impersonate(test)
@define_function_signature(test.__name__, test.__doc__, argspec)
def wrapped_test(*arguments, **kwargs):
# Tell pytest to omit the body of this function from tracebacks
__tracebackhide__ = True
test = wrapped_test.hypothesis.inner_test
if getattr(test, "is_hypothesis_test", False):
raise InvalidArgument(
f"You have applied @given to the test {test.__name__} more than "
"once, which wraps the test several times and is extremely slow. "
"A similar effect can be gained by combining the arguments "
"of the two calls to given. For example, instead of "
"@given(booleans()) @given(integers()), you could write "
"@given(booleans(), integers())"
)
settings = wrapped_test._hypothesis_internal_use_settings
random = get_random_for_wrapped_test(test, wrapped_test)
processed_args = process_arguments_to_given(
wrapped_test, arguments, kwargs, given_kwargs, argspec
)
arguments, kwargs, test_runner, search_strategy = processed_args
if (
inspect.iscoroutinefunction(test)
and test_runner is default_new_style_executor
):
# See https://github.com/HypothesisWorks/hypothesis/issues/3054
# If our custom executor doesn't handle coroutines, or we return an
# awaitable from a non-async-def function, we just rely on the
# return_value health check. This catches most user errors though.
raise InvalidArgument(
"Hypothesis doesn't know how to run async test functions like "
f"{test.__name__}. You'll need to write a custom executor, "
"or use a library like pytest-asyncio or pytest-trio which can "
"handle the translation for you.\n See https://hypothesis."
"readthedocs.io/en/latest/details.html#custom-function-execution"
)
runner = getattr(search_strategy, "runner", None)
if isinstance(runner, TestCase) and test.__name__ in dir(TestCase):
msg = (
f"You have applied @given to the method {test.__name__}, which is "
"used by the unittest runner but is not itself a test."
" This is not useful in any way."
)
fail_health_check(settings, msg, HealthCheck.not_a_test_method)
if bad_django_TestCase(runner): # pragma: no cover
# Covered by the Django tests, but not the pytest coverage task
raise InvalidArgument(
"You have applied @given to a method on "
f"{type(runner).__qualname__}, but this "
"class does not inherit from the supported versions in "
"`hypothesis.extra.django`. Use the Hypothesis variants "
"to ensure that each example is run in a separate "
"database transaction."
)
state = StateForActualGivenExecution(
test_runner, search_strategy, test, settings, random, wrapped_test
)
reproduce_failure = wrapped_test._hypothesis_internal_use_reproduce_failure
# If there was a @reproduce_failure decorator, use it to reproduce
# the error (or complain that we couldn't). Either way, this will
# always raise some kind of error.
if reproduce_failure is not None:
expected_version, failure = reproduce_failure
if expected_version != __version__:
raise InvalidArgument(
"Attempting to reproduce a failure from a different "
"version of Hypothesis. This failure is from %s, but "
"you are currently running %r. Please change your "
"Hypothesis version to a matching one."
% (expected_version, __version__)
)
try:
state.execute_once(
ConjectureData.for_buffer(decode_failure(failure)),
print_example=True,
is_final=True,
)
raise DidNotReproduce(
"Expected the test to raise an error, but it "
"completed successfully."
)
except StopTest:
raise DidNotReproduce(
"The shape of the test data has changed in some way "
"from where this blob was defined. Are you sure "
"you're running the same test?"
) from None
except UnsatisfiedAssumption:
raise DidNotReproduce(
"The test data failed to satisfy an assumption in the "
"test. Have you added it since this blob was "
"generated?"
) from None
# There was no @reproduce_failure, so start by running any explicit
# examples from @example decorators.
errors = list(
execute_explicit_examples(state, wrapped_test, arguments, kwargs)
)
with local_settings(state.settings):
if len(errors) > 1:
# If we're not going to report multiple bugs, we would have
# stopped running explicit examples at the first failure.
assert state.settings.report_multiple_bugs
for fragments, err in errors:
for f in fragments:
report(f)
report(format_exception(err, err.__traceback__))
raise MultipleFailures(
f"Hypothesis found {len(errors)} failures in explicit examples."
)
elif errors:
fragments, the_error_hypothesis_found = errors[0]
for f in fragments:
report(f)
raise the_error_hypothesis_found
# If there were any explicit examples, they all ran successfully.
# The next step is to use the Conjecture engine to run the test on
# many different inputs.
if not (
Phase.reuse in settings.phases or Phase.generate in settings.phases
):
return
try:
if isinstance(runner, TestCase) and hasattr(runner, "subTest"):
subTest = runner.subTest
try:
runner.subTest = types.MethodType(fake_subTest, runner)
state.run_engine()
finally:
runner.subTest = subTest
else:
> state.run_engine()
pypy-venv\Lib\site-packages\hypothesis\core.py:1159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x000002287c15fa28>
def run_engine(self):
"""Run the test function many times, on database input and generated
input, using the Conjecture engine.
"""
# Tell pytest to omit the body of this function from tracebacks
__tracebackhide__ = True
try:
database_key = self.wrapped_test._hypothesis_internal_database_key
except AttributeError:
if global_force_seed is None:
database_key = function_digest(self.test)
else:
database_key = None
runner = ConjectureRunner(
self._execute_once_for_engine,
settings=self.settings,
random=self.random,
database_key=database_key,
)
# Use the Conjecture engine to run the test function many times
# on different inputs.
runner.run()
note_statistics(runner.statistics)
if runner.call_count == 0:
return
if runner.interesting_examples:
self.falsifying_examples = sorted(
runner.interesting_examples.values(),
key=lambda d: sort_key(d.buffer),
reverse=True,
)
else:
if runner.valid_examples == 0:
rep = get_pretty_function_description(self.test)
raise Unsatisfiable(f"Unable to satisfy assumptions of {rep}")
if not self.falsifying_examples:
return
elif not self.settings.report_multiple_bugs:
# Pretend that we only found one failure, by discarding the others.
del self.falsifying_examples[:-1]
# The engine found one or more failures, so we need to reproduce and
# report them.
flaky = 0
if runner.best_observed_targets:
for line in describe_targets(runner.best_observed_targets):
report(line)
report("")
explanations = explanatory_lines(self.explain_traces, self.settings)
for falsifying_example in self.falsifying_examples:
info = falsifying_example.extra_information
ran_example = ConjectureData.for_buffer(falsifying_example.buffer)
self.__was_flaky = False
assert info.__expected_exception is not None
try:
> self.execute_once(
ran_example,
print_example=not self.is_find,
is_final=True,
expected_failure=(
info.__expected_exception,
info.__expected_traceback,
),
)
pypy-venv\Lib\site-packages\hypothesis\core.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x000002287c15fa28>
data = ConjectureData(VALID, 7 bytes, frozen), print_example = True
is_final = True
expected_failure = (AssertionError("assert ['0\\n'] == ['0\\r\\n']\n At index 0 diff: '0\\n' != '0\\r\\n'\n Use -v to get the full diff... != '0\\r\\n'\nE Use -v to get the full diff\n\n..\\build\\extra_tests\\test_stringio.py:24: AssertionError\n")
def execute_once(
self, data, print_example=False, is_final=False, expected_failure=None
):
"""Run the test function once, using ``data`` as input.
If the test raises an exception, it will propagate through to the
caller of this method. Depending on its type, this could represent
an ordinary test failure, or a fatal error, or a control exception.
If this method returns normally, the test might have passed, or
it might have placed ``data`` in an unsuccessful state and then
swallowed the corresponding control exception.
"""
data.is_find = self.is_find
text_repr = [None]
if self.settings.deadline is None:
test = self.test
else:
@proxies(self.test)
def test(*args, **kwargs):
self.__test_runtime = None
initial_draws = len(data.draw_times)
start = time.perf_counter()
result = self.test(*args, **kwargs)
finish = time.perf_counter()
internal_draw_time = sum(data.draw_times[initial_draws:])
runtime = datetime.timedelta(
seconds=finish - start - internal_draw_time
)
self.__test_runtime = runtime
current_deadline = self.settings.deadline
if not is_final:
current_deadline = (current_deadline // 4) * 5
if runtime >= current_deadline:
raise DeadlineExceeded(runtime, self.settings.deadline)
return result
def run(data):
# Set up dynamic context needed by a single test run.
with local_settings(self.settings):
with deterministic_PRNG():
with BuildContext(data, is_final=is_final):
# Generate all arguments to the test function.
args, kwargs = data.draw(self.search_strategy)
if expected_failure is not None:
text_repr[0] = arg_string(test, args, kwargs)
if print_example or current_verbosity() >= Verbosity.verbose:
output = StringIO()
printer = RepresentationPrinter(output)
if print_example:
printer.text("Falsifying example:")
else:
printer.text("Trying example:")
if self.print_given_args:
printer.text(" ")
printer.text(test.__name__)
with printer.group(indent=4, open="(", close=""):
printer.break_()
for v in args:
printer.pretty(v)
# We add a comma unconditionally because
# generated arguments will always be kwargs,
# so there will always be more to come.
printer.text(",")
printer.breakable()
for i, (k, v) in enumerate(kwargs.items()):
printer.text(k)
printer.text("=")
printer.pretty(v)
printer.text(",")
if i + 1 < len(kwargs):
printer.breakable()
printer.break_()
printer.text(")")
printer.flush()
report(output.getvalue())
return test(*args, **kwargs)
# Run the test function once, via the executor hook.
# In most cases this will delegate straight to `run(data)`.
> result = self.test_runner(data, run)
pypy-venv\Lib\site-packages\hypothesis\core.py:637:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ConjectureData(VALID, 7 bytes, frozen)
function = <function StateForActualGivenExecution.execute_once.<locals>.run at 0x0000022800e63150>
def default_new_style_executor(data, function):
> return function(data)
pypy-venv\Lib\site-packages\hypothesis\executors.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ConjectureData(VALID, 7 bytes, frozen)
def run(data):
# Set up dynamic context needed by a single test run.
with local_settings(self.settings):
with deterministic_PRNG():
with BuildContext(data, is_final=is_final):
# Generate all arguments to the test function.
args, kwargs = data.draw(self.search_strategy)
if expected_failure is not None:
text_repr[0] = arg_string(test, args, kwargs)
if print_example or current_verbosity() >= Verbosity.verbose:
output = StringIO()
printer = RepresentationPrinter(output)
if print_example:
printer.text("Falsifying example:")
else:
printer.text("Trying example:")
if self.print_given_args:
printer.text(" ")
printer.text(test.__name__)
with printer.group(indent=4, open="(", close=""):
printer.break_()
for v in args:
printer.pretty(v)
# We add a comma unconditionally because
# generated arguments will always be kwargs,
# so there will always be more to come.
printer.text(",")
printer.breakable()
for i, (k, v) in enumerate(kwargs.items()):
printer.text(k)
printer.text("=")
printer.pretty(v)
printer.text(",")
if i + 1 < len(kwargs):
printer.breakable()
printer.break_()
printer.text(")")
printer.flush()
report(output.getvalue())
> return test(*args, **kwargs)
pypy-venv\Lib\site-packages\hypothesis\core.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
values = [('0', '\n')]
> ???
..\build\extra_tests\test_stringio.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = ([('0', '\n')],), kwargs = {}, initial_draws = 1, start = 1705108.229311
@proxies(self.test)
def test(*args, **kwargs):
self.__test_runtime = None
initial_draws = len(data.draw_times)
start = time.perf_counter()
> result = self.test(*args, **kwargs)
pypy-venv\Lib\site-packages\hypothesis\core.py:575:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
values = [('0', '\n')]
@given(values=st.lists(
st.tuples(
st.text(st.characters(blacklist_characters='\r\n'), min_size=1),
st.sampled_from(LINE_ENDINGS))))
def test_universal(values):
output_lines = [line + linesep for line, ending in values]
output = u''.join(output_lines)
input = u''.join(line + ending for line, ending in values)
sio = StringIO(input, newline=None)
sio.seek(0)
> assert list(sio) == output_lines
E AssertionError: assert ['0\n'] == ['0\r\n']
E At index 0 diff: '0\n' != '0\r\n'
E Use -v to get the full diff
..\build\extra_tests\test_stringio.py:24: AssertionError
During handling of the above exception, another exception occurred:
> ???
..\build\extra_tests\test_stringio.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy-venv\Lib\site-packages\hypothesis\internal\escalation.py:96: in get_trimmed_traceback
is_hypothesis_file(getframeinfo(tb.tb_frame)[0])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
frame = <frame at 0x00000228726f3a40, file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\hypothesis\core.py', line -1, code run_engine>
context = 1
def getframeinfo(frame, context=1):
"""Get information about a frame or traceback object.
A tuple of five things is returned: the filename, the line number of
the current line, the function name, a list of lines of context from
the source code, and the index of the current line within that list.
The optional second argument specifies the number of lines of context
to return, which are centered around the current line."""
if istraceback(frame):
positions = _get_code_position_from_tb(frame)
lineno = frame.tb_lineno
frame = frame.tb_frame
else:
lineno = frame.f_lineno
positions = _get_code_position(frame.f_code, frame.f_lasti)
if positions[0] is None:
frame, *positions = (frame, lineno, *positions[1:])
else:
frame, *positions = (frame, *positions)
lineno = positions[0]
if not isframe(frame):
raise TypeError('{!r} is not a frame or traceback object'.format(frame))
filename = getsourcefile(frame) or getfile(frame)
if context > 0:
> start = lineno - 1 - context//2
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
..\build\lib-python\3\inspect.py:1758: TypeError
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_universal(
values=[('0', '\n')],
)
________________________________ test_libdirs _________________________________
def test_libdirs():
# Make sure the schemes are all valid, issue 3954
schemes = sysconfig.get_scheme_names()
names = ["stdlib", "platstdlib", "platlib", "purelib"]
candidates = {sysconfig.get_path(name, scheme) for scheme in schemes for name in names}
paths = [path for path in candidates if path in sys.path]
if sys.platform == 'win32':
> assert len(paths) == 0
E AssertionError: assert 1 == 0
E + where 1 = len(['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Lib\\site-packages'])
..\build\extra_tests\test_sysconfig.py:12: AssertionError
________________________________ test_readline ________________________________
arguments = (), kwargs = {}, __tracebackhide__ = True
test = <function test_readline at 0x000002286d6f36c8>
settings = settings(database=DirectoryBasedExampleDatabase('d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\.hypo...nt_blob=False, report_multiple_bugs=True, stateful_step_count=50, suppress_health_check=(), verbosity=Verbosity.normal)
random = <random.Random object at 0x0000022870146c00>
processed_args = ((), {}, <function default_new_style_executor at 0x000002286f44a980>, TupleStrategy((just(()), fixed_dictionaries({'da...readline_universal(),
'mode': sampled_from(['\r', '\n', '\r\n', '', None])}).map(lambda args: dict(args, **kwargs)))))
test_runner = <function default_new_style_executor at 0x000002286f44a980>
search_strategy = TupleStrategy((just(()), fixed_dictionaries({'data': st_readline_universal(),
'mode': sampled_from(['\r', '\n', '\r\n', '', None])}).map(lambda args: dict(args, **kwargs))))
runner = None
state = <hypothesis.core.StateForActualGivenExecution object at 0x000002287edcd980>
@impersonate(test)
@define_function_signature(test.__name__, test.__doc__, argspec)
def wrapped_test(*arguments, **kwargs):
# Tell pytest to omit the body of this function from tracebacks
__tracebackhide__ = True
test = wrapped_test.hypothesis.inner_test
if getattr(test, "is_hypothesis_test", False):
raise InvalidArgument(
f"You have applied @given to the test {test.__name__} more than "
"once, which wraps the test several times and is extremely slow. "
"A similar effect can be gained by combining the arguments "
"of the two calls to given. For example, instead of "
"@given(booleans()) @given(integers()), you could write "
"@given(booleans(), integers())"
)
settings = wrapped_test._hypothesis_internal_use_settings
random = get_random_for_wrapped_test(test, wrapped_test)
processed_args = process_arguments_to_given(
wrapped_test, arguments, kwargs, given_kwargs, argspec
)
arguments, kwargs, test_runner, search_strategy = processed_args
if (
inspect.iscoroutinefunction(test)
and test_runner is default_new_style_executor
):
# See https://github.com/HypothesisWorks/hypothesis/issues/3054
# If our custom executor doesn't handle coroutines, or we return an
# awaitable from a non-async-def function, we just rely on the
# return_value health check. This catches most user errors though.
raise InvalidArgument(
"Hypothesis doesn't know how to run async test functions like "
f"{test.__name__}. You'll need to write a custom executor, "
"or use a library like pytest-asyncio or pytest-trio which can "
"handle the translation for you.\n See https://hypothesis."
"readthedocs.io/en/latest/details.html#custom-function-execution"
)
runner = getattr(search_strategy, "runner", None)
if isinstance(runner, TestCase) and test.__name__ in dir(TestCase):
msg = (
f"You have applied @given to the method {test.__name__}, which is "
"used by the unittest runner but is not itself a test."
" This is not useful in any way."
)
fail_health_check(settings, msg, HealthCheck.not_a_test_method)
if bad_django_TestCase(runner): # pragma: no cover
# Covered by the Django tests, but not the pytest coverage task
raise InvalidArgument(
"You have applied @given to a method on "
f"{type(runner).__qualname__}, but this "
"class does not inherit from the supported versions in "
"`hypothesis.extra.django`. Use the Hypothesis variants "
"to ensure that each example is run in a separate "
"database transaction."
)
state = StateForActualGivenExecution(
test_runner, search_strategy, test, settings, random, wrapped_test
)
reproduce_failure = wrapped_test._hypothesis_internal_use_reproduce_failure
# If there was a @reproduce_failure decorator, use it to reproduce
# the error (or complain that we couldn't). Either way, this will
# always raise some kind of error.
if reproduce_failure is not None:
expected_version, failure = reproduce_failure
if expected_version != __version__:
raise InvalidArgument(
"Attempting to reproduce a failure from a different "
"version of Hypothesis. This failure is from %s, but "
"you are currently running %r. Please change your "
"Hypothesis version to a matching one."
% (expected_version, __version__)
)
try:
state.execute_once(
ConjectureData.for_buffer(decode_failure(failure)),
print_example=True,
is_final=True,
)
raise DidNotReproduce(
"Expected the test to raise an error, but it "
"completed successfully."
)
except StopTest:
raise DidNotReproduce(
"The shape of the test data has changed in some way "
"from where this blob was defined. Are you sure "
"you're running the same test?"
) from None
except UnsatisfiedAssumption:
raise DidNotReproduce(
"The test data failed to satisfy an assumption in the "
"test. Have you added it since this blob was "
"generated?"
) from None
# There was no @reproduce_failure, so start by running any explicit
# examples from @example decorators.
errors = list(
execute_explicit_examples(state, wrapped_test, arguments, kwargs)
)
with local_settings(state.settings):
if len(errors) > 1:
# If we're not going to report multiple bugs, we would have
# stopped running explicit examples at the first failure.
assert state.settings.report_multiple_bugs
for fragments, err in errors:
for f in fragments:
report(f)
report(format_exception(err, err.__traceback__))
raise MultipleFailures(
f"Hypothesis found {len(errors)} failures in explicit examples."
)
elif errors:
fragments, the_error_hypothesis_found = errors[0]
for f in fragments:
report(f)
raise the_error_hypothesis_found
# If there were any explicit examples, they all ran successfully.
# The next step is to use the Conjecture engine to run the test on
# many different inputs.
if not (
Phase.reuse in settings.phases or Phase.generate in settings.phases
):
return
try:
if isinstance(runner, TestCase) and hasattr(runner, "subTest"):
subTest = runner.subTest
try:
runner.subTest = types.MethodType(fake_subTest, runner)
state.run_engine()
finally:
runner.subTest = subTest
else:
> state.run_engine()
pypy-venv\Lib\site-packages\hypothesis\core.py:1159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x000002287edcd980>
def run_engine(self):
"""Run the test function many times, on database input and generated
input, using the Conjecture engine.
"""
# Tell pytest to omit the body of this function from tracebacks
__tracebackhide__ = True
try:
database_key = self.wrapped_test._hypothesis_internal_database_key
except AttributeError:
if global_force_seed is None:
database_key = function_digest(self.test)
else:
database_key = None
runner = ConjectureRunner(
self._execute_once_for_engine,
settings=self.settings,
random=self.random,
database_key=database_key,
)
# Use the Conjecture engine to run the test function many times
# on different inputs.
runner.run()
note_statistics(runner.statistics)
if runner.call_count == 0:
return
if runner.interesting_examples:
self.falsifying_examples = sorted(
runner.interesting_examples.values(),
key=lambda d: sort_key(d.buffer),
reverse=True,
)
else:
if runner.valid_examples == 0:
rep = get_pretty_function_description(self.test)
raise Unsatisfiable(f"Unable to satisfy assumptions of {rep}")
if not self.falsifying_examples:
return
elif not self.settings.report_multiple_bugs:
# Pretend that we only found one failure, by discarding the others.
del self.falsifying_examples[:-1]
# The engine found one or more failures, so we need to reproduce and
# report them.
flaky = 0
if runner.best_observed_targets:
for line in describe_targets(runner.best_observed_targets):
report(line)
report("")
explanations = explanatory_lines(self.explain_traces, self.settings)
for falsifying_example in self.falsifying_examples:
info = falsifying_example.extra_information
ran_example = ConjectureData.for_buffer(falsifying_example.buffer)
self.__was_flaky = False
assert info.__expected_exception is not None
try:
> self.execute_once(
ran_example,
print_example=not self.is_find,
is_final=True,
expected_failure=(
info.__expected_exception,
info.__expected_traceback,
),
)
pypy-venv\Lib\site-packages\hypothesis\core.py:816:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <hypothesis.core.StateForActualGivenExecution object at 0x000002287edcd980>
data = ConjectureData(VALID, 5 bytes, frozen), print_example = True
is_final = True
expected_failure = (AssertionError("assert False\n + where False = <bound method str.startswith of '\\r\\n'>('\\n')\n + where <bound ... + where <bound method str.join of ''> = ''.join\n\n..\\build\\extra_tests\\test_textio.py:48: AssertionError\n")
def execute_once(
self, data, print_example=False, is_final=False, expected_failure=None
):
"""Run the test function once, using ``data`` as input.
If the test raises an exception, it will propagate through to the
caller of this method. Depending on its type, this could represent
an ordinary test failure, or a fatal error, or a control exception.
If this method returns normally, the test might have passed, or
it might have placed ``data`` in an unsuccessful state and then
swallowed the corresponding control exception.
"""
data.is_find = self.is_find
text_repr = [None]
if self.settings.deadline is None:
test = self.test
else:
@proxies(self.test)
def test(*args, **kwargs):
self.__test_runtime = None
initial_draws = len(data.draw_times)
start = time.perf_counter()
result = self.test(*args, **kwargs)
finish = time.perf_counter()
internal_draw_time = sum(data.draw_times[initial_draws:])
runtime = datetime.timedelta(
seconds=finish - start - internal_draw_time
)
self.__test_runtime = runtime
current_deadline = self.settings.deadline
if not is_final:
current_deadline = (current_deadline // 4) * 5
if runtime >= current_deadline:
raise DeadlineExceeded(runtime, self.settings.deadline)
return result
def run(data):
# Set up dynamic context needed by a single test run.
with local_settings(self.settings):
with deterministic_PRNG():
with BuildContext(data, is_final=is_final):
# Generate all arguments to the test function.
args, kwargs = data.draw(self.search_strategy)
if expected_failure is not None:
text_repr[0] = arg_string(test, args, kwargs)
if print_example or current_verbosity() >= Verbosity.verbose:
output = StringIO()
printer = RepresentationPrinter(output)
if print_example:
printer.text("Falsifying example:")
else:
printer.text("Trying example:")
if self.print_given_args:
printer.text(" ")
printer.text(test.__name__)
with printer.group(indent=4, open="(", close=""):
printer.break_()
for v in args:
printer.pretty(v)
# We add a comma unconditionally because
# generated arguments will always be kwargs,
# so there will always be more to come.
printer.text(",")
printer.breakable()
for i, (k, v) in enumerate(kwargs.items()):
printer.text(k)
printer.text("=")
printer.pretty(v)
printer.text(",")
if i + 1 < len(kwargs):
printer.breakable()
printer.break_()
printer.text(")")
printer.flush()
report(output.getvalue())
return test(*args, **kwargs)
# Run the test function once, via the executor hook.
# In most cases this will delegate straight to `run(data)`.
> result = self.test_runner(data, run)
pypy-venv\Lib\site-packages\hypothesis\core.py:637:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ConjectureData(VALID, 5 bytes, frozen)
function = <function StateForActualGivenExecution.execute_once.<locals>.run at 0x000002287ceacb10>
def default_new_style_executor(data, function):
> return function(data)
pypy-venv\Lib\site-packages\hypothesis\executors.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ConjectureData(VALID, 5 bytes, frozen)
def run(data):
# Set up dynamic context needed by a single test run.
with local_settings(self.settings):
with deterministic_PRNG():
with BuildContext(data, is_final=is_final):
# Generate all arguments to the test function.
args, kwargs = data.draw(self.search_strategy)
if expected_failure is not None:
text_repr[0] = arg_string(test, args, kwargs)
if print_example or current_verbosity() >= Verbosity.verbose:
output = StringIO()
printer = RepresentationPrinter(output)
if print_example:
printer.text("Falsifying example:")
else:
printer.text("Trying example:")
if self.print_given_args:
printer.text(" ")
printer.text(test.__name__)
with printer.group(indent=4, open="(", close=""):
printer.break_()
for v in args:
printer.pretty(v)
# We add a comma unconditionally because
# generated arguments will always be kwargs,
# so there will always be more to come.
printer.text(",")
printer.breakable()
for i, (k, v) in enumerate(kwargs.items()):
printer.text(k)
printer.text("=")
printer.pretty(v)
printer.text(",")
if i + 1 < len(kwargs):
printer.breakable()
printer.break_()
printer.text(")")
printer.flush()
report(output.getvalue())
> return test(*args, **kwargs)
pypy-venv\Lib\site-packages\hypothesis\core.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ('\n', [0, -1]), mode = None
> ???
..\build\extra_tests\test_textio.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (('\n', [0, -1]), None), kwargs = {}, initial_draws = 1
start = 1705109.4476916
@proxies(self.test)
def test(*args, **kwargs):
self.__test_runtime = None
initial_draws = len(data.draw_times)
start = time.perf_counter()
> result = self.test(*args, **kwargs)
pypy-venv\Lib\site-packages\hypothesis\core.py:575:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = ('\n', [0, -1]), mode = None
@given(data=st_readline_universal(),
mode=st.sampled_from(['\r', '\n', '\r\n', '', None]))
def test_readline(data, mode):
txt, limits = data
textio = TextIOWrapper(
BytesIO(txt.encode('utf-8', 'surrogatepass')),
encoding='utf-8', errors='surrogatepass', newline=mode)
lines = []
for limit in limits:
line = textio.readline(limit)
if limit >= 0:
assert len(line) <= limit
if line:
lines.append(line)
elif limit:
break
if mode is None:
txt = translate_newlines(txt)
> assert txt.startswith(u''.join(lines))
E AssertionError: assert False
E + where False = <bound method str.startswith of '\r\n'>('\n')
E + where <bound method str.startswith of '\r\n'> = '\r\n'.startswith
E + and '\n' = <bound method str.join of ''>(['\n'])
E + where <bound method str.join of ''> = ''.join
..\build\extra_tests\test_textio.py:48: AssertionError
During handling of the above exception, another exception occurred:
> ???
..\build\extra_tests\test_textio.py:31:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pypy-venv\Lib\site-packages\hypothesis\internal\escalation.py:96: in get_trimmed_traceback
is_hypothesis_file(getframeinfo(tb.tb_frame)[0])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
frame = <frame at 0x0000022876603620, file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\hypothesis\core.py', line -1, code run_engine>
context = 1
def getframeinfo(frame, context=1):
"""Get information about a frame or traceback object.
A tuple of five things is returned: the filename, the line number of
the current line, the function name, a list of lines of context from
the source code, and the index of the current line within that list.
The optional second argument specifies the number of lines of context
to return, which are centered around the current line."""
if istraceback(frame):
positions = _get_code_position_from_tb(frame)
lineno = frame.tb_lineno
frame = frame.tb_frame
else:
lineno = frame.f_lineno
positions = _get_code_position(frame.f_code, frame.f_lasti)
if positions[0] is None:
frame, *positions = (frame, lineno, *positions[1:])
else:
frame, *positions = (frame, *positions)
lineno = positions[0]
if not isframe(frame):
raise TypeError('{!r} is not a frame or traceback object'.format(frame))
filename = getsourcefile(frame) or getfile(frame)
if context > 0:
> start = lineno - 1 - context//2
E TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
..\build\lib-python\3\inspect.py:1758: TypeError
--------------------------------- Hypothesis ----------------------------------
Falsifying example: test_readline(
data=('\n', [0, -1]), mode=None,
)
____________________________ test_multiprocessing _____________________________
tmpdir = local('D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_multiprocessing0')
def test_multiprocessing(tmpdir):
# issue 4876
subprocess.run([sys.executable, '-mvenv', str(tmpdir / 'venv')])
# 'bin' or 'Script'
path = os.path.split(sysconfig.get_path('scripts'))[-1]
exe = str(tmpdir / 'venv' / path / os.path.split(sys.executable)[-1])
result = subprocess.run([exe, '-c',
'from multiprocessing import Pool; ' +
'print(Pool(1).apply_async(eval, ("__import__(\'sys\').executable",)).get(3))'],
capture_output=True)
> result.check_returncode()
..\build\extra_tests\test_venv.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = CompletedProcess(args=['D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_multiprocessing0\\venv\\Scripts\\pypy3.exe', ...ionError:\ndebug: operror-type: AttributeError\ndebug: operror-value: module 'sys' has no attribute 'base_prefix'\n")
def check_returncode(self):
"""Raise CalledProcessError if the exit code is non-zero."""
if self.returncode:
> raise CalledProcessError(self.returncode, self.args, self.stdout,
self.stderr)
E subprocess.CalledProcessError: Command '['D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_multiprocessing0\\venv\\Scripts\\pypy3.exe', '-c', 'from multiprocessing import Pool; print(Pool(1).apply_async(eval, ("__import__(\'sys\').executable",)).get(3))']' returned non-zero exit status 1.
..\build\lib-python\3\subprocess.py:502: CalledProcessError
---------------------------- Captured stderr call -----------------------------
Error: Command '['D:\\SystemTemp\\pytest-of-matti\\pytest-77\\test_multiprocessing0\\venv\\Scripts\\pypy3.exe', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
_________ TestDistUtilsCPython.test_compile_module_explicit_filename __________
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287e00d948>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...ot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__gd114b6f9x180d8dd1.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = ['msvcrt']
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
> self.spawn([self.linker] + ld_args)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287e00d948>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
def spawn(self, cmd):
env = dict(os.environ, PATH=self._paths)
with self._fallback_spawn(cmd, env) as fallback:
> return super().spawn(cmd, env=env)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287e00d948>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
kwargs = {'env': {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}}
def spawn(self, cmd, **kwargs):
> spawn(cmd, dry_run=self.dry_run, **kwargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe'
search_path = 1, verbose = 0, dry_run = 0
env = {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
# cmd is documented as a list, but just in case some code passes a tuple
# in, protect our %-formatting code against horrible death
cmd = list(cmd)
log.info(subprocess.list2cmdline(cmd))
if dry_run:
return
if search_path:
executable = find_executable(cmd[0])
if executable is not None:
cmd[0] = executable
env = env if env is not None else dict(os.environ)
if sys.platform == 'darwin':
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
macosx_target_ver = get_macosx_target_ver()
if macosx_target_ver:
env[MACOSX_VERSION_VAR] = macosx_target_ver
try:
proc = subprocess.Popen(cmd, env=env)
proc.wait()
exitcode = proc.returncode
except OSError as exc:
if not DEBUG:
cmd = cmd[0]
raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
if exitcode:
if not DEBUG:
cmd = cmd[0]
> raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E distutils.errors.DistutilsExecError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\spawn.py:68: DistutilsExecError
During handling of the above exception, another exception occurred:
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x2287dd29830>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
> dist.run_command('build_ext')
..\build\lib_pypy\cffi\ffiplatform.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x000002287dd28c28>
command = 'build_ext'
def run_command(self, command):
self.set_defaults()
# Postpone defaults until all explicit configuration is considered
# (setup() args, config files, command line and plugins)
> super().run_command(command)
pypy-venv\Lib\site-packages\setuptools\dist.py:968:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x000002287dd28c28>
command = 'build_ext'
def run_command(self, command):
"""Do whatever it takes to run a command (including nothing at all,
if the command has already been run). Specifically: if we have
already created and run the command named by 'command', return
silently without doing anything. If the command named by 'command'
doesn't even have a command object yet, create one. Then invoke
'run()' on that command object (or an existing one).
"""
# Already been here, done that? then return silently.
if self.have_run.get(command):
return
log.info("running %s", command)
cmd_obj = self.get_command_obj(command)
cmd_obj.ensure_finalized()
> cmd_obj.run()
pypy-venv\Lib\site-packages\setuptools\_distutils\dist.py:988:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
def run(self):
"""Build extensions in build directory, then copy if --inplace"""
old_inplace, self.inplace = self.inplace, 0
> _build_ext.run(self)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
def run(self): # noqa: C901
from ..ccompiler import new_compiler
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
#
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
# where build_info is a dictionary containing everything that
# Extension instances do except the name, with a few things being
# differently named. We convert these 2-tuples to Extension
# instances as needed.
if not self.extensions:
return
# If we were asked to build any C/C++ libraries, make sure that the
# directory where we put them is in the library search path for
# linking extensions.
if self.distribution.has_c_libraries():
build_clib = self.get_finalized_command('build_clib')
self.libraries.extend(build_clib.get_library_names() or [])
self.library_dirs.append(build_clib.build_clib)
# Setup the CCompiler object that we'll use to do all the
# compiling and linking
self.compiler = new_compiler(
compiler=self.compiler,
verbose=self.verbose,
dry_run=self.dry_run,
force=self.force,
)
customize_compiler(self.compiler)
# If we are cross-compiling, init the compiler now (if we are not
# cross-compiling, init would not hurt, but people may rely on
# late initialization of compiler even if they shouldn't...)
if os.name == 'nt' and self.plat_name != get_platform():
self.compiler.initialize(self.plat_name)
# And make sure that any compile/link-related options (which might
# come from the command-line or from the setup script) are set in
# that CCompiler object -- that way, they automatically apply to
# all compiling and linking done here.
if self.include_dirs is not None:
self.compiler.set_include_dirs(self.include_dirs)
if self.define is not None:
# 'define' option is a list of (name,value) tuples
for name, value in self.define:
self.compiler.define_macro(name, value)
if self.undef is not None:
for macro in self.undef:
self.compiler.undefine_macro(macro)
if self.libraries is not None:
self.compiler.set_libraries(self.libraries)
if self.library_dirs is not None:
self.compiler.set_library_dirs(self.library_dirs)
if self.rpath is not None:
self.compiler.set_runtime_library_dirs(self.rpath)
if self.link_objects is not None:
self.compiler.set_link_objects(self.link_objects)
# Now actually compile and link everything.
> self.build_extensions()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:359:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
if self.parallel:
self._build_extensions_parallel()
else:
> self._build_extensions_serial()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
def _build_extensions_serial(self):
for ext in self.extensions:
with self._filter_build_errors(ext):
> self.build_extension(ext)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:505:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x2287dd29830>
def build_extension(self, ext):
ext._convert_pyx_sources_to_lang()
_compiler = self.compiler
try:
if isinstance(ext, Library):
self.compiler = self.shlib_compiler
> _build_ext.build_extension(self, ext)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287e00d910>
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x2287dd29830>
def build_extension(self, ext):
sources = ext.sources
if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError(
"in 'ext_modules' option (extension '%s'), "
"'sources' must be present and must be "
"a list of source filenames" % ext.name
)
# sort to make the resulting .so file build reproducible
sources = sorted(sources)
ext_path = self.get_ext_fullpath(ext.name)
depends = sources + ext.depends
if not (self.force or newer_group(depends, ext_path, 'newer')):
log.debug("skipping '%s' extension (up-to-date)", ext.name)
return
else:
log.info("building '%s' extension", ext.name)
# First, scan the sources for SWIG definition files (.i), run
# SWIG on 'em to create .c files, and modify the sources list
# accordingly.
sources = self.swig_sources(sources, ext)
# Next, compile the source code to object files.
# XXX not honouring 'define_macros' or 'undef_macros' -- the
# CCompiler API needs to change to accommodate this, and I
# want to do one thing at a time!
# Two possible sources for extra compiler arguments:
# - 'extra_compile_args' in Extension object
# - CFLAGS environment variable (not particularly
# elegant, but people seem to expect it and I
# guess it's useful)
# The environment variable should take precedence, and
# any sensible compiler will give precedence to later
# command line args. Hence we combine them in order:
extra_args = ext.extra_compile_args or []
macros = ext.define_macros[:]
for undef in ext.undef_macros:
macros.append((undef,))
objects = self.compiler.compile(
sources,
output_dir=self.build_temp,
macros=macros,
include_dirs=ext.include_dirs,
debug=self.debug,
extra_postargs=extra_args,
depends=ext.depends,
)
# XXX outdated variable, kept here in case third-part code
# needs it.
self._built_objects = objects[:]
# Now link the object files together into a "shared object" --
# of course, first we have to figure out all the other things
# that go into the mix.
if ext.extra_objects:
objects.extend(ext.extra_objects)
extra_args = ext.extra_link_args or []
# Detect target language, if not provided
language = ext.language or self.compiler.detect_language(sources)
> self.compiler.link_shared_object(
objects,
ext_path,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp,
target_lang=language,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287e00d948>
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...ot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__gd114b6f9x180d8dd1.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = None, libraries = ['msvcrt'], library_dirs = []
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release'
target_lang = 'c'
def link_shared_object(
self,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
> self.link(
CCompiler.SHARED_OBJECT,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
export_symbols,
debug,
extra_preargs,
extra_postargs,
build_temp,
target_lang,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:752:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287e00d948>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...ot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__gd114b6f9x180d8dd1.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = ['msvcrt']
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
self.spawn([self.linker] + ld_args)
except DistutilsExecError as msg:
> raise LinkError(msg)
E distutils.errors.LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:510: LinkError
During handling of the above exception, another exception occurred:
self = <extra_tests.cffi_tests.cffi0.test_zdistutils.TestDistUtilsCPython object at 0x000002287dd28bb8>
def test_compile_module_explicit_filename(self):
ffi = FFI()
ffi.cdef("double sin(double x);")
csrc = '/*hi there %s!2*/\n#include <math.h>\n' % self
v = Verifier(ffi, csrc, force_generic_engine=self.generic,
libraries=[self.lib_m])
basename = self.__class__.__name__[:10] + '_test_compile_module'
module_file = udir / (basename + '.so')
v.modulefilename = str(module_file)
> v.compile_module()
..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\build\lib_pypy\cffi\verifier.py:90: in compile_module
self._compile_module()
..\build\lib_pypy\cffi\verifier.py:201: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
..\build\lib_pypy\cffi\ffiplatform.py:56: in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x2287dd29830>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
dist.run_command('build_ext')
cmd_obj = dist.get_command_obj('build_ext')
[soname] = cmd_obj.get_outputs()
finally:
set_threshold(old_level)
except (CompileError, LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E cffi.VerificationError: LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
..\build\lib_pypy\cffi\ffiplatform.py:90: VerificationError
---------------------------- Captured stdout call -----------------------------
_cffi__gd114b6f9x180d8dd1.c
LINK : fatal error LNK1104: cannot open file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\Release\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.lib'
________________________ TestDistUtilsCPython.test_tag ________________________
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287a706138>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = []
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_gabe4f798xa2889239']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
> self.spawn([self.linker] + ld_args)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287a706138>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
def spawn(self, cmd):
env = dict(os.environ, PATH=self._paths)
with self._fallback_spawn(cmd, env) as fallback:
> return super().spawn(cmd, env=env)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287a706138>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
kwargs = {'env': {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}}
def spawn(self, cmd, **kwargs):
> spawn(cmd, dry_run=self.dry_run, **kwargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe'
search_path = 1, verbose = 0, dry_run = 0
env = {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
# cmd is documented as a list, but just in case some code passes a tuple
# in, protect our %-formatting code against horrible death
cmd = list(cmd)
log.info(subprocess.list2cmdline(cmd))
if dry_run:
return
if search_path:
executable = find_executable(cmd[0])
if executable is not None:
cmd[0] = executable
env = env if env is not None else dict(os.environ)
if sys.platform == 'darwin':
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
macosx_target_ver = get_macosx_target_ver()
if macosx_target_ver:
env[MACOSX_VERSION_VAR] = macosx_target_ver
try:
proc = subprocess.Popen(cmd, env=env)
proc.wait()
exitcode = proc.returncode
except OSError as exc:
if not DEBUG:
cmd = cmd[0]
raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
if exitcode:
if not DEBUG:
cmd = cmd[0]
> raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E distutils.errors.DistutilsExecError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\spawn.py:68: DistutilsExecError
During handling of the above exception, another exception occurred:
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_gabe4f798xa2889239') at 0x2287b5b4288>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
> dist.run_command('build_ext')
..\build\lib_pypy\cffi\ffiplatform.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x000002287a8db558>
command = 'build_ext'
def run_command(self, command):
self.set_defaults()
# Postpone defaults until all explicit configuration is considered
# (setup() args, config files, command line and plugins)
> super().run_command(command)
pypy-venv\Lib\site-packages\setuptools\dist.py:968:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x000002287a8db558>
command = 'build_ext'
def run_command(self, command):
"""Do whatever it takes to run a command (including nothing at all,
if the command has already been run). Specifically: if we have
already created and run the command named by 'command', return
silently without doing anything. If the command named by 'command'
doesn't even have a command object yet, create one. Then invoke
'run()' on that command object (or an existing one).
"""
# Already been here, done that? then return silently.
if self.have_run.get(command):
return
log.info("running %s", command)
cmd_obj = self.get_command_obj(command)
cmd_obj.ensure_finalized()
> cmd_obj.run()
pypy-venv\Lib\site-packages\setuptools\_distutils\dist.py:988:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
def run(self):
"""Build extensions in build directory, then copy if --inplace"""
old_inplace, self.inplace = self.inplace, 0
> _build_ext.run(self)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
def run(self): # noqa: C901
from ..ccompiler import new_compiler
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
#
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
# where build_info is a dictionary containing everything that
# Extension instances do except the name, with a few things being
# differently named. We convert these 2-tuples to Extension
# instances as needed.
if not self.extensions:
return
# If we were asked to build any C/C++ libraries, make sure that the
# directory where we put them is in the library search path for
# linking extensions.
if self.distribution.has_c_libraries():
build_clib = self.get_finalized_command('build_clib')
self.libraries.extend(build_clib.get_library_names() or [])
self.library_dirs.append(build_clib.build_clib)
# Setup the CCompiler object that we'll use to do all the
# compiling and linking
self.compiler = new_compiler(
compiler=self.compiler,
verbose=self.verbose,
dry_run=self.dry_run,
force=self.force,
)
customize_compiler(self.compiler)
# If we are cross-compiling, init the compiler now (if we are not
# cross-compiling, init would not hurt, but people may rely on
# late initialization of compiler even if they shouldn't...)
if os.name == 'nt' and self.plat_name != get_platform():
self.compiler.initialize(self.plat_name)
# And make sure that any compile/link-related options (which might
# come from the command-line or from the setup script) are set in
# that CCompiler object -- that way, they automatically apply to
# all compiling and linking done here.
if self.include_dirs is not None:
self.compiler.set_include_dirs(self.include_dirs)
if self.define is not None:
# 'define' option is a list of (name,value) tuples
for name, value in self.define:
self.compiler.define_macro(name, value)
if self.undef is not None:
for macro in self.undef:
self.compiler.undefine_macro(macro)
if self.libraries is not None:
self.compiler.set_libraries(self.libraries)
if self.library_dirs is not None:
self.compiler.set_library_dirs(self.library_dirs)
if self.rpath is not None:
self.compiler.set_runtime_library_dirs(self.rpath)
if self.link_objects is not None:
self.compiler.set_link_objects(self.link_objects)
# Now actually compile and link everything.
> self.build_extensions()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:359:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
if self.parallel:
self._build_extensions_parallel()
else:
> self._build_extensions_serial()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
def _build_extensions_serial(self):
for ext in self.extensions:
with self._filter_build_errors(ext):
> self.build_extension(ext)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:505:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_gabe4f798xa2889239') at 0x2287b5b4288>
def build_extension(self, ext):
ext._convert_pyx_sources_to_lang()
_compiler = self.compiler
try:
if isinstance(ext, Library):
self.compiler = self.shlib_compiler
> _build_ext.build_extension(self, ext)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287a706100>
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_gabe4f798xa2889239') at 0x2287b5b4288>
def build_extension(self, ext):
sources = ext.sources
if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError(
"in 'ext_modules' option (extension '%s'), "
"'sources' must be present and must be "
"a list of source filenames" % ext.name
)
# sort to make the resulting .so file build reproducible
sources = sorted(sources)
ext_path = self.get_ext_fullpath(ext.name)
depends = sources + ext.depends
if not (self.force or newer_group(depends, ext_path, 'newer')):
log.debug("skipping '%s' extension (up-to-date)", ext.name)
return
else:
log.info("building '%s' extension", ext.name)
# First, scan the sources for SWIG definition files (.i), run
# SWIG on 'em to create .c files, and modify the sources list
# accordingly.
sources = self.swig_sources(sources, ext)
# Next, compile the source code to object files.
# XXX not honouring 'define_macros' or 'undef_macros' -- the
# CCompiler API needs to change to accommodate this, and I
# want to do one thing at a time!
# Two possible sources for extra compiler arguments:
# - 'extra_compile_args' in Extension object
# - CFLAGS environment variable (not particularly
# elegant, but people seem to expect it and I
# guess it's useful)
# The environment variable should take precedence, and
# any sensible compiler will give precedence to later
# command line args. Hence we combine them in order:
extra_args = ext.extra_compile_args or []
macros = ext.define_macros[:]
for undef in ext.undef_macros:
macros.append((undef,))
objects = self.compiler.compile(
sources,
output_dir=self.build_temp,
macros=macros,
include_dirs=ext.include_dirs,
debug=self.debug,
extra_postargs=extra_args,
depends=ext.depends,
)
# XXX outdated variable, kept here in case third-part code
# needs it.
self._built_objects = objects[:]
# Now link the object files together into a "shared object" --
# of course, first we have to figure out all the other things
# that go into the mix.
if ext.extra_objects:
objects.extend(ext.extra_objects)
extra_args = ext.extra_link_args or []
# Detect target language, if not provided
language = ext.language or self.compiler.detect_language(sources)
> self.compiler.link_shared_object(
objects,
ext_path,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp,
target_lang=language,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287a706138>
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.pypy312-pp80-win_amd64.pyd'
output_dir = None, libraries = [], library_dirs = [], runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_gabe4f798xa2889239']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release'
target_lang = 'c'
def link_shared_object(
self,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
> self.link(
CCompiler.SHARED_OBJECT,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
export_symbols,
debug,
extra_preargs,
extra_postargs,
build_temp,
target_lang,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:752:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287a706138>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_gabe4f798xa2889239.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = []
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_gabe4f798xa2889239']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
self.spawn([self.linker] + ld_args)
except DistutilsExecError as msg:
> raise LinkError(msg)
E distutils.errors.LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:510: LinkError
During handling of the above exception, another exception occurred:
self = <extra_tests.cffi_tests.cffi0.test_zdistutils.TestDistUtilsCPython object at 0x000002287a8db4e8>
def test_tag(self):
ffi = FFI()
ffi.cdef("/* %s test_tag */ double test1tag(double x);" % self)
csrc = "double test1tag(double x) { return x - 42.0; }"
> lib = ffi.verify(csrc, force_generic_engine=self.generic,
tag='xxtest_tagxx')
..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\build\lib_pypy\cffi\api.py:461: in verify
lib = self.verifier.load_library()
..\build\lib_pypy\cffi\verifier.py:105: in load_library
self._compile_module()
..\build\lib_pypy\cffi\verifier.py:201: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
..\build\lib_pypy\cffi\ffiplatform.py:56: in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_gabe4f798xa2889239') at 0x2287b5b4288>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
dist.run_command('build_ext')
cmd_obj = dist.get_command_obj('build_ext')
[soname] = cmd_obj.get_outputs()
finally:
set_threshold(old_level)
except (CompileError, LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E cffi.VerificationError: LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
..\build\lib_pypy\cffi\ffiplatform.py:90: VerificationError
---------------------------- Captured stdout call -----------------------------
_cffi_xxtest_tagxx_gabe4f798xa2889239.c
LINK : fatal error LNK1104: cannot open file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\Release\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\_cffi_xxtest_tagxx_gabe4f798xa2889239.pypy312-pp80-win_amd64.lib'
_________ TestDistUtilsGeneric.test_compile_module_explicit_filename __________
self = <distutils._msvccompiler.MSVCCompiler object at 0x0000022800f59de0>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...bot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__ge7473dccxce29192.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = ['msvcrt']
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
> self.spawn([self.linker] + ld_args)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x0000022800f59de0>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
def spawn(self, cmd):
env = dict(os.environ, PATH=self._paths)
with self._fallback_spawn(cmd, env) as fallback:
> return super().spawn(cmd, env=env)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x0000022800f59de0>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
kwargs = {'env': {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}}
def spawn(self, cmd, **kwargs):
> spawn(cmd, dry_run=self.dry_run, **kwargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe'
search_path = 1, verbose = 0, dry_run = 0
env = {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
# cmd is documented as a list, but just in case some code passes a tuple
# in, protect our %-formatting code against horrible death
cmd = list(cmd)
log.info(subprocess.list2cmdline(cmd))
if dry_run:
return
if search_path:
executable = find_executable(cmd[0])
if executable is not None:
cmd[0] = executable
env = env if env is not None else dict(os.environ)
if sys.platform == 'darwin':
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
macosx_target_ver = get_macosx_target_ver()
if macosx_target_ver:
env[MACOSX_VERSION_VAR] = macosx_target_ver
try:
proc = subprocess.Popen(cmd, env=env)
proc.wait()
exitcode = proc.returncode
except OSError as exc:
if not DEBUG:
cmd = cmd[0]
raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
if exitcode:
if not DEBUG:
cmd = cmd[0]
> raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E distutils.errors.DistutilsExecError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\spawn.py:68: DistutilsExecError
During handling of the above exception, another exception occurred:
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x22800f9d1d8>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
> dist.run_command('build_ext')
..\build\lib_pypy\cffi\ffiplatform.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x0000022800f9c8a8>
command = 'build_ext'
def run_command(self, command):
self.set_defaults()
# Postpone defaults until all explicit configuration is considered
# (setup() args, config files, command line and plugins)
> super().run_command(command)
pypy-venv\Lib\site-packages\setuptools\dist.py:968:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x0000022800f9c8a8>
command = 'build_ext'
def run_command(self, command):
"""Do whatever it takes to run a command (including nothing at all,
if the command has already been run). Specifically: if we have
already created and run the command named by 'command', return
silently without doing anything. If the command named by 'command'
doesn't even have a command object yet, create one. Then invoke
'run()' on that command object (or an existing one).
"""
# Already been here, done that? then return silently.
if self.have_run.get(command):
return
log.info("running %s", command)
cmd_obj = self.get_command_obj(command)
cmd_obj.ensure_finalized()
> cmd_obj.run()
pypy-venv\Lib\site-packages\setuptools\_distutils\dist.py:988:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
def run(self):
"""Build extensions in build directory, then copy if --inplace"""
old_inplace, self.inplace = self.inplace, 0
> _build_ext.run(self)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
def run(self): # noqa: C901
from ..ccompiler import new_compiler
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
#
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
# where build_info is a dictionary containing everything that
# Extension instances do except the name, with a few things being
# differently named. We convert these 2-tuples to Extension
# instances as needed.
if not self.extensions:
return
# If we were asked to build any C/C++ libraries, make sure that the
# directory where we put them is in the library search path for
# linking extensions.
if self.distribution.has_c_libraries():
build_clib = self.get_finalized_command('build_clib')
self.libraries.extend(build_clib.get_library_names() or [])
self.library_dirs.append(build_clib.build_clib)
# Setup the CCompiler object that we'll use to do all the
# compiling and linking
self.compiler = new_compiler(
compiler=self.compiler,
verbose=self.verbose,
dry_run=self.dry_run,
force=self.force,
)
customize_compiler(self.compiler)
# If we are cross-compiling, init the compiler now (if we are not
# cross-compiling, init would not hurt, but people may rely on
# late initialization of compiler even if they shouldn't...)
if os.name == 'nt' and self.plat_name != get_platform():
self.compiler.initialize(self.plat_name)
# And make sure that any compile/link-related options (which might
# come from the command-line or from the setup script) are set in
# that CCompiler object -- that way, they automatically apply to
# all compiling and linking done here.
if self.include_dirs is not None:
self.compiler.set_include_dirs(self.include_dirs)
if self.define is not None:
# 'define' option is a list of (name,value) tuples
for name, value in self.define:
self.compiler.define_macro(name, value)
if self.undef is not None:
for macro in self.undef:
self.compiler.undefine_macro(macro)
if self.libraries is not None:
self.compiler.set_libraries(self.libraries)
if self.library_dirs is not None:
self.compiler.set_library_dirs(self.library_dirs)
if self.rpath is not None:
self.compiler.set_runtime_library_dirs(self.rpath)
if self.link_objects is not None:
self.compiler.set_link_objects(self.link_objects)
# Now actually compile and link everything.
> self.build_extensions()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:359:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
if self.parallel:
self._build_extensions_parallel()
else:
> self._build_extensions_serial()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
def _build_extensions_serial(self):
for ext in self.extensions:
with self._filter_build_errors(ext):
> self.build_extension(ext)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:505:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x22800f9d1d8>
def build_extension(self, ext):
ext._convert_pyx_sources_to_lang()
_compiler = self.compiler
try:
if isinstance(ext, Library):
self.compiler = self.shlib_compiler
> _build_ext.build_extension(self, ext)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x0000022800f59d70>
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x22800f9d1d8>
def build_extension(self, ext):
sources = ext.sources
if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError(
"in 'ext_modules' option (extension '%s'), "
"'sources' must be present and must be "
"a list of source filenames" % ext.name
)
# sort to make the resulting .so file build reproducible
sources = sorted(sources)
ext_path = self.get_ext_fullpath(ext.name)
depends = sources + ext.depends
if not (self.force or newer_group(depends, ext_path, 'newer')):
log.debug("skipping '%s' extension (up-to-date)", ext.name)
return
else:
log.info("building '%s' extension", ext.name)
# First, scan the sources for SWIG definition files (.i), run
# SWIG on 'em to create .c files, and modify the sources list
# accordingly.
sources = self.swig_sources(sources, ext)
# Next, compile the source code to object files.
# XXX not honouring 'define_macros' or 'undef_macros' -- the
# CCompiler API needs to change to accommodate this, and I
# want to do one thing at a time!
# Two possible sources for extra compiler arguments:
# - 'extra_compile_args' in Extension object
# - CFLAGS environment variable (not particularly
# elegant, but people seem to expect it and I
# guess it's useful)
# The environment variable should take precedence, and
# any sensible compiler will give precedence to later
# command line args. Hence we combine them in order:
extra_args = ext.extra_compile_args or []
macros = ext.define_macros[:]
for undef in ext.undef_macros:
macros.append((undef,))
objects = self.compiler.compile(
sources,
output_dir=self.build_temp,
macros=macros,
include_dirs=ext.include_dirs,
debug=self.debug,
extra_postargs=extra_args,
depends=ext.depends,
)
# XXX outdated variable, kept here in case third-part code
# needs it.
self._built_objects = objects[:]
# Now link the object files together into a "shared object" --
# of course, first we have to figure out all the other things
# that go into the mix.
if ext.extra_objects:
objects.extend(ext.extra_objects)
extra_args = ext.extra_link_args or []
# Detect target language, if not provided
language = ext.language or self.compiler.detect_language(sources)
> self.compiler.link_shared_object(
objects,
ext_path,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp,
target_lang=language,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x0000022800f59de0>
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...bot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__ge7473dccxce29192.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = None, libraries = ['msvcrt'], library_dirs = []
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release'
target_lang = 'c'
def link_shared_object(
self,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
> self.link(
CCompiler.SHARED_OBJECT,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
export_symbols,
debug,
extra_preargs,
extra_postargs,
build_temp,
target_lang,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:752:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x0000022800f59de0>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...bot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi__ge7473dccxce29192.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = ['msvcrt']
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_sin', 'PyInit_TestDistUt_test_compile_module']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
self.spawn([self.linker] + ld_args)
except DistutilsExecError as msg:
> raise LinkError(msg)
E distutils.errors.LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:510: LinkError
During handling of the above exception, another exception occurred:
self = <extra_tests.cffi_tests.cffi0.test_zdistutils.TestDistUtilsGeneric object at 0x0000022800f9c800>
def test_compile_module_explicit_filename(self):
ffi = FFI()
ffi.cdef("double sin(double x);")
csrc = '/*hi there %s!2*/\n#include <math.h>\n' % self
v = Verifier(ffi, csrc, force_generic_engine=self.generic,
libraries=[self.lib_m])
basename = self.__class__.__name__[:10] + '_test_compile_module'
module_file = udir / (basename + '.so')
v.modulefilename = str(module_file)
> v.compile_module()
..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\build\lib_pypy\cffi\verifier.py:90: in compile_module
self._compile_module()
..\build\lib_pypy\cffi\verifier.py:201: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
..\build\lib_pypy\cffi\ffiplatform.py:56: in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('TestDistUt_test_compile_module') at 0x22800f9d1d8>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
dist.run_command('build_ext')
cmd_obj = dist.get_command_obj('build_ext')
[soname] = cmd_obj.get_outputs()
finally:
set_threshold(old_level)
except (CompileError, LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E cffi.VerificationError: LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
..\build\lib_pypy\cffi\ffiplatform.py:90: VerificationError
---------------------------- Captured stdout call -----------------------------
_cffi__ge7473dccxce29192.c
LINK : fatal error LNK1104: cannot open file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\Release\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\TestDistUt_test_compile_module.pypy312-pp80-win_amd64.lib'
________________________ TestDistUtilsGeneric.test_tag ________________________
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aae8db0>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = []
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_g3ad3f8dfx6da1db25']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
> self.spawn([self.linker] + ld_args)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aae8db0>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
def spawn(self, cmd):
env = dict(os.environ, PATH=self._paths)
with self._fallback_spawn(cmd, env) as fallback:
> return super().spawn(cmd, env=env)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aae8db0>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DLL', '/MANIFEST:EMBED,ID=2', ...]
kwargs = {'env': {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}}
def spawn(self, cmd, **kwargs):
> spawn(cmd, dry_run=self.dry_run, **kwargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe'
search_path = 1, verbose = 0, dry_run = 0
env = {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
# cmd is documented as a list, but just in case some code passes a tuple
# in, protect our %-formatting code against horrible death
cmd = list(cmd)
log.info(subprocess.list2cmdline(cmd))
if dry_run:
return
if search_path:
executable = find_executable(cmd[0])
if executable is not None:
cmd[0] = executable
env = env if env is not None else dict(os.environ)
if sys.platform == 'darwin':
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
macosx_target_ver = get_macosx_target_ver()
if macosx_target_ver:
env[MACOSX_VERSION_VAR] = macosx_target_ver
try:
proc = subprocess.Popen(cmd, env=env)
proc.wait()
exitcode = proc.returncode
except OSError as exc:
if not DEBUG:
cmd = cmd[0]
raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
if exitcode:
if not DEBUG:
cmd = cmd[0]
> raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E distutils.errors.DistutilsExecError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\spawn.py:68: DistutilsExecError
During handling of the above exception, another exception occurred:
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25') at 0x228009f7a28>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
> dist.run_command('build_ext')
..\build\lib_pypy\cffi\ffiplatform.py:84:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x00000228009f7050>
command = 'build_ext'
def run_command(self, command):
self.set_defaults()
# Postpone defaults until all explicit configuration is considered
# (setup() args, config files, command line and plugins)
> super().run_command(command)
pypy-venv\Lib\site-packages\setuptools\dist.py:968:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.dist.Distribution object at 0x00000228009f7050>
command = 'build_ext'
def run_command(self, command):
"""Do whatever it takes to run a command (including nothing at all,
if the command has already been run). Specifically: if we have
already created and run the command named by 'command', return
silently without doing anything. If the command named by 'command'
doesn't even have a command object yet, create one. Then invoke
'run()' on that command object (or an existing one).
"""
# Already been here, done that? then return silently.
if self.have_run.get(command):
return
log.info("running %s", command)
cmd_obj = self.get_command_obj(command)
cmd_obj.ensure_finalized()
> cmd_obj.run()
pypy-venv\Lib\site-packages\setuptools\_distutils\dist.py:988:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
def run(self):
"""Build extensions in build directory, then copy if --inplace"""
old_inplace, self.inplace = self.inplace, 0
> _build_ext.run(self)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:91:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
def run(self): # noqa: C901
from ..ccompiler import new_compiler
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
#
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
# where build_info is a dictionary containing everything that
# Extension instances do except the name, with a few things being
# differently named. We convert these 2-tuples to Extension
# instances as needed.
if not self.extensions:
return
# If we were asked to build any C/C++ libraries, make sure that the
# directory where we put them is in the library search path for
# linking extensions.
if self.distribution.has_c_libraries():
build_clib = self.get_finalized_command('build_clib')
self.libraries.extend(build_clib.get_library_names() or [])
self.library_dirs.append(build_clib.build_clib)
# Setup the CCompiler object that we'll use to do all the
# compiling and linking
self.compiler = new_compiler(
compiler=self.compiler,
verbose=self.verbose,
dry_run=self.dry_run,
force=self.force,
)
customize_compiler(self.compiler)
# If we are cross-compiling, init the compiler now (if we are not
# cross-compiling, init would not hurt, but people may rely on
# late initialization of compiler even if they shouldn't...)
if os.name == 'nt' and self.plat_name != get_platform():
self.compiler.initialize(self.plat_name)
# And make sure that any compile/link-related options (which might
# come from the command-line or from the setup script) are set in
# that CCompiler object -- that way, they automatically apply to
# all compiling and linking done here.
if self.include_dirs is not None:
self.compiler.set_include_dirs(self.include_dirs)
if self.define is not None:
# 'define' option is a list of (name,value) tuples
for name, value in self.define:
self.compiler.define_macro(name, value)
if self.undef is not None:
for macro in self.undef:
self.compiler.undefine_macro(macro)
if self.libraries is not None:
self.compiler.set_libraries(self.libraries)
if self.library_dirs is not None:
self.compiler.set_library_dirs(self.library_dirs)
if self.rpath is not None:
self.compiler.set_runtime_library_dirs(self.rpath)
if self.link_objects is not None:
self.compiler.set_link_objects(self.link_objects)
# Now actually compile and link everything.
> self.build_extensions()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:359:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
if self.parallel:
self._build_extensions_parallel()
else:
> self._build_extensions_serial()
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:479:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
def _build_extensions_serial(self):
for ext in self.extensions:
with self._filter_build_errors(ext):
> self.build_extension(ext)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:505:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25') at 0x228009f7a28>
def build_extension(self, ext):
ext._convert_pyx_sources_to_lang()
_compiler = self.compiler
try:
if isinstance(ext, Library):
self.compiler = self.shlib_compiler
> _build_ext.build_extension(self, ext)
pypy-venv\Lib\site-packages\setuptools\command\build_ext.py:252:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <setuptools.command.build_ext.build_ext object at 0x000002287aaa91d8>
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25') at 0x228009f7a28>
def build_extension(self, ext):
sources = ext.sources
if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError(
"in 'ext_modules' option (extension '%s'), "
"'sources' must be present and must be "
"a list of source filenames" % ext.name
)
# sort to make the resulting .so file build reproducible
sources = sorted(sources)
ext_path = self.get_ext_fullpath(ext.name)
depends = sources + ext.depends
if not (self.force or newer_group(depends, ext_path, 'newer')):
log.debug("skipping '%s' extension (up-to-date)", ext.name)
return
else:
log.info("building '%s' extension", ext.name)
# First, scan the sources for SWIG definition files (.i), run
# SWIG on 'em to create .c files, and modify the sources list
# accordingly.
sources = self.swig_sources(sources, ext)
# Next, compile the source code to object files.
# XXX not honouring 'define_macros' or 'undef_macros' -- the
# CCompiler API needs to change to accommodate this, and I
# want to do one thing at a time!
# Two possible sources for extra compiler arguments:
# - 'extra_compile_args' in Extension object
# - CFLAGS environment variable (not particularly
# elegant, but people seem to expect it and I
# guess it's useful)
# The environment variable should take precedence, and
# any sensible compiler will give precedence to later
# command line args. Hence we combine them in order:
extra_args = ext.extra_compile_args or []
macros = ext.define_macros[:]
for undef in ext.undef_macros:
macros.append((undef,))
objects = self.compiler.compile(
sources,
output_dir=self.build_temp,
macros=macros,
include_dirs=ext.include_dirs,
debug=self.debug,
extra_postargs=extra_args,
depends=ext.depends,
)
# XXX outdated variable, kept here in case third-part code
# needs it.
self._built_objects = objects[:]
# Now link the object files together into a "shared object" --
# of course, first we have to figure out all the other things
# that go into the mix.
if ext.extra_objects:
objects.extend(ext.extra_objects)
extra_args = ext.extra_link_args or []
# Detect target language, if not provided
language = ext.language or self.compiler.detect_language(sources)
> self.compiler.link_shared_object(
objects,
ext_path,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp,
target_lang=language,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\command\build_ext.py:584:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aae8db0>
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.pypy312-pp80-win_amd64.pyd'
output_dir = None, libraries = [], library_dirs = [], runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_g3ad3f8dfx6da1db25']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release'
target_lang = 'c'
def link_shared_object(
self,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
> self.link(
CCompiler.SHARED_OBJECT,
objects,
output_filename,
output_dir,
libraries,
library_dirs,
runtime_library_dirs,
export_symbols,
debug,
extra_preargs,
extra_postargs,
build_temp,
target_lang,
)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:752:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aae8db0>
target_desc = 'shared_object'
objects = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Releas...\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.obj']
output_filename = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.pypy312-pp80-win_amd64.pyd'
output_dir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
libraries = []
library_dirs = ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\libs', 'D:\\pypy_stuff\\buildbot64\\slave....34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\lib\\x64', ...]
runtime_library_dirs = []
export_symbols = ['_cffi_f_test1tag', 'PyInit__cffi_xxtest_tagxx_g3ad3f8dfx6da1db25']
debug = 0, extra_preargs = None, extra_postargs = []
build_temp = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__\\Release\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
target_lang = 'c'
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
self.spawn([self.linker] + ld_args)
except DistutilsExecError as msg:
> raise LinkError(msg)
E distutils.errors.LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:510: LinkError
During handling of the above exception, another exception occurred:
self = <extra_tests.cffi_tests.cffi0.test_zdistutils.TestDistUtilsGeneric object at 0x00000228009f7018>
def test_tag(self):
ffi = FFI()
ffi.cdef("/* %s test_tag */ double test1tag(double x);" % self)
csrc = "double test1tag(double x) { return x - 42.0; }"
> lib = ffi.verify(csrc, force_generic_engine=self.generic,
tag='xxtest_tagxx')
..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py:270:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\build\lib_pypy\cffi\api.py:461: in verify
lib = self.verifier.load_library()
..\build\lib_pypy\cffi\verifier.py:105: in load_library
self._compile_module()
..\build\lib_pypy\cffi\verifier.py:201: in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
..\build\lib_pypy\cffi\ffiplatform.py:56: in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tmpdir = 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests\\cffi_tests\\cffi0\\__pycache__'
ext = <setuptools.extension.Extension('_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25') at 0x228009f7a28>
compiler_verbose = 0, debug = 0
def _build(tmpdir, ext, compiler_verbose=0, debug=None):
# XXX compact but horrible :-(
from cffi._shimmed_dist_utils import Distribution, CompileError, LinkError, set_threshold, set_verbosity
dist = Distribution({'ext_modules': [ext]})
dist.parse_config_files()
options = dist.get_option_dict('build_ext')
if debug is None:
debug = sys.flags.debug
options['debug'] = ('ffiplatform', debug)
options['force'] = ('ffiplatform', True)
options['build_lib'] = ('ffiplatform', tmpdir)
options['build_temp'] = ('ffiplatform', tmpdir)
#
try:
old_level = set_threshold(0) or 0
try:
set_verbosity(compiler_verbose)
dist.run_command('build_ext')
cmd_obj = dist.get_command_obj('build_ext')
[soname] = cmd_obj.get_outputs()
finally:
set_threshold(old_level)
except (CompileError, LinkError) as e:
> raise VerificationError('%s: %s' % (e.__class__.__name__, e))
E cffi.VerificationError: LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
..\build\lib_pypy\cffi\ffiplatform.py:90: VerificationError
---------------------------- Captured stdout call -----------------------------
_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.c
LINK : fatal error LNK1104: cannot open file 'd:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\Release\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\__pycache__\_cffi_xxtest_tagxx_g3ad3f8dfx6da1db25.pypy312-pp80-win_amd64.lib'
____________________________ TestBasic.test_empty _____________________________
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aeca950>
target_desc = 'executable'
objects = ['empty-test.obj', 'Release\\_empty_cffi.lib']
output_filename = 'empty-test.exe'
output_dir = 'D:\\SystemTemp\\ffi-695\\embedding\\test_empty', libraries = []
library_dirs = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual...s Kits\\10\\lib\\10.0.20348.0\\ucrt\\x64', 'C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.20348.0\\\\um\\x64']
runtime_library_dirs = [], export_symbols = None, debug = 0
extra_preargs = ['/MANIFEST'], extra_postargs = None, build_temp = ''
target_lang = None
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
> self.spawn([self.linker] + ld_args)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:508:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aeca950>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/MANIFEST', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/MANIFEST:EMBED,ID=1', ...]
def spawn(self, cmd):
env = dict(os.environ, PATH=self._paths)
with self._fallback_spawn(cmd, env) as fallback:
> return super().spawn(cmd, env=env)
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:517:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aeca950>
cmd = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe', '/MANIFEST', '/nologo', '/INCREMENTAL:NO', '/LTCG', '/MANIFEST:EMBED,ID=1', ...]
kwargs = {'env': {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}}
def spawn(self, cmd, **kwargs):
> spawn(cmd, dry_run=self.dry_run, **kwargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:1041:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cmd = 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe'
search_path = 1, verbose = 0, dry_run = 0
env = {'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\matti\\AppData\\Roaming', 'ASL.LOG': 'Destination=file', 'CHOCOLATEYINSTALL': 'C:\\ProgramData\\chocolatey', ...}
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
"""Run another program, specified as a command list 'cmd', in a new process.
'cmd' is just the argument list for the new process, ie.
cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
There is no way to run a program with a name different from that of its
executable.
If 'search_path' is true (the default), the system's executable
search path will be used to find the program; otherwise, cmd[0]
must be the exact path to the executable. If 'dry_run' is true,
the command will not actually be run.
Raise DistutilsExecError if running the program fails in any way; just
return on success.
"""
# cmd is documented as a list, but just in case some code passes a tuple
# in, protect our %-formatting code against horrible death
cmd = list(cmd)
log.info(subprocess.list2cmdline(cmd))
if dry_run:
return
if search_path:
executable = find_executable(cmd[0])
if executable is not None:
cmd[0] = executable
env = env if env is not None else dict(os.environ)
if sys.platform == 'darwin':
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
macosx_target_ver = get_macosx_target_ver()
if macosx_target_ver:
env[MACOSX_VERSION_VAR] = macosx_target_ver
try:
proc = subprocess.Popen(cmd, env=env)
proc.wait()
exitcode = proc.returncode
except OSError as exc:
if not DEBUG:
cmd = cmd[0]
raise DistutilsExecError(f"command {cmd!r} failed: {exc.args[-1]}") from exc
if exitcode:
if not DEBUG:
cmd = cmd[0]
> raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
E distutils.errors.DistutilsExecError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
pypy-venv\Lib\site-packages\setuptools\_distutils\spawn.py:68: DistutilsExecError
During handling of the above exception, another exception occurred:
self = <extra_tests.cffi_tests.embedding.test_basic.TestBasic object at 0x000002287c972bf0>
def test_empty(self):
empty_cffi = self.prepare_module('empty')
> self.compile('empty-test', [empty_cffi])
..\build\extra_tests\cffi_tests\embedding\test_basic.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\build\extra_tests\cffi_tests\embedding\test_basic.py:139: in compile
c.link_executable(objects + modules, name, extra_preargs=extra_preargs)
pypy-venv\Lib\site-packages\setuptools\_distutils\ccompiler.py:781: in link_executable
self.link(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <distutils._msvccompiler.MSVCCompiler object at 0x000002287aeca950>
target_desc = 'executable'
objects = ['empty-test.obj', 'Release\\_empty_cffi.lib']
output_filename = 'empty-test.exe'
output_dir = 'D:\\SystemTemp\\ffi-695\\embedding\\test_empty', libraries = []
library_dirs = ['d:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\ATLMFC\\lib\\x64', 'd:\\Microsoft Visual...s Kits\\10\\lib\\10.0.20348.0\\ucrt\\x64', 'C:\\Program Files (x86)\\Windows Kits\\10\\\\lib\\10.0.20348.0\\\\um\\x64']
runtime_library_dirs = [], export_symbols = None, debug = 0
extra_preargs = ['/MANIFEST'], extra_postargs = None, build_temp = ''
target_lang = None
def link(
self,
target_desc,
objects,
output_filename,
output_dir=None,
libraries=None,
library_dirs=None,
runtime_library_dirs=None,
export_symbols=None,
debug=0,
extra_preargs=None,
extra_postargs=None,
build_temp=None,
target_lang=None,
):
if not self.initialized:
self.initialize()
objects, output_dir = self._fix_object_args(objects, output_dir)
fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
libraries, library_dirs, runtime_library_dirs = fixed_args
if runtime_library_dirs:
self.warn(
"I don't know what to do with 'runtime_library_dirs': "
+ str(runtime_library_dirs)
)
lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
if output_dir is not None:
output_filename = os.path.join(output_dir, output_filename)
if self._need_link(objects, output_filename):
ldflags = self._ldflags[target_desc, debug]
export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
ld_args = (
ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
)
# The MSVC linker generates .lib and .exp files, which cannot be
# suppressed by any linker switches. The .lib files may even be
# needed! Make sure they are generated in the temporary build
# directory. Since they have different names for debug and release
# builds, they can go into the same directory.
build_temp = os.path.dirname(objects[0])
if export_symbols is not None:
(dll_name, dll_ext) = os.path.splitext(
os.path.basename(output_filename)
)
implib_file = os.path.join(build_temp, self.library_filename(dll_name))
ld_args.append('/IMPLIB:' + implib_file)
if extra_preargs:
ld_args[:0] = extra_preargs
if extra_postargs:
ld_args.extend(extra_postargs)
output_dir = os.path.dirname(os.path.abspath(output_filename))
self.mkpath(output_dir)
try:
log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
self.spawn([self.linker] + ld_args)
except DistutilsExecError as msg:
> raise LinkError(msg)
E distutils.errors.LinkError: command 'd:\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.41.34120\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
pypy-venv\Lib\site-packages\setuptools\_distutils\_msvccompiler.py:510: LinkError
---------------------------- Captured stdout setup ----------------------------
generating D:\SystemTemp\ffi-695\embedding\_test_lib_python_found.c
setting the current directory to 'D:\\SystemTemp\\ffi-695\\embedding'
_test_lib_python_found.c
Creating library .\Release\_test_lib_python_found.pypy312-pp80-win_amd64.lib and object .\Release\_test_lib_python_found.pypy312-pp80-win_amd64.exp
Generating code
Finished generating code
----------------------------- Captured log setup ------------------------------
INFO root:dist.py:985 running build_ext
INFO root:build_ext.py:533 building '_test_lib_python_found' extension
INFO root:dir_util.py:70 creating Release
INFO root:spawn.py:38 "d:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Id:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\include -ID:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\include -ID:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\Include "-Id:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include" "-Id:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\ATLMFC\include" "-Id:\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt" /Tc_test_lib_python_found.c /Fo.\Release\_test_lib_python_found.obj
INFO root:spawn.py:38 "d:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\libs /LIBPATH:d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\pypy\goal /LIBPATH:d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\libs /LIBPATH:D:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\libs /LIBPATH:D:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build /LIBPATH:d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\PCbuild\amd64 "/LIBPATH:d:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\ATLMFC\lib\x64" "/LIBPATH:d:\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.20348.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.20348.0\\um\x64" python312.lib /EXPORT:PyInit__test_lib_python_found .\Release\_test_lib_python_found.obj /OUT:.\_test_lib_python_found.pypy312-pp80-win_amd64.pyd /IMPLIB:.\Release\_test_lib_python_found.pypy312-pp80-win_amd64.lib /MANIFEST
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_empty;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'
* setting env var 'PYTHONPATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\extra_tests;'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_empty\\empty.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_empty', 'stdout': -1, 'universal_newlines': True}
_empty_cffi.c
Creating library .\Release\_empty_cffi.lib and object .\Release\_empty_cffi.exp
Generating code
Finished generating code
generating .\_empty_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_empty'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_empty\_empty_cffi.dll
compiling empty-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_empty\\_empty_cffi.dll']
empty-test.c
empty-test.obj : error LNK2001: unresolved external symbol initialize_my_empty_cffi
empty-test.exe : fatal error LNK1120: 1 unresolved externals
___________________ TestThread.test_first_calls_in_parallel ___________________
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x00000228007d30c0>
def test_first_calls_in_parallel(self):
add1_cffi = self.prepare_module('add1')
self.compile('thread1-test', [add1_cffi], threads=True)
for i in range(20):
> output = self.execute('thread1-test')
..\build\extra_tests\cffi_tests\embedding\test_thread.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x00000228007d30c0>
name = 'thread1-test'
def execute(self, name):
path = self.get_path()
print('running %r in %r' % (name, path))
executable_name = name
if sys.platform == 'win32':
executable_name = os.path.join(path, executable_name + '.exe')
else:
executable_name = os.path.join('.', executable_name)
popen = self._run_base([executable_name], cwd=path,
stdout=subprocess.PIPE,
universal_newlines=True)
result, _ = popen.communicate()
err = popen.returncode
if err:
> raise OSError("%r failed with exit code %r" % (
os.path.join(path, executable_name), err))
E OSError: 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel\\thread1-test.exe' failed with exit code 3221225477
..\build\extra_tests\cffi_tests\embedding\test_basic.py:178: OSError
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel;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'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel\\add1.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel', 'stdout': -1, 'universal_newlines': True}
_add1_cffi.c
Creating library .\Release\_add1_cffi.lib and object .\Release\_add1_cffi.exp
Generating code
Finished generating code
generating .\_add1_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_first_calls_in_parallel\_add1_cffi.dll
compiling thread1-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel\\_add1_cffi.dll']
thread1-test.c
Generating code
Finished generating code
running 'thread1-test' in 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel'
RUNNING: ['D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel\\thread1-test.exe'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_first_calls_in_parallel', 'stdout': -1, 'universal_newlines': True}
_________ TestThread.test_init_different_modules_in_different_threads _________
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x000002287e4cb088>
def test_init_different_modules_in_different_threads(self):
add1_cffi = self.prepare_module('add1')
add2_cffi = self.prepare_module('add2')
self.compile('thread2-test', [add1_cffi, add2_cffi], threads=True)
for i in range(3):
> output = self.execute('thread2-test')
..\build\extra_tests\cffi_tests\embedding\test_thread.py:26:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x000002287e4cb088>
name = 'thread2-test'
def execute(self, name):
path = self.get_path()
print('running %r in %r' % (name, path))
executable_name = name
if sys.platform == 'win32':
executable_name = os.path.join(path, executable_name + '.exe')
else:
executable_name = os.path.join('.', executable_name)
popen = self._run_base([executable_name], cwd=path,
stdout=subprocess.PIPE,
universal_newlines=True)
result, _ = popen.communicate()
err = popen.returncode
if err:
> raise OSError("%r failed with exit code %r" % (
os.path.join(path, executable_name), err))
E OSError: 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\thread2-test.exe' failed with exit code 3221225477
..\build\extra_tests\cffi_tests\embedding\test_basic.py:178: OSError
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads;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'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\add1.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads', 'stdout': -1, 'universal_newlines': True}
_add1_cffi.c
Creating library .\Release\_add1_cffi.lib and object .\Release\_add1_cffi.exp
Generating code
Finished generating code
generating .\_add1_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_init_different_modules_in_different_threads\_add1_cffi.dll
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\add2.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads', 'stdout': -1, 'universal_newlines': True}
_add2_cffi.c
Creating library .\Release\_add2_cffi.lib and object .\Release\_add2_cffi.exp
Generating code
Finished generating code
generating .\_add2_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_init_different_modules_in_different_threads\_add2_cffi.dll
compiling thread2-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\_add1_cffi.dll', 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\_add2_cffi.dll']
thread2-test.c
Generating code
Finished generating code
running 'thread2-test' in 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads'
RUNNING: ['D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads\\thread2-test.exe'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_init_different_modules_in_different_threads', 'stdout': -1, 'universal_newlines': True}
__________________________ TestThread.test_alt_issue __________________________
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x0000022879ef2db0>
def test_alt_issue(self):
add1_cffi = self.prepare_module('add1')
add2_cffi = self.prepare_module('add2')
self.compile('thread2-test', [add1_cffi, add2_cffi],
threads=True, defines={'T2TEST_AGAIN_ADD1': '1'})
> output = self.execute('thread2-test')
..\build\extra_tests\cffi_tests\embedding\test_thread.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x0000022879ef2db0>
name = 'thread2-test'
def execute(self, name):
path = self.get_path()
print('running %r in %r' % (name, path))
executable_name = name
if sys.platform == 'win32':
executable_name = os.path.join(path, executable_name + '.exe')
else:
executable_name = os.path.join('.', executable_name)
popen = self._run_base([executable_name], cwd=path,
stdout=subprocess.PIPE,
universal_newlines=True)
result, _ = popen.communicate()
err = popen.returncode
if err:
> raise OSError("%r failed with exit code %r" % (
os.path.join(path, executable_name), err))
E OSError: 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\thread2-test.exe' failed with exit code 3221225477
..\build\extra_tests\cffi_tests\embedding\test_basic.py:178: OSError
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue;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'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\add1.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue', 'stdout': -1, 'universal_newlines': True}
_add1_cffi.c
Creating library .\Release\_add1_cffi.lib and object .\Release\_add1_cffi.exp
Generating code
Finished generating code
generating .\_add1_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_alt_issue\_add1_cffi.dll
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\add2.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue', 'stdout': -1, 'universal_newlines': True}
_add2_cffi.c
Creating library .\Release\_add2_cffi.lib and object .\Release\_add2_cffi.exp
Generating code
Finished generating code
generating .\_add2_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_alt_issue\_add2_cffi.dll
compiling thread2-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\_add1_cffi.dll', 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\_add2_cffi.dll']
thread2-test.c
Generating code
Finished generating code
running 'thread2-test' in 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue'
RUNNING: ['D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue\\thread2-test.exe'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_alt_issue', 'stdout': -1, 'universal_newlines': True}
____________________ TestThread.test_load_in_parallel_more ____________________
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x0000022879f2dec0>
def test_load_in_parallel_more(self):
add2_cffi = self.prepare_module('add2')
add3_cffi = self.prepare_module('add3')
self.compile('thread3-test', [add2_cffi, add3_cffi], threads=True)
for i in range(150):
> output = self.execute('thread3-test')
..\build\extra_tests\cffi_tests\embedding\test_thread.py:60:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <extra_tests.cffi_tests.embedding.test_thread.TestThread object at 0x0000022879f2dec0>
name = 'thread3-test'
def execute(self, name):
path = self.get_path()
print('running %r in %r' % (name, path))
executable_name = name
if sys.platform == 'win32':
executable_name = os.path.join(path, executable_name + '.exe')
else:
executable_name = os.path.join('.', executable_name)
popen = self._run_base([executable_name], cwd=path,
stdout=subprocess.PIPE,
universal_newlines=True)
result, _ = popen.communicate()
err = popen.returncode
if err:
> raise OSError("%r failed with exit code %r" % (
os.path.join(path, executable_name), err))
E OSError: 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\thread3-test.exe' failed with exit code 3221225477
..\build\extra_tests\cffi_tests\embedding\test_basic.py:178: OSError
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more;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'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\add2.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more', 'stdout': -1, 'universal_newlines': True}
_add2_cffi.c
Creating library .\Release\_add2_cffi.lib and object .\Release\_add2_cffi.exp
Generating code
Finished generating code
generating .\_add2_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_load_in_parallel_more\_add2_cffi.dll
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\add3.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more', 'stdout': -1, 'universal_newlines': True}
_add3_cffi.c
Creating library .\Release\_add3_cffi.lib and object .\Release\_add3_cffi.exp
Generating code
Finished generating code
generating .\_add3_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_load_in_parallel_more\_add3_cffi.dll
compiling thread3-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\_add2_cffi.dll', 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\_add3_cffi.dll']
thread3-test.c
Generating code
Finished generating code
running 'thread3-test' in 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more'
RUNNING: ['D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more\\thread3-test.exe'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_load_in_parallel_more', 'stdout': -1, 'universal_newlines': True}
______________________ TestThreadLocal.test_thread_local ______________________
self = <extra_tests.cffi_tests.embedding.test_tlocal.TestThreadLocal object at 0x000002287f32d328>
def test_thread_local(self):
tlocal_cffi = self.prepare_module('tlocal')
self.compile('tlocal-test', [tlocal_cffi], threads=True)
for i in range(10):
> output = self.execute('tlocal-test')
..\build\extra_tests\cffi_tests\embedding\test_tlocal.py:10:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <extra_tests.cffi_tests.embedding.test_tlocal.TestThreadLocal object at 0x000002287f32d328>
name = 'tlocal-test'
def execute(self, name):
path = self.get_path()
print('running %r in %r' % (name, path))
executable_name = name
if sys.platform == 'win32':
executable_name = os.path.join(path, executable_name + '.exe')
else:
executable_name = os.path.join('.', executable_name)
popen = self._run_base([executable_name], cwd=path,
stdout=subprocess.PIPE,
universal_newlines=True)
result, _ = popen.communicate()
err = popen.returncode
if err:
> raise OSError("%r failed with exit code %r" % (
os.path.join(path, executable_name), err))
E OSError: 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local\\tlocal-test.exe' failed with exit code 3221225477
..\build\extra_tests\cffi_tests\embedding\test_basic.py:178: OSError
---------------------------- Captured stdout call -----------------------------
* setting env var 'PATH' to 'd:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts;D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local;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'
RUNNING: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe', 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local\\tlocal.py'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local', 'stdout': -1, 'universal_newlines': True}
_tlocal_cffi.c
Creating library .\Release\_tlocal_cffi.lib and object .\Release\_tlocal_cffi.exp
Generating code
Finished generating code
generating .\_tlocal_cffi.c
the current directory is 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local'
FILENAME: D:\SystemTemp\ffi-695\embedding\test_thread_local\_tlocal_cffi.dll
compiling tlocal-test with ['D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local\\_tlocal_cffi.dll']
tlocal-test.c
Generating code
Finished generating code
running 'tlocal-test' in 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local'
RUNNING: ['D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local\\tlocal-test.exe'] {'cwd': 'D:\\SystemTemp\\ffi-695\\embedding\\test_thread_local', 'stdout': -1, 'universal_newlines': True}
_____________________________ test_basic_comtypes _____________________________
def test_basic_comtypes():
punk = ICreateTypeLib2()
hr = CreateTypeLib2(0, "foobar.tlb", punk)
assert hr == 0
> assert 2 == punk.AddRef()
..\build\extra_tests\ctypes_tests\test_commethods.py:73:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Unbound COM method index 1: AddRef at 22877f2f1d8>
instance = <ICreateTypeLib2 object at 0x228056b40b0>
owner = <class 'extra_tests.ctypes_tests.test_commethods.ICreateTypeLib2'>
def __get__(self, instance, owner):
if instance is None:
return self
> return types.MethodType(self.func, instance, owner)
E TypeError: method.__new__() takes 3 positional arguments but 4 were given
..\build\extra_tests\ctypes_tests\test_commethods.py:32: TypeError
____________________________ test_nonascii_history ____________________________
def test_nonascii_history():
import sys
import os
TESTFN = "{}_{}_tmp".format("@test", os.getpid())
is_editline = readline.__doc__ and "libedit" in readline.__doc__
readline.clear_history()
try:
readline.add_history("entrée 1")
except UnicodeEncodeError as err:
skip("Locale cannot encode test data: " + format(err))
readline.add_history("entrée 2")
readline.replace_history_item(1, "entrée 22")
readline.write_history_file(TESTFN)
readline.clear_history()
readline.read_history_file(TESTFN)
if is_editline:
# An add_history() call seems to be required for get_history_
# item() to register items from the file
readline.add_history("dummy")
> assert readline.get_history_item(1) == "entrée 1"
E AssertionError: assert 'entrée 1\nentrée 22\n' == 'entrée 1'
E - entrée 1
E + entrée 1
E ? +
E + entrée 22
..\build\extra_tests\test_pyrepl\test_readline.py:50: AssertionError
============================== warnings summary ===============================
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:958: 8453 warnings
test_bufferedreader.py: 2 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:958: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
inlocs = ast.Compare(ast.Str(name.id), [ast.In()], [locs])
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:961: 8452 warnings
test_bufferedreader.py: 2 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:961: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
expr = ast.IfExp(test, self.display(name), ast.Str(name.id))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:1071: 4741 warnings
test_bufferedreader.py: 1 warning
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:1071: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
syms.append(ast.Str(sym))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:1073: 4741 warnings
test_bufferedreader.py: 1 warning
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:1073: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
expls.append(ast.Str(expl))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:823: 27122 warnings
test_bufferedreader.py: 4 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:823: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
keys = [ast.Str(key) for key in current.keys()]
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:933: 4814 warnings
test_bufferedreader.py: 1 warning
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:933: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
assertmsg = ast.Str("")
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:935: 4836 warnings
test_bufferedreader.py: 1 warning
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:935: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
template = ast.BinOp(assertmsg, ast.Add(), ast.Str(explanation))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:947: 4829 warnings
test_bufferedreader.py: 1 warning
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:947: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
clear = ast.Assign(variables, ast.NameConstant(None))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:983: 119 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:983: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
expl_format = self.pop_format_context(ast.Str(expl))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:995: 59 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:995: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
expl_template = self.helper("_format_boolop", expl_list, ast.Num(is_or))
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:689: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
and isinstance(item.value, ast.Str)
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\assertion\rewrite.py:691: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
doc = item.value.s
..\build\extra_tests\test_datetime.py:43
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:43: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
datetime.datetime.utcnow(),
test_asyncio.py::test_async_gil_issue
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_asyncio.py:11: DeprecationWarning: There is no current event loop
loop = asyncio.get_event_loop()
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:92: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).microsecond == 999999
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:93: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).second == 0
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:95: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).microsecond == 999999
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:96: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).second == 0
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:98: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).microsecond == 0
test_datetime.py::test_datetime_rounding
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:99: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
assert datetime.datetime.utcfromtimestamp(a).second == 1
test_datetime.py: 17 warnings
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:122: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
dt = datetime.datetime.utcfromtimestamp(t)
test_datetime.py::test_utcfromtimestamp_microsecond
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:151: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
dt = datetime.datetime.utcfromtimestamp(0)
test_datetime.py::test_utcnow_microsecond
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:226: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
dt = datetime.datetime.utcnow()
test_datetime.py::test_future_types_newint
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:273: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
dtu_from_int = datetime.datetime.utcfromtimestamp(1431216000)
test_datetime.py::test_future_types_newint
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\test_datetime.py:274: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(t, datetime.UTC).
dtu_from_newint = datetime.datetime.utcfromtimestamp(newint(1431216000))
cffi_tests/test_c.py::test_callback_return_type
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_callback_return_type.<locals>.cb at 0x0000022803634278>, trying to convert the result back to C:: None
OverflowError: long too big to convert
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/test_c.py::test_callback_returning_wchar_t
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_callback_returning_wchar_t.<locals>.cb at 0x000002287a7f6d68>:: None
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\test_c.py", line 1774, in cb
raise ValueError
ValueError
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi0/test_ffi_backend.py::TestFFI::test_integer_ranges
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\setuptools\_distutils\msvc9compiler.py:33: DeprecationWarning: msvc9compiler is deprecated and slated to be removed in the future. Please discontinue use or file an issue with pypa/distutils describing your use case.
warnings.warn(
cffi_tests/cffi0/test_ffi_backend.py::TestFFI::test_callback_crash
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function BackendTests.test_callback_crash.<locals>.cb at 0x0000022879225d08>:: None
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi0\backend_tests.py", line 859, in cb
raise Exception
Exception
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi0/test_ffi_backend.py::TestFFI::test_callback_decorator
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function BackendTests.test_callback_decorator.<locals>.cb at 0x000002287a78f2e0>, trying to convert the result back to C:: None
OverflowError: integer 2147483657 does not fit 'long'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi0/test_parsing.py::test_missing_newline_bug
D:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\cparser.py:436: UserWarning: #pragma in cdef() are entirely ignored. They should be removed for now, otherwise your code might behave differently in a future version of CFFI if #pragma support gets added. Note that '#pragma pack' needs to be replaced with the 'packed' keyword argument to cdef().
warnings.warn(
cffi_tests/cffi1/test_ffi_obj.py::test_ffi_callback
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_ffi_callback.<locals>.<lambda> at 0x00000228013f6d68>:: None
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi1\test_ffi_obj.py", line 133, in <lambda>
assert ffi.callback("int(int)", lambda x: x + "", error=-66)(10) == -66
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for +: 'int' and 'str'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi1/test_ffi_obj.py::test_ffi_callback_decorator
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_ffi_callback_decorator.<locals>.<lambda> at 0x00000228013f7088>:: None
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi1\test_ffi_obj.py", line 139, in <lambda>
assert deco(lambda x: x + "")(10) == -66
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unsupported operand type(s) for +: 'int' and 'str'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_crash
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function TestNewFFI1.test_callback_crash.<locals>.cb at 0x000002287c3acfc0>:: None
Traceback (most recent call last):
File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py", line 864, in cb
raise Exception
Exception
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi1/test_new_ffi_1.py::TestNewFFI1::test_callback_decorator
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function TestNewFFI1.test_callback_decorator.<locals>.cb at 0x00000228009a4278>, trying to convert the result back to C:: None
OverflowError: integer 2147483657 does not fit 'long'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi1/test_recompiler.py::test_macro_var_callback
d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Lib\site-packages\_pytest\unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored from cffi callback <function test_macro_var_callback.<locals>.get_my_value at 0x000002287da212e0>, trying to convert the result back to C:: None
TypeError: initializer for ctype 'int *' must be a cdata pointer, not str
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
cffi_tests/cffi1/test_verify1.py::test_windows_dllimport_data
D:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib_pypy\cffi\cparser.py:163: UserWarning: Global variable 'my_value' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern')
warnings.warn("Global variable '%s' in cdef(): for consistency "
-- Docs: https://docs.pytest.org/en/stable/warnings.html
- generated xml file: d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\extra.log -
============================ slowest 20 durations =============================
512.72s call cffi_tests/cffi1/test_function_args.py::test_types
82.60s call cffi_tests/cffi0/test_verify.py::test_struct_bad_sized_integer
82.56s call cffi_tests/cffi0/test_vgen.py::test_struct_bad_sized_integer
82.07s call cffi_tests/cffi1/test_verify1.py::test_struct_bad_sized_integer
61.86s call cffi_tests/cffi1/test_verify1.py::test_global_const_int_size
61.69s call cffi_tests/cffi0/test_verify.py::test_global_const_int_size
60.96s call cffi_tests/cffi0/test_vgen.py::test_global_const_int_size
57.09s call cffi_tests/cffi0/test_vgen.py::test_cannot_pass_float
51.89s call cffi_tests/cffi0/test_verify.py::test_cannot_pass_float
51.14s call cffi_tests/cffi1/test_verify1.py::test_cannot_pass_float
49.88s call cffi_tests/cffi0/test_vgen.py::test_struct_bad_sized_float
47.10s call cffi_tests/cffi0/test_verify.py::test_struct_bad_sized_float
46.85s call cffi_tests/cffi0/test_ffi_backend.py::TestBitfield::test_bitfield_reuse_if_enough_space
46.75s call cffi_tests/cffi0/test_ffi_backend.py::TestBitfield::test_bitfield_anonymous_no_align
45.99s call cffi_tests/cffi1/test_verify1.py::test_struct_bad_sized_float
38.86s call cffi_tests/cffi1/test_verify1.py::test_ffi_new_with_cycles
36.37s call cffi_tests/cffi0/test_ffi_backend.py::TestBitfield::test_bitfield_zero
35.22s call cffi_tests/cffi0/test_verify.py::test_ffi_new_with_cycles
31.00s call cffi_tests/cffi0/test_verify.py::test_ffi_full_struct
30.88s call cffi_tests/cffi0/test_vgen.py::test_ffi_new_with_cycles
=========================== short test summary info ===========================
SKIPPED [1] ..\build\extra_tests\test__posixshmem.py:3: could not import '_posixshmem': No module named '_posixshmem_cffi'
SKIPPED [1] ..\build\extra_tests\test_gdbm.py:2: could not import 'dbm.gnu': No module named '_gdbm_cffi'
SKIPPED [1] ..\build\extra_tests\test_grp.py:3: could not import 'grp': No module named '_pwdgrp_cffi'
SKIPPED [1] ..\build\extra_tests\test_syslog.py:2: could not import 'syslog': No syslog on Windows
SKIPPED [1] ..\build\extra_tests\test_vmprof_greenlet.py:4: could not import 'vmprof': No module named 'vmprof'
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_cffi_gen_src_meson.py:30: Test requires meson-python
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_parse_c_type.py:10: not available on pypy
SKIPPED [1] ..\build\extra_tests\test_pyrepl\test_functional.py:14: Skipped
SKIPPED [1] ..\build\extra_tests\test_datetime.py:133: setting os.environ['TZ'] ineffective on windows
SKIPPED [1] ..\build\extra_tests\test_dbm.py:25: Needs adpatation for failure of d[123]
SKIPPED [1] ..\build\extra_tests\test_dbm.py:65: no _dbm available
SKIPPED [1] ..\build\extra_tests\test_dis.py:14: PyPy does not really try to be compatible
SKIPPED [1] ..\build\extra_tests\test_greenlet_thread.py:105: not implemented on PyPy
SKIPPED [1] ..\build\extra_tests\test_greenlet_thread.py:127: not implemented on PyPy
SKIPPED [1] ..\build\extra_tests\test_modules.py:4: works on win32
SKIPPED [1] ..\build\extra_tests\test_os.py:10: Need fork() to test execv()
SKIPPED [1] ..\build\extra_tests\test_os.py:41: Need fork() to test execv()
SKIPPED [1] ..\build\extra_tests\test_os.py:56: Need fork() to test execve()
SKIPPED [1] ..\build\extra_tests\test_os.py:72: Need fork() to test execve()
SKIPPED [1] ..\build\extra_tests\test_posix_extra.py:33: condition: not getattr(os, 'fork', None)
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:19: only works on linux
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:24: only works on linux
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:43: only works on linux
SKIPPED [3] ..\build\extra_tests\test_pypy_remote_debug.py:76: only works on linux
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:115: only works on linux
SKIPPED [3] ..\build\extra_tests\test_pypy_remote_debug.py:213: couldn't find libexpat.so
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:274: only works on linux
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:283: only works on linux
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:296: not implemented
SKIPPED [1] ..\build\extra_tests\test_pypy_remote_debug.py:310: not implemented
SKIPPED [1] ..\build\extra_tests\test_recursion.py:21: fails on py3.10, fills up the logs, and crashes the buildbot summary
SKIPPED [1] ..\build\extra_tests\test_scandir.py:236: no inode support
SKIPPED [1] ..\build\extra_tests\test_semlock.py:8: segfaults on win32
SKIPPED [1] ..\build\extra_tests\test_sqlite3.py:127: could not import 'resource': No module named '_resource_cffi'
SKIPPED [1] ..\build\extra_tests\test_ssl.py:6: needs /dev/null
SKIPPED [2] ..\build\extra_tests\cffi_tests\test_c.py:124: dlopen(None) cannot work on Windows with PyPy or Python 3
SKIPPED [21] ..\build\extra_tests\cffi_tests\test_c.py:33: _testunc() not available
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:1333: untested
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:1346: untested
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:1359: untested
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:1390: PyPy does not report a traceback
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:2626: later
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:3032: testing FILE not implemented
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:3064: testing FILE not implemented
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:3087: testing FILE not implemented
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py: PyPy does not warn
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:3755: testing gcc behavior
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:3833: not for pypy
SKIPPED [1] ..\build\extra_tests\cffi_tests\test_c.py:4474: pypy's bytearray are never locked
SKIPPED [5] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:341: NotImplementedError: wchar_t
SKIPPED [32] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:16: dlopen(None) cannot work on Windows with this runtime
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1183: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1203: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1220: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1239: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1251: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1270: buffer() with ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1293: buffer() with ctypes backend
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1322: later?
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\backend_tests.py:1382: callback with '...'
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:16: ctypes backend: not supported: slice of array
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:20: ctypes backend: not supported: initializers for function pointers
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:24: ctypes backend: not supported: passing a list for a pointer argument
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:28: ctypes backend: not supported: passing a list for a pointer argument
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:32: ctypes backend: not supported: casting to array
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:35: ctypes backend: not supported: nested anonymous struct
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:38: ctypes backend: not supported: nested anonymous struct
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:41: ctypes backend: not supported: nested anonymous union
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:44: ctypes backend: not supported: nested anonymous union
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ctypes.py:48: ctypes backend: not supported in Python 3: CType
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:46: no sinf found in the Windows stdlib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:121: probably no symbol 'stderr' in the lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:139: probably no symbol 'stderr' in the lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:157: probably no symbol 'stderr' in the lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:225: probably no symbol 'stderr' in the lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:287: probably no symbol 'stdout' in the lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:311: no 'inet_ntoa'
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:185: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:199: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:216: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:236: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:256: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:274: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:294: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:335: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:353: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:368: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:392: fix the auto-generation of the tiny test lib
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi0\test_ownlib.py:418: fix the auto-generation of the tiny test lib
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ffi_backend.py:288: condition: (sys.platform == 'darwin' and platform.machine() == 'arm64') or not platform.machine().startswith(('arm', 'aarch64'))
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_ffi_backend.py:320: condition: (sys.platform == 'darwin' and platform.machine() == 'arm64') or not platform.machine().startswith(('arm', 'aarch64'))
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:109: ctypes complains on wrong calling conv
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:258: not supported with the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:341: FILE not supported with the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:380: not supported by the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:390: not supported by the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:426: seems to fail with the ctypes backend on windows
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:451: not with the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:466: not with the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:544: not with the ctypes backend
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi0\test_function.py:562: the ctypes backend doesn't support this
SKIPPED [24] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:93: needs GCC
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:285: not implemented in verify(): complex types
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:405: XXX test or fully prevent char16_t and char32_t from working in ffi.verify() mode
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:444: ignored so far
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:563: XXX fixme: only gives warnings
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:614: requires C99
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:637: requires C99
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1044: XXX fixme: only gives warnings
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1328: nested anonymous struct/union
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1348: nested anonymous struct/union
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1417: needs a GCC extension
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1467: _Bool not in MSVC
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1522: _Bool not in MSVC
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1601: pthread only
SKIPPED [4] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:1638: likely, we cannot assign to stdout
SKIPPED [8] ..\build\extra_tests\cffi_tests\cffi0\test_verify.py:2487: only running the memory-intensive test on Linux
SKIPPED [5] ..\build\extra_tests\cffi_tests\cffi0\test_version.py:9: this is embedded version
SKIPPED [6] ..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py:212: test requires os.fork()
SKIPPED [8] ..\build\extra_tests\cffi_tests\cffi0\test_zintegration.py: 'virtualenv' cannot find the base interpreter of this venv: 'D:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\venv\\pypy-venv\\Scripts\\pypy3.exe' is not named like pypy3.12|pypy3|pypy|python3.12|python3|python. If it is a PyPy source checkout, create a symlink, e.g. 'ln -s pypy3.exe pypy3.12' in D:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\venv\pypy-venv\Scripts
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_cffi_binary.py:9: _cffi_backend module is built-in
SKIPPED [9] ..\build\extra_tests\cffi_tests\cffi1\test_cffi_gen_src.py:76: the cffi-gen-src script is not installed
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_cffi_gen_src.py:199: the cffi-gen-src script is not installed
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi1\test_commontypes.py:12: cannot find ../c/commontypes.c
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py:1057: enums are not unsigned
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py:1257: array of length 0 not supported
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py:1269: later?
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_new_ffi_1.py:1325: callback with '...'
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_re_python.py:125: dlopen(None) cannot work on Windows with Python 3
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_re_python.py:292: uses 'dl' explicitly
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:755: for python 2.x
SKIPPED [1] ..\build\extra_tests\cffi_tests\support.py:55: seems not to work, too bad
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2019: can currently declare a function with an opaque struct as argument, but AFAICT it's impossible to call it later
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2225: needs a GCC extension
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2279: zero-length field not supported by MSVC
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2328: needs a GCC extension
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2364: test for gcc/clang
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_recompiler.py:2382: aaaaaaa why do modern MSVC compilers still define a very old __cplusplus value
SKIPPED [6] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:71: needs GCC
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:422: ignored so far
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:546: XXX fixme: only gives warnings
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:597: requires C99
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:620: requires C99
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1010: XXX fixme: only gives warnings
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1296: nested anonymous struct/union
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1318: nested anonymous struct/union
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1388: needs a GCC extension
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1409: not available
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1439: _Bool not in MSVC
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1494: _Bool not in MSVC
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:1604: likely, we cannot assign to stdout
SKIPPED [1] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:2123: requires sys.setdlopenflags()
SKIPPED [2] ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py:2324: only running the memory-intensive test on Linux
SKIPPED [5] ..\build\extra_tests\cffi_tests\embedding\test_performance.py: written with POSIX functions
SKIPPED [1] ..\build\extra_tests\test_pyrepl\test_basic.py:88: condition: os.name == 'nt'
SKIPPED [1] ..\build\extra_tests\test_pyrepl\test_bugs.py:49: condition: os.name != 'posix' or 'darwin' in sys.platform or 'kfreebsd' in sys.platform
SKIPPED [1] ..\build\extra_tests\test_pyrepl\test_readline.py:8: condition: os.name != 'posix' or 'darwin' in sys.platform or 'freebsd' in sys.platform
XFAIL ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py::test_callback_in_thread
reason: adapt or remove
XFAIL ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py::test_keepalive_lib
reason: adapt or remove
XFAIL ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py::test_keepalive_ffi
reason: adapt or remove
XFAIL ..\build\extra_tests\cffi_tests\cffi1\test_verify1.py::test_bad_global_array_with_dotdotdot_length
reason: was detected only because 23 bytes cannot be divided by 4; redo more generally
XFAIL ..\build\extra_tests\ctypes_tests\test_functions.py::test_warnings
warnings are disabled
XFAIL ..\build\extra_tests\ctypes_tests\test_functions.py::test_errcheck
XFAIL ..\build\extra_tests\ctypes_tests\test_numbers.py::test_no_missing_shape_to_ffi_type
XFAIL ..\build\extra_tests\test_pyrepl\test_bugs.py::test_transpose_at_start
reason: [NOTRUN] event missing
XPASS ..\build\extra_tests\ctypes_tests\test_numbers.py::test_pointer_to_long_double
FAILED ..\build\extra_tests\test_pypy_remote_debug.py::test_integration - Ass...
FAILED ..\build\extra_tests\test_pypy_remote_debug.py::test_disable_remote_debug
FAILED ..\build\extra_tests\test_scandir.py::test_context_manager - assert no...
FAILED ..\build\extra_tests\test_startup.py::test_ctrl_c_causes_atexit - Asse...
FAILED ..\build\extra_tests\test_stringio.py::test_universal - TypeError: uns...
FAILED ..\build\extra_tests\test_sysconfig.py::test_libdirs - AssertionError:...
FAILED ..\build\extra_tests\test_textio.py::test_readline - TypeError: unsupp...
FAILED ..\build\extra_tests\test_venv.py::test_multiprocessing - subprocess.C...
FAILED ..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py::TestDistUtilsCPython::test_compile_module_explicit_filename
FAILED ..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py::TestDistUtilsCPython::test_tag
FAILED ..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py::TestDistUtilsGeneric::test_compile_module_explicit_filename
FAILED ..\build\extra_tests\cffi_tests\cffi0\test_zdistutils.py::TestDistUtilsGeneric::test_tag
FAILED ..\build\extra_tests\cffi_tests\embedding\test_basic.py::TestBasic::test_empty
FAILED ..\build\extra_tests\cffi_tests\embedding\test_thread.py::TestThread::test_first_calls_in_parallel
FAILED ..\build\extra_tests\cffi_tests\embedding\test_thread.py::TestThread::test_init_different_modules_in_different_threads
FAILED ..\build\extra_tests\cffi_tests\embedding\test_thread.py::TestThread::test_alt_issue
FAILED ..\build\extra_tests\cffi_tests\embedding\test_thread.py::TestThread::test_load_in_parallel_more
FAILED ..\build\extra_tests\cffi_tests\embedding\test_tlocal.py::TestThreadLocal::test_thread_local
FAILED ..\build\extra_tests\ctypes_tests\test_commethods.py::test_basic_comtypes
FAILED ..\build\extra_tests\test_pyrepl\test_readline.py::test_nonascii_history
= 20 failed, 2374 passed, 345 skipped, 8 xfailed, 1 xpassed, 68236 warnings in 5010.54s (1:23:30) =
program finished with exit code 1
elapsedTime=5011.688000