maximum semantic analysis iteration count reached with importing two dataclasses modules
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
Crash Report
Deferral trace:
databind.core.dataclasses_test:35
databind.core.dataclasses_test:35
[...]
databind.core.dataclasses_test:35
databind.core.dataclasses_test:35
src/databind/core/dataclasses_test.py: error: INTERNAL ERROR: maximum semantic analysis iteration count reached
Found 1 error in 1 file (errors prevented further checking)
My project has a databind.core.dataclasses module which is supposed to be used as a drop-in replacement for dataclasses. In the unittests dataclasses_test, I import both of these modules but doing that crashes Mypy.
I haven't been able to come up with a smaller scenario to reproduce the issue.
Traceback
--show-traceback does not give any additional information other than what is shown above.
To Reproduce
- Clone https://github.com/NiklasRosenstein/databind.git and check out
74c5c6e - Change directory into
databind.core - Install
mypy pytest types-setuptools - Run
mypy srcand not how there are no errors - Open
src/databind/core/dataclasses_test.pyand insertimport dataclassesat the top of the file - Run
mypy srcagain (you will see the error)
Your Environment
- Mypy version used: 0.910
- Mypy command-line flags: n/a
- Mypy configuration options from
mypy.ini(and other config files): n/a - Python version used: 3.9.6
- Operating system and version: osx
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il malfunzionamento del commit 74c5c6e in databind aggiungendo import dataclasses a src/databind/core/dataclasses_test.py, quindi esegui mypy src con mypy 0.910. Confronta l’esecuzione riuscita prima dell’import con l’errore maximum semantic analysis iteration successivo; il lavoro è completo quando l’importazione di entrambi i moduli non produce più l’errore interno.
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
- Abbastanza chiara
- Idoneità per principianti
- 35/100