You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you reporting a bug, or opening a feature request?
bug
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
import mypy.constraints
What is the actual behavior/output?
(mypy) clint@clint-ThinkPad-X1-Carbon-6th:~$ pip install mypy
Collecting mypy
Downloading https://files.pythonhosted.org/packages/fc/4b/b2376fffd1416b76da0708dd8c8ab46c80cd2364c42212059587ae92f1d8/mypy-0.660-py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 11.5MB/s
Collecting mypy-extensions<0.5.0,>=0.4.0 (from mypy)
Using cached https://files.pythonhosted.org/packages/4d/72/8d54e2b296631b9b14961d583e56e90d9d7fba8a240d5ce7f1113cc5e887/mypy_extensions-0.4.1-py2.py3-none-any.whl
Collecting typed-ast<1.3.0,>=1.2.0 (from mypy)
Downloading https://files.pythonhosted.org/packages/52/6c/57ecbb2ecb80274b7f2b7f95d0937de310aa2e66839d7ae9436881525b23/typed_ast-1.2.0-cp36-cp36m-manylinux1_x86_64.whl (724kB)
100% |████████████████████████████████| 727kB 10.9MB/s
Installing collected packages: mypy-extensions, typed-ast, mypy
Successfully installed mypy-0.660 mypy-extensions-0.4.1 typed-ast-1.2.0
(mypy) clint@clint-ThinkPad-X1-Carbon-6th:~$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mypy.constraints
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/clint/v/mypy/lib/python3.6/site-packages/mypy/constraints.py", line 11, in <module>
import mypy.subtypes
File "/home/clint/v/mypy/lib/python3.6/site-packages/mypy/subtypes.py", line 971, in <module>
return_constraint_direction: int = mypy.constraints.SUBTYPE_OF,
AttributeError: module 'mypy' has no attribute 'constraints'
>>>
What is the behavior/output you expect?
imports of public modules should not cause AttributeErrors.
What are the versions of mypy and Python you are using?
mypy 0.660
python 3.6.7
Do you see the same issue after installing mypy from Git master?
No
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mypy.constraints
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/clint/src/misc/mypy/mypy/constraints.py", line 11, in <module>
import mypy.subtypes
File "/home/clint/src/misc/mypy/mypy/subtypes.py", line 971, in <module>
return_constraint_direction: int = mypy.constraints.SUBTYPE_OF,
AttributeError: module 'mypy' has no attribute 'constraints'
>>>
The text was updated successfully, but these errors were encountered:
Note that with git installed, the mypy_django_plugin still fails because of the missing constraints module:
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mypy.checker import TypeChecker
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/clint/src/misc/mypy/mypy/checker.py", line 39, in <module>
import mypy.checkexpr
File "/home/clint/src/misc/mypy/mypy/checkexpr.py", line 45, in <module>
from mypy.infer import infer_type_arguments, infer_function_type_arguments
File "/home/clint/src/misc/mypy/mypy/infer.py", line 5, in <module>
from mypy.constraints import infer_constraints, infer_constraints_for_callable
File "/home/clint/src/misc/mypy/mypy/constraints.py", line 11, in <module>
import mypy.subtypes
File "/home/clint/src/misc/mypy/mypy/subtypes.py", line 971, in <module>
return_constraint_direction: int = mypy.constraints.SUBTYPE_OF,
AttributeError: module 'mypy' has no attribute 'constraints'
bug
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
imports of public modules should not cause AttributeErrors.
mypy 0.660
python 3.6.7
Do you see the same issue after installing mypy from Git master?
No
The text was updated successfully, but these errors were encountered: