dmypy: AssertionError: builtins.int crash for running a second time w/ source changes
Offen
Dieses Issue hat noch niemand übernommen.
crash
topic-daemon
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere den Fehler mit der aufgelisteten dmypy start/check-Sequenz und beginne dann mit mypy/dmypy_server.py. Folge dem Traceback durch mypy/server/update.py, mypy/semanal.py und mypy/typeanal.py. Erledigt ist die Aufgabe, wenn der zweite dmypy check nach der Änderung am Source-Checkout ohne den AssertionError abgeschlossen wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100