-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
"cannot import name 'parse_bool'" after updating somes packages #1784
Comments
Not having any ideas really, I'm still seeing a Ref: https://github.com/python/mypy/blob/v1.6.1/mypy/semanal_shared.py#L469-L475 |
Might be some quirk related to the way mypy is compiled with Mypyc
If we don't understand this, may make sense to report a mypyc issue: https://github.com/mypyc/mypyc/issues |
Yeah, that could probably be a reason. Would probably be worth to take it for a spin upstream, see what they say. |
Created upstream issue: |
I am trying to resolve it on my side playing with versions. But thanks for the quick reaction! |
My sincerest apologies, I have 2 different pre-commit configurations (one local and one for the CI). And I got confused about this setup. The one that was problematic was this one `
Once I updated mypy to 1.6.1 the error went away. |
Doh! Yep, the old mypy version explains it. Unfortunately the reversion #1792 already got merged. 😅 But we should consider special logic in the plugin to detect old mypy versions and issue a warning, to make detecting such issues easier. |
Bug report
I use this version of mypy
rev: v1.6.1
What's wrong
mypy.....................................................................Failed
setup.cfg:34: error: Error importing plugin "mypy_django_plugin.main": cannot import name 'parse_bool' from 'mypy.semanal_shared' (/home/runner/.cache/pre-commit/repo712jqpu7/py_env-python3/lib/python3.11/site-packages/mypy/semanal_shared.cpython-311-x86_64-linux-gnu.so) [misc]
Found 1 error in 1 file (errors prevented further checking)
System information
python
version: 3.11django
version: 4.2.5mypy
version: 1.6.1django-stubs
version: 4.2.4django-stubs-ext
version: 3.2.3The text was updated successfully, but these errors were encountered: