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

no such package '@mypy_integration_pip_deps//pypi__typed_ast' when using mypy_version >= 0.900 #41

Closed
mhansen opened this issue Aug 1, 2021 · 3 comments

Comments

@mhansen
Copy link
Contributor

mhansen commented Aug 1, 2021

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.

@ender-wieczorek
Copy link

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.

@mhansen
Copy link
Contributor Author

mhansen commented Oct 19, 2021 via email

@robbrit
Copy link
Contributor

robbrit commented Dec 9, 2021

Here you go: #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants