We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report
mypy crashes with a Segmentation Fault when a Protocol with def __call__(self: Self) is used.
Protocol
def __call__(self: Self)
To Reproduce
Like already reported in #17314 and #16629, the following code demonstrates the issue:
from typing import Protocol, Self class Printer(Protocol): def __call__(self: Self): ... class Version: def __init__(self, printer: Printer): ... Version(printer=print)
https://gist.github.com/mypy-play/cd3e93a1930402369f81735d13427eae
Expected Behavior
mypy should maybe print out some errors, but definitely not cause a Segmentation Fault.
Actual Behavior
segmentation fault (core dumped) mypy segfault-mypy.py --show-traceback
Your Environment
--show-traceback
mypy.ini
The text was updated successfully, but these errors were encountered:
I cannot reproduce locally with non-compiled build on main:
main
» mypy ex.py --show-traceback --show-error-codes --warn-unreachable --python-version=3.13 Success: no issues found in 1 source file
Looks like this is a mypyc issue. Or it was fixed on main 🤔
mypyc
Sorry, something went wrong.
No branches or pull requests
Bug Report
mypy crashes with a Segmentation Fault when a
Protocol
withdef __call__(self: Self)
is used.To Reproduce
Like already reported in #17314 and #16629, the following code demonstrates the issue:
https://gist.github.com/mypy-play/cd3e93a1930402369f81735d13427eae
Expected Behavior
mypy should maybe print out some errors, but definitely not cause a Segmentation Fault.
Actual Behavior
Your Environment
--show-traceback
mypy.ini
(and other config files): -The text was updated successfully, but these errors were encountered: