Skip to content

crash when running mypy@master on scipy-stubs: NotImplementedError #19861

@jorenham

Description

@jorenham

The recent mypy_primer diffs (e.g. #19859 (comment)) also show that there's a crash. Here's the full stacktrace when I run uv run --no-editable mypy . on scipy-stubs@13e0208 (latest commit on master atm) with the following appended to the pyproject.toml:

[tool.uv.sources.mypy]
git = "https://github.com/python/mypy.git"
rev = "dce8e1c407ccaa9effebbb1ed09fbf0e7070636d"

Run uv run --no-editable mypy . and behold:

Traceback (most recent call last):
  File "/home/joren/Workspace/scipy-stubs/.venv/bin/mypy", line 10, in <module>
    sys.exit(console_entry())
             ~~~~~~~~~~~~~^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
    ~~~~^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
    res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
                              ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
    res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
    result = _build(
        sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins
    )
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
    graph = dispatch(sources, manager, stdout)
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
    process_graph(graph, manager)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
    process_stale_scc(graph, scc, manager)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
    meta_tuples[id] = graph[id].write_cache()
                      ~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 2507, in write_cache
    new_interface_hash, meta_tuple = write_cache(
                                     ~~~~~~~~~~~^
        self.id,
        ^^^^^^^^
    ...<9 lines>...
        self.manager,
        ^^^^^^^^^^^^^
    )
    ^
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/build.py", line 1591, in write_cache
    data_io = Buffer()
  File "/home/joren/Workspace/scipy-stubs/.venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__
    raise NotImplementedError
NotImplementedError

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions