python / python/mypy

AssertionError in make_module_translation_map

Aperta
#17,072 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

crash topic-mypyc
Lingua principale
Python
Stelle
20.6k
Fork
3.3k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Crash Report

mypyc asserted on specific directory.

Traceback

mypyc subtasks --show-traceback
Traceback (most recent call last):
  File "/tmp/ttrt/build/setup.py", line 5, in <module>
    ext_modules=mypycify(['subtasks', '--show-traceback'], opt_level="3", debug_level="1"),
  File "mypyc/build.py", line 525, in mypycify
  File "mypyc/build.py", line 435, in mypyc_build
  File "mypyc/build.py", line 243, in generate_c
  File "mypyc/codegen/emitmodule.py", line 425, in compile_modules_to_c
  File "mypyc/codegen/emitmodule.py", line 292, in compile_ir_to_c
  File "mypyc/namegen.py", line 50, in __init__
  File "mypyc/namegen.py", line 106, in make_module_translation_map
AssertionError: ['subtasks', 'subtasks.subtasks']

To Reproduce

cd /tmp/
mkdir ttrt
mkdir subtasks
touch subtasks/subtasks.py
mypyc subtasks  # this works

touch subtasks/__init__.py
mypyc subtasks --show-traceback  # this fails

Your Environment

mypyc -V
mypy 1.9.0 (compiled: yes)

python -V
Python 3.9.18
python is in venv

Linux Mint 21.1 Vera

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Reproduce the failure with the directory layout and commands in the issue, then inspect mypyc/namegen.py around make_module_translation_map and the callers in mypyc/codegen/emitmodule.py. Confirm the fix by rerunning mypyc subtasks --show-traceback with subtasks/init.py present and checking that the assertion no longer occurs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
compilers
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.