no such package '@mypy_integration_pip_deps//pypi__typed_ast' when using mypy_version >= 0.900
Closed this issue · 3 comments
Hi, just reporting this as FYI. It's not really causing me any trouble, I'm happy on mypy version 0.812, just thought I'd start a thread in case this is impacting others.
If I change my mypy_version.txt
file to contain:
mypy==0.900
Then I get this error when I try to build a mypy_test
ERROR: /private/var/tmp/_bazel_mark/c85e0696457b3a2f404f0721275052b4/external/mypy_integration/mypy/BUILD:3:10: no such package '@mypy_integration_pip_deps//pypi__typed_ast': BUILD file not found in directory 'pypi__typed_ast' of external repository @mypy_integration_pip_deps. Add a BUILD file to a directory to mark it as a package. and referenced by '@mypy_integration//mypy:mypy'
I wonder if this is something to do with the release notes of mypy 0.900: http://mypy-lang.org/news.html
The next mypy release will no longer bundle stubs for third-party libraries. Read this blog post if you are interested in what this means to mypy users and why we are doing this.
Just remove these lines: https://github.com/thundergolfer/bazel-mypy-integration/blob/061dd0b869f8f1d9ba28a5bd43bcf077f0cc19bc/mypy/BUILD#L11-L14
They aren't needed, since transitive dependencies are automatically brought in when you depend on requirement("mypy")
.
The reason this results in an error is because mypy
no longer depends on typed_ast
in Python >= 3.9. So the pip_install
here does not download it. That's what the error message you're getting is trying to tell you.