Bug Report
mypyc 1.15.0 self-tests fail with CFLAGS -Wall.
To Reproduce
$ export CFLAGS='-Wall'
$ python -m pytest -ra mypyc/test
Expected Behavior
Tests should pass without failures.
Actual Behavior
FAILED mypyc/test/test_run.py::TestRun::run-bools.test::testBoolOps
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64BasicOps
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64ErrorValuesAndUndefined
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64DefaultArgValues
FAILED mypyc/test/test_run.py::TestRun::run-i64.test::testI64GlueMethodsAndInheritance
========== 5 failed, 1182 passed, 1 skipped, 2 xfailed
An example of failure report:
__________________________ testI64GlueMethodsAndInheritance __________________________
[gw3] linux -- Python 3.12.8 /usr/src/RPM/BUILD/python3-module-mypy-1.15.0/.run_venv/bin/python3
data: /usr/src/RPM/BUILD/python3-module-mypy-1.15.0/mypyc/test-data/run-i64.test:1340:
Failed: Invalid output (/usr/src/RPM/BUILD/python3-module-mypy-1.15.0/mypyc/test-data/run-i64.test, line 1340)
-------------------------------- Captured stdout call --------------------------------
*** Exit status: -6
-------------------------------- Captured stderr call --------------------------------
Expected:
Actual:
python3: /usr/include/python3.12/object.h:231: Py_SIZE: Assertion `ob->ob_type != &PyLong_Type' failed. (diff)
Update the test output using --update-data (implies -n0; you can additionally use the -k selector to update only specific tests)
--------------------------------- Captured log call ----------------------------------
INFO root:dist.py:999 running build_ext
INFO root:build_ext.py:535 building 'native' extension
INFO root:dir_util.py:58 creating build/temp.linux-x86_64-cpython-312/build
INFO root:spawn.py:60 x86_64-alt-linux-gcc -Wall -fPIC -I/usr/src/RPM/BUILD/python3-module-mypy-1.15.0/mypyc/lib-rt -I/usr/src/RPM/BUILD/python3-module-mypy-1.15.0/.run_venv/include -I/usr/include/python3.12 -c build/__native.c -o build/temp.linux-x86_64-cpython-312/build/__native.o -O0 -g1 -Werror -Wno-unused-function -Wno-unused-label -Wno-unreachable-code -Wno-unused-variable -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-ignored-optimization-argument -Wno-cpp
INFO root:dir_util.py:58 creating build/lib.linux-x86_64-cpython-312
INFO root:spawn.py:60 x86_64-alt-linux-gcc -shared -Wall build/temp.linux-x86_64-cpython-312/build/__native.o -L/usr/lib64 -o build/lib.linux-x86_64-cpython-312/native.cpython-312.so
INFO root:file_util.py:130 copying build/lib.linux-x86_64-cpython-312/native.cpython-312.so ->
Your Environment
- Mypy version used: 1.15.0
- Python version used: 3.12.8
Bug Report
mypyc1.15.0self-tests fail withCFLAGS-Wall.To Reproduce
Expected Behavior
Tests should pass without failures.
Actual Behavior
An example of failure report:
Your Environment