Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maximum semantic analysis iteration count reached with importing two dataclasses modules #10892

Open
NiklasRosenstein opened this issue Jul 29, 2021 · 0 comments
Labels
crash semantic-analyzer Problems that happen during semantic analysis topic-dataclasses

Comments

@NiklasRosenstein
Copy link

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

  1. Clone https://github.com/NiklasRosenstein/databind.git and check out 74c5c6e
  2. Change directory into databind.core
  3. Install mypy pytest types-setuptools
  4. Run mypy src and not how there are no errors
  5. Open src/databind/core/dataclasses_test.py and insert import dataclasses at the top of the file
  6. Run mypy src again (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
@AlexWaygood AlexWaygood added topic-dataclasses semantic-analyzer Problems that happen during semantic analysis labels Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash semantic-analyzer Problems that happen during semantic analysis topic-dataclasses
Projects
None yet
Development

No branches or pull requests

2 participants