Skip to content
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

dry-python/returns crashes with mypy@1.6.0 #16248

Closed
sobolevn opened this issue Oct 11, 2023 · 0 comments · Fixed by #16251
Closed

dry-python/returns crashes with mypy@1.6.0 #16248

sobolevn opened this issue Oct 11, 2023 · 0 comments · Fixed by #16251
Labels

Comments

@sobolevn
Copy link
Member

I have a very complex typed project, called returns. Update to mypy@1.6.0 crashes: https://github.com/dry-python/returns/actions/runs/6483844863/job/17606337545?pr=1701

 /home/runner/work/_temp/a6c62935-0006-475e-ae0a-586ff0ab0548.sh: line 5:  2104 Segmentation fault      (core dumped) poetry run mypy --enable-error-code=unused-awaitable returns

There are a lot of things going on the repo: plugins, HKTs, complex generics, etc, etc

So, I would need to find a minimal reproducer.
Not sure if this is related to #16245 or not

@sobolevn sobolevn added the crash label Oct 11, 2023
ilevkivskyi added a commit that referenced this issue Oct 12, 2023
Fixes #16245
Fixes #16248

Unfortunately I was a bit reckless with parentheses, but in my defense
`unify_generic_callable()` is kind of broken for long time, as it can
return "solutions" like ```{1: T`1}```. We need a more principled
approach there (IIRC there is already an issue about this in the scope
of `--new-type-inference`).

(The fix is quite trivial so I am not going to wait for review too long
to save time, unless there will be some issues in `mypy_primer` etc.)
hauntsaninja pushed a commit that referenced this issue Oct 17, 2023
Fixes #16245
Fixes #16248

Unfortunately I was a bit reckless with parentheses, but in my defense
`unify_generic_callable()` is kind of broken for long time, as it can
return "solutions" like ```{1: T`1}```. We need a more principled
approach there (IIRC there is already an issue about this in the scope
of `--new-type-inference`).

(The fix is quite trivial so I am not going to wait for review too long
to save time, unless there will be some issues in `mypy_primer` etc.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant