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 file or directory for C module #5784

Closed
bryanforbes opened this issue Oct 12, 2018 · 1 comment
Closed

No such file or directory for C module #5784

bryanforbes opened this issue Oct 12, 2018 · 1 comment
Assignees
Labels
bug mypy got something wrong priority-0-high

Comments

@bryanforbes
Copy link
Contributor

bryanforbes commented Oct 12, 2018

Starting with the following using mypy version 0.640:

$ python3 -m venv .venv
$ .venv/bin/pip install -U aiohttp mypy
$ echo "import aiohttp" > test.py

Running .venv/bin/mypy test.py leads to an error:

mypy: can't read file '/Users/bryan/Projects/mypy-repro/.venv/lib/python3.7/site-packages/aiohttp/_websocket': No such file or directory

This module is a C module that is imported like this:

if NO_EXTENSIONS:
    _websocket_mask = _websocket_mask_python
else:
    try:
        from ._websocket import _websocket_mask_cython  # type: ignore
        _websocket_mask = _websocket_mask_cython
    except ImportError:  # pragma: no cover
        _websocket_mask = _websocket_mask_python
@gvanrossum gvanrossum self-assigned this Oct 12, 2018
@gvanrossum
Copy link
Member

Yeah, I can repro this too. And it's a regression from 0.630. :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong priority-0-high
Projects
None yet
Development

No branches or pull requests

2 participants