maximum semantic analysis iteration count reached with importing two dataclasses modules
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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
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 from commit 74c5c6e in databind by adding import dataclasses to src/databind/core/dataclasses_test.py, then run mypy src with mypy 0.910. Compare the successful run before the import with the maximum semantic analysis iteration error afterward; done means importing both modules no longer produces the internal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100