-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
INTERNAL ERROR running against a Trio PR #9967
New issue
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
Labels
Comments
I think this is similar to the problem in #8356 (as described in #8356 (comment)). I'd guess that the problem is that the error with the |
Simplified example: from typing import Any, Callable, Union, overload, TypeVar
_Fn = TypeVar("_fn", bound=Callable[..., Any])
def _public(fn: _Fn) -> _Fn:
return fn
@overload
def func(a: int) -> int:
...
@overload
def func(a: str) -> str:
...
@_public
def func(a: Union[int, str]) -> Union[int, str]:
pass Running with
|
hauntsaninja
added a commit
that referenced
this issue
Nov 28, 2021
Fixes #8356, as identified by @pranavrajpal Fixes #9112 Fixes #9967 Note that we still don't fully support the singledispatch pattern in #8356, since we get 'overloaded function has no attribute "register"', but that's much easier to work around than a crash. Co-authored-by: hauntsaninja <>
ilevkivskyi
pushed a commit
that referenced
this issue
Dec 3, 2021
Fixes #8356, as identified by @pranavrajpal Fixes #9112 Fixes #9967 Note that we still don't fully support the singledispatch pattern in #8356, since we get 'overloaded function has no attribute "register"', but that's much easier to work around than a crash. Co-authored-by: hauntsaninja <>
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
Fixes python#8356, as identified by @pranavrajpal Fixes python#9112 Fixes python#9967 Note that we still don't fully support the singledispatch pattern in python#8356, since we get 'overloaded function has no attribute "register"', but that's much easier to work around than a crash. Co-authored-by: hauntsaninja <>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crash Report
I apologize but I don't know which change I made that triggered this. I was quickly reworking to
_Fn = TypeVar("_Fn", bound=Callable[..., Any])
a few places from_F
and_C
and maybe more before and during that and then the crash and then kids and lunch and...:[
Edit: Here is a patch that makes the internal error go away.
Traceback
Full session
$ cd trio
$ python3.9 -m venv venv
To Reproduce
git clone https://github.com/altendky/trio cd trio git checkout 484f13f124f614cde356b50dbbf53f29731dcfc0 python3.9 -m venv venv venv/bin/python --version --version venv/bin/python -m pip install --upgrade pip setuptools wheel venv/bin/python -m pip install --requirement test-requirements.txt venv/bin/pip freeze --all venv/bin/mypy -p trio --show-error-codes --platform linux --show-traceback
Your Environment
git+https://github.com/python/mypy@37d29fcb30dce646573b487f2c9375cee457724c
-p trio --show-error-codes --platform linux --show-traceback
mypy.ini
(and other config files):The text was updated successfully, but these errors were encountered: