Shoobx / mypy-zope

Plugin for mypy to support zope.interface
MIT License
38 stars 11 forks source link

Error importing plugin "mypy_zope": cannot import name 'SemanticAnalyzerPass2' from 'mypy.semanal' #69

Open pkoch opened 2 years ago

pkoch commented 2 years ago

Tried to update to mypy 0.942, but I started seeing this:

mypy.ini:4: error: Error importing plugin "mypy_zope": cannot import name 'SemanticAnalyzerPass2' from 'mypy.semanal' (/home/runner/.cache/pre-commit/repo_fawoait/py_env-python3.8/lib/python3.8/site-packages/mypy/semanal.cpython-38-x86_64-linux-gnu.so)  [misc]

I do see a green build on https://github.com/Shoobx/mypy-zope/pull/68, which is a bit curious.

Is there any more info I can provide to help debug this? My current workaround it to keep mypy at 0.941.

tristanlatr commented 1 year ago

I'm having the same error with mypy 0.982, it does seem to work with mypy 0.981 though.

cyrillkuettel commented 4 months ago

After hours of searching, this fixed it for me (I still have no idea why)

pip install --upgrade mypy && pip install --upgrade --force-reinstall mypy_zope

Currently I'm using these versions mypy_zope==1.0.4 mypy==1.9.0