Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921901 - [guru] dev-python/pytest-mypy-plugins-3.0.0 fails tests (GCC-14-SYSTEM): builtins.pyi:156: error: Overloaded function signature 2 will never be matched: signature 1s parameter type(s) are the same or broader [misc] (diff)
Summary: [guru] dev-python/pytest-mypy-plugins-3.0.0 fails tests (GCC-14-SYSTEM): buil...
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lucio Sauer
URL: https://github.com/typeddjango/pytest...
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-01-12 08:15 UTC by Agostino Sarubbo
Modified: 2024-02-25 02:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,113.07 KB, text/plain)
2024-01-12 08:15 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-01-12 08:15:55 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/pytest-mypy-plugins-3.0.0 fails tests (GCC-14-SYSTEM).
Discovered on: amd64 (internal ref: guru_tinderbox)

NOTE:
(GCC-14-SYSTEM) in the summary means that the bug was found on a machine that runs gcc-14 but this bug MAY or MAY NOT BE related to the new compiler
Comment 1 Agostino Sarubbo gentoo-dev 2024-01-12 08:15:58 UTC
Created attachment 882055 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-01-12 08:15:59 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


 b'pytest_mypy_plugins.utils.TypecheckAssertionError: Output is not expecte'
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-ini-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/mypy1.ini', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-ini-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/mypy2.ini', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-ini-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/setup1.cfg', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-ini-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/setup2.cfg', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-pyproject-toml-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/pyproject1.toml', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E               subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--mypy-pyproject-toml-file', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/pyproject2.toml', '/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test-mypy-config.yml']' returned non-zero exit status 1.
E   pytest_mypy_plugins.utils.TypecheckAssertionError: Output is not expected: 
FAILED pytest_mypy_plugins/tests/test-mypy-config.yml::custom_mypy_config_strict_optional_true_set - 
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_ini_files[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/mypy1.ini] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_ini_files[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/mypy2.ini] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_ini_files[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/setup1.cfg] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_ini_files[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/setup2.cfg] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_pyproject_toml[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/pyproject1.toml] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
FAILED pytest_mypy_plugins/tests/test_explicit_configs.py::test_pyproject_toml[/var/tmp/portage/dev-python/pytest-mypy-plugins-3.0.0/work/pytest-mypy-plugins-3.0.0/pytest_mypy_plugins/tests/test_configs/pyproject2.toml] - subprocess.CalledProcessError: Command '['python3.11', '-m', 'pytest', '--m...
E     ../../../../../../../usr/lib/python3.11/site-packages/mypy/typeshed/stdlib/builtins.pyi:156: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc] (diff)
Comment 3 Lucio Sauer 2024-01-15 14:24:28 UTC
This seems to be a regression in dev-python/mypy 1.5.1 -> 1.6.0 and ongoing:
$ cat file.py
from typing import Optional
a: Optional[int] = None
a + 1  # should not raise an error
$ mypy --no-silence-site-packages --no-strict-optional file.py
/usr/lib/python3.12/site-packages/mypy/typeshed/stdlib/builtins.pyi:154: error: Overloaded function signature 2 will never be matched: signature 1's parameter type(s) are the same or broader  [misc]

https://github.com/typeddjango/pytest-mypy-plugins/pull/135/files#r1382525296
Comment 4 Lucio Sauer 2024-02-25 01:27:13 UTC
Upstream indicates that this test should be reworked in thread https://github.com/typeddjango/pytest-mypy-plugins/pull/135#discussion_r1382473671 due to the usage of the discouraged and not much tested `--no-strict-optional` parameter for mypy.

A fix and a workaround are available at the URL linked in the bug header.
Comment 5 Larry the Git Cow gentoo-dev 2024-02-25 02:27:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e3c29d283259fc96a539b6884da2050d583ca9fa

commit e3c29d283259fc96a539b6884da2050d583ca9fa
Author:     Lucio Sauer <watermanpaint@posteo.net>
AuthorDate: 2024-02-25 01:12:23 +0000
Commit:     Lucio Sauer <watermanpaint@posteo.net>
CommitDate: 2024-02-25 01:19:25 +0000

    dev-python/pytest-mypy-plugins: workaround mypy-related test failure
    
    Fix upstreamed: https://github.com/typeddjango/pytest-mypy-plugins/issues/137
    
    Closes: https://bugs.gentoo.org/921901
    Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>

 .../pytest-mypy-plugins-2.0.0.ebuild                 |  7 ++++++-
 .../pytest-mypy-plugins-3.0.0.ebuild                 | 20 +++++++++++++++-----
 2 files changed, 21 insertions(+), 6 deletions(-)