Package: src:pytest-mypy-plugins
Version: 4.0.3-4
User: [email protected]
Usertags: python3.15
Tags: ftbfs, forky, sid
Severity: important
Hi!
While rebuilding the python related packages against the Python 3.15rc2
version we found that pytest-mypy-plugins fails to build from source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4855925/
In the log, we can see that the calls to subprocess fail, but because
the output of the call is sent to /dev/null, we don't know what caused
the failure. However, given that this seems to be looking at error
messages, it's likely that the new Python 3.15 error messages don't
match the expected ones.
=================================== FAILURES
===================================
______________________ test_no_silence_site_packages_only
______________________
tmp_path =
PosixPath('/tmp/pytest-of-sbuild/pytest-0/test_no_silence_site_packages_0')
def test_no_silence_site_packages_only(tmp_path: Path) -> None:
make_yaml_test_file(
tmp_path,
"""
- case: test_non_test_case_files_cache_files_remain
mypy_config: |
strict=true
main: |
import subpkg
a: str
a / 2
files:
- path: subpkg.py
content: |
a: str
a / 2
out: |
{site_packages_path}/mypy/typeshed/stdlib/types.pyi:722: error:
Class cannot subclass "Any" (has type "Any") [misc]
main:4: error: Unsupported operand types for / ("str" and "int")
[operator]
subpkg:2: error: Unsupported operand types for / ("str" and
"int") [operator]
""",
)
res = subprocess.run(
[
sys.executable,
"-m",
"pytest",
f"--mypy-testing-base={tmp_path}",
"--mypy-no-silence-site-packages",
],
cwd=tmp_path,
stdout=subprocess.DEVNULL,
stderr=subprocess.STDOUT,
)
assert res.returncode == pytest.ExitCode.OK
E AssertionError: assert 1 == <ExitCode.OK: 0>
E + where 1 = CompletedProcess(args=['/usr/bin/python3.15',
'-m', 'pytest',
'--mypy-testing-base=/tmp/pytest-of-sbuild/pytest-0/test_no_silence_site_packages_0',
'--mypy-no-silence-site-packages'], returncode=1).returncode
E + and <ExitCode.OK: 0> = <enum 'ExitCode'>.OK
E + where <enum 'ExitCode'> = pytest.ExitCode
pytest_mypy_plugins/tests/test_site_packages.py:117: AssertionError
_____________ test_no_silence_site_packages_and_modify_pythonpath
______________
tmp_path =
PosixPath('/tmp/pytest-of-sbuild/pytest-0/test_no_silence_site_packages_1')
def test_no_silence_site_packages_and_modify_pythonpath(tmp_path:
Path) -> None:
make_yaml_test_file(
tmp_path,
"""
- case: test_non_test_case_files_cache_files_remain
mypy_config: |
strict=true
main: |
import subpkg
a: str
a / 2
files:
- path: subpkg.py
content: |
a: str
a / 2
out: |
{site_packages_path}/mypy/typeshed/stdlib/types.pyi:722: error:
Class cannot subclass "Any" (has type "Any") [misc]
main:4: error: Unsupported operand types for / ("str" and "int")
[operator]
subpkg:2: error: Unsupported operand types for / ("str" and
"int") [operator]
""",
)
res = subprocess.run(
[
sys.executable,
"-m",
"pytest",
f"--mypy-testing-base={tmp_path}",
"--mypy-no-silence-site-packages",
"--mypy-modify-pythonpath",
],
cwd=tmp_path,
stdout=subprocess.DEVNULL,
stderr=subprocess.STDOUT,
)
assert res.returncode == pytest.ExitCode.OK
E AssertionError: assert 1 == <ExitCode.OK: 0>
E + where 1 = CompletedProcess(args=['/usr/bin/python3.15',
'-m', 'pytest',
'--mypy-testing-base=/tmp/pytest-of-sbuild/pytest-0/test_no_silence_site_packages_1',
'--mypy-no-silence-site-packages', '--mypy-modify-pythonpath'],
returncode=1).returncode
E + and <ExitCode.OK: 0> = <enum 'ExitCode'>.OK
E + where <enum 'ExitCode'> = pytest.ExitCode
pytest_mypy_plugins/tests/test_site_packages.py:156: AssertionError
Setting the severity to important for now. Once Python 3.15 is released
and later added to python3-defaults, this bug will become release
critical.
--
Regards,
Marga