dmypy: AssertionError: builtins.int crash for running a second time w/ source changes
Open
Nobody has claimed this yet.
crash
topic-daemon
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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
- Python 3.10.0 on this end if it matters, using mypy / dmypy 1.0.0 released on pypi
- git clone SQLAlchemy from gerrit and cd into new directory:
git clone https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy
cd sqlalchemy
- download the first specific patch:
git fetch https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy refs/changes/32/4432/2 && git checkout FETCH_HEAD
- start and run dmypy on lib
dmypy start
dmypy check lib
- checkout second specific patch:
git fetch https://gerrit.sqlalchemy.org/sqlalchemy/sqlalchemy refs/changes/32/4432/3 && git checkout FETCH_HEAD
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the listed dmypy start/check sequence, then begin with mypy/dmypy_server.py and follow the traceback through mypy/server/update.py, mypy/semanal.py, and mypy/typeanal.py. Done means the second dmypy check after the source checkout change completes without the AssertionError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100