Skip to content

mypy 0.930 breaks the sqlmypy plugin with an INTERNAL ERROR #232

Closed
@plankthom

Description

@plankthom

Upgrading to mypy 0.930 triggered the following INTERNAL ERROR issue:

% mypy --config-file pkg/tsa-repo-db-client/setup.cfg -p tsa.repo.db --show-traceback
***/pkg/tsa-repo-db-client/tsa/repo/db/model.py:11: error: INTERNAL ERROR -- Please try using mypy master on Github:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.930
Traceback (most recent call last):
  File "mypy/semanal.py", line 5132, in accept
  File "mypy/nodes.py", line 1140, in accept
  File "mypy/semanal.py", line 2110, in visit_assignment_stmt
  File "mypy/semanal.py", line 2392, in apply_dynamic_class_hook
  File "***/miniconda3/envs/tsa37/lib/python3.7/site-packages/sqlmypy.py", line 203, in decl_info_hook
    obj = ctx.api.builtin_type('builtins.object')
AttributeError: 'SemanticAnalyzer' object has no attribute 'builtin_type'
***/pkg/tsa-repo-db-client/tsa/repo/db/model.py:11: : note: use --pdb to drop into pdb

Considering the announcement in python/mypy#6617 , I assume this should be solved here ...

Workaround: keep mypy pinned on version 0.921

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions