Skip to content

Cannot import names from six.moves.collections_abc #10381

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

Closed
JukkaL opened this issue Apr 28, 2021 · 0 comments · Fixed by #10382
Closed

Cannot import names from six.moves.collections_abc #10381

JukkaL opened this issue Apr 28, 2021 · 0 comments · Fixed by #10382
Assignees
Labels
bug mypy got something wrong priority-0-high

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 28, 2021

This produces an error with GitHub master and latest types-six:

# Module "six.moves.collections_abc" has no attribute "Sequence"
from six.moves.collections_abc import Sequence

The problem is with how we handle this line in stdlib/collections/abc.pyi:

from _collections_abc import __all__ as __all__

We should propagate the value of __all__ (not just existence), but it doesn't happen right now.

@JukkaL JukkaL added bug mypy got something wrong priority-0-high labels Apr 28, 2021
@JukkaL JukkaL self-assigned this Apr 28, 2021
JukkaL added a commit that referenced this issue Apr 28, 2021
Propagate the value of `__all__` from the imported module.

Fixes #10381.
JukkaL added a commit that referenced this issue Apr 28, 2021
Propagate the value of `__all__` from the imported module.

Fixes #10381.
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

Successfully merging a pull request may close this issue.

1 participant