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

KeyError: 'deprecated' because of bad cache #18473

Open
injust opened this issue Jan 15, 2025 · 0 comments
Open

KeyError: 'deprecated' because of bad cache #18473

injust opened this issue Jan 15, 2025 · 0 comments
Labels

Comments

@injust
Copy link

injust commented Jan 15, 2025

Crash Report

I ran mypy in my venv and the cache somehow got into a bad state, leading to crashes until the cache was removed. I don't know what triggered this. If it matters, the mypy that caused the bad cache was installed with faster-cache.

Traceback

Traceback (most recent call last):
  File "[...]/.venv/bin/mypy", line 8, in <module>
    sys.exit(console_entry())
             ~~~~~~~~~~~~~^^
  File "[...]/.venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
    main()
    ~~~~^^
  File "mypy/main.py", line 109, in main
  File "mypy/main.py", line 193, in run_build
  File "mypy/build.py", line 194, in build
  File "mypy/build.py", line 269, in _build
  File "mypy/build.py", line 2940, in dispatch
  File "mypy/build.py", line 3331, in process_graph
  File "mypy/build.py", line 3409, in process_fresh_modules
  File "mypy/build.py", line 2096, in load_tree
  File "mypy/nodes.py", line 402, in deserialize
  File "mypy/nodes.py", line 4058, in deserialize
  File "mypy/nodes.py", line 3999, in deserialize
  File "mypy/nodes.py", line 263, in deserialize
  File "mypy/nodes.py", line 3420, in deserialize
  File "mypy/nodes.py", line 4058, in deserialize
  File "mypy/nodes.py", line 3999, in deserialize
  File "mypy/nodes.py", line 263, in deserialize
  File "mypy/nodes.py", line 952, in deserialize
  File "mypy/nodes.py", line 879, in deserialize
KeyError: 'deprecated'

To Reproduce

repro.zip

unzip repro.zip
cd repro/
uv venv
source .venv/bin/activate.fish
uv pip install -r requirements.txt
mypy foo.py

Your Environment

  • Mypy version used: 1.14.1 (compiled: yes)
  • Mypy configuration options from mypy.ini (and other config files): strict = true
  • Python version used: 3.13.1
  • Operating system and version: macOS Sequoia 15.2
@injust injust added the crash label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant