Skip to content

dmypy: AssertionError: builtins.int crash for running a second time w/ source changes #14645

Open
@zzzeek

Description

@zzzeek

This issue is very similar to #12744, and I've found two of our checkouts that can reproduce this one with dmypy 1.0.0, steps are below

  1. Python 3.10.0 on this end if it matters, using mypy / dmypy 1.0.0 released on pypi
  2. git clone SQLAlchemy from gerrit and cd into new directory:
git clone https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy
cd sqlalchemy
  1. download the first specific patch:
git fetch https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy refs/changes/32/4432/2 && git checkout FETCH_HEAD
  1. start and run dmypy on lib
dmypy start
dmypy check lib
  1. checkout second specific patch:
git fetch https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy refs/changes/32/4432/3 && git checkout FETCH_HEAD
  1. run dmypy again
dmypy check lib

for me, I get stack trace:

Daemon crashed!
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 229, in serve
  File "mypy/dmypy_server.py", line 274, in run_command
  File "mypy/dmypy_server.py", line 352, in cmd_check
  File "mypy/dmypy_server.py", line 411, in check
  File "mypy/dmypy_server.py", line 596, in fine_grained_increment_follow_imports
  File "mypy/server/update.py", line 267, in update
  File "mypy/server/update.py", line 369, in update_one
  File "mypy/server/update.py", line 452, in update_module
  File "mypy/server/update.py", line 881, in propagate_changes_using_dependencies
  File "mypy/server/update.py", line 1009, in reprocess_nodes
  File "mypy/semanal_main.py", line 137, in semantic_analysis_for_targets
  File "mypy/semanal_main.py", line 220, in process_top_levels
  File "mypy/semanal_main.py", line 348, in semantic_analyze_target
  File "mypy/semanal.py", line 595, in refresh_partial
  File "mypy/semanal.py", line 606, in refresh_top_level
  File "mypy/semanal.py", line 6212, in accept
  File "mypy/errors.py", line 1167, in report_internal_error
  File "mypy/semanal.py", line 6210, in accept
  File "mypy/nodes.py", line 1301, in accept
  File "mypy/semanal.py", line 2702, in visit_assignment_stmt
  File "mypy/semanal.py", line 3441, in check_and_set_up_type_alias
  File "mypy/semanal.py", line 3337, in analyze_alias
  File "mypy/typeanal.py", line 155, in analyze_type_alias
  File "mypy/types.py", line 883, in accept
  File "mypy/typeanal.py", line 253, in visit_unbound_type
  File "mypy/typeanal.py", line 388, in visit_unbound_type_nonoptional
  File "mypy/typeanal.py", line 587, in try_analyze_special_unbound_type
  File "mypy/typeanal.py", line 1327, in analyze_literal_type
  File "mypy/typeanal.py", line 1393, in analyze_literal_param
  File "mypy/typeanal.py", line 1572, in named_type
  File "mypy/typeanal.py", line 250, in lookup_fully_qualified
  File "mypy/semanal.py", line 5525, in lookup_fully_qualified
AssertionError: builtins.int


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions