mypy-zope icon indicating copy to clipboard operation
mypy-zope copied to clipboard

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

Open pkoch opened this issue 3 years ago • 2 comments

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.

pkoch avatar Mar 31 '22 20:03 pkoch

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

tristanlatr avatar Dec 02 '22 02:12 tristanlatr

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

cyrillkuettel avatar May 02 '24 15:05 cyrillkuettel