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

dmypy crashes since version 1.11.0 / "normal" mypy runs without problems #17574

Closed
tzmara opened this issue Jul 24, 2024 · 1 comment · Fixed by #17588
Closed

dmypy crashes since version 1.11.0 / "normal" mypy runs without problems #17574

tzmara opened this issue Jul 24, 2024 · 1 comment · Fixed by #17588

Comments

@tzmara
Copy link

tzmara commented Jul 24, 2024

Crash Report

Running dmypy crashes since version 1.11.0.
"normal" mypy is running without problems

Traceback

❯ .venv/bin/dmypy run src
Daemon started
/MYPATH/.venv/lib/python3.12/site-packages/stripe/tax/_registration.py: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.11.0
Daemon crashed!
Traceback (most recent call last):
  File "mypy/dmypy_server.py", line 236, in serve
  File "mypy/dmypy_server.py", line 285, in run_command
  File "mypy/dmypy_server.py", line 353, in cmd_run
  File "mypy/dmypy_server.py", line 427, in check
  File "mypy/dmypy_server.py", line 466, in initialize_fine_grained
  File "mypy/build.py", line 193, in build
  File "mypy/build.py", line 268, in _build
  File "mypy/build.py", line 2950, in dispatch
  File "mypy/build.py", line 3348, in process_graph
  File "mypy/build.py", line 3453, in process_stale_scc
  File "mypy/build.py", line 2409, in finish_passes
  File "mypy/build.py", line 2467, in update_fine_grained_deps
  File "mypy/build.py", line 2455, in compute_fine_grained_deps
  File "mypy/server/deps.py", line 187, in get_dependencies
  File "mypy/nodes.py", line 372, in accept
  File "mypy/server/deps.py", line 250, in visit_mypy_file
  File "mypy/traverser.py", line 116, in visit_mypy_file
  File "mypy/nodes.py", line 1183, in accept
  File "mypy/server/deps.py", line 310, in visit_class_def
  File "mypy/traverser.py", line 152, in visit_class_def
  File "mypy/nodes.py", line 1264, in accept
  File "mypy/server/deps.py", line 429, in visit_block
  File "mypy/traverser.py", line 120, in visit_block
  File "mypy/nodes.py", line 1183, in accept
  File "mypy/server/deps.py", line 310, in visit_class_def
  File "mypy/traverser.py", line 152, in visit_class_def
  File "mypy/nodes.py", line 1264, in accept
  File "mypy/server/deps.py", line 429, in visit_block
  File "mypy/traverser.py", line 120, in visit_block
  File "mypy/nodes.py", line 1351, in accept
  File "mypy/server/deps.py", line 490, in visit_assignment_stmt
  File "mypy/server/deps.py", line 887, in add_type_dependencies
  File "mypy/server/deps.py", line 940, in get_type_triggers
  File "mypy/server/deps.py", line 947, in get_type_triggers
  File "mypy/types.py", line 2706, in accept
AssertionError

To Reproduce

  • Have source which uses stripe
  • Run dmypy on this

Your Environment

  • Mypy version used: 1.11.0
  • Mypy command-line flags: -
  • Mypy configuration options from mypy.ini (and other config files):
[tool.mypy]
python_version = 3.12
plugins = ["pydantic.mypy"]
exclude = ["notebooks", "seeds"]
disallow_untyped_defs = true
check_untyped_defs = true
ignore_missing_imports = true
  • Python version used: 3.12.2
  • Operating system and version: linux 6.10.0-arch1-2
  • stripe==10.3.0 (the file dmypy fails on)
hauntsaninja pushed a commit that referenced this issue Jul 27, 2024
)

Commit 1072c78 (#17148) converted all
quoted types into `RawExpressionType`, which raised an `AssertionError`
when `accept`ing a `TypeTriggersVisitor`.

- Fixes #17574.
- Fixes #17587.

Signed-off-by: Anders Kaseorg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants