You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash on schemathesis with --cache-dir=/dev/null #18454
git clone https://github.com/schemathesis/schemathesis
cd schemathesis
mypy src/schemathesis --cache-dir=/dev/null
Traceback (most recent call last):
File "/Users/shantanujain/.virtualenvs/mypy-wxtm/bin/mypy", line 8, in <module>
sys.exit(console_entry())
~~~~~~~~~~~~~^^
File "/Users/shantanujain/dev/mypy/mypy/__main__.py", line 15, in console_entry
main()
~~~~^^
File "/Users/shantanujain/dev/mypy/mypy/main.py", line 119, in main
res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shantanujain/dev/mypy/mypy/main.py", line 203, in run_build
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
File "/Users/shantanujain/dev/mypy/mypy/build.py", line 191, in build
result = _build(
sources, options, alt_lib_path, flush_errors, fscache, stdout, stderr, extra_plugins
)
File "/Users/shantanujain/dev/mypy/mypy/build.py", line 267, in _build
graph = dispatch(sources, manager, stdout)
File "/Users/shantanujain/dev/mypy/mypy/build.py", line 2947, in dispatch
write_deps_cache(rdeps, manager, graph)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shantanujain/dev/mypy/mypy/build.py", line 976, in write_deps_cache
assert st.meta, "Module must be either parsed or cached"
^^^^^^^
AssertionError: Module must be either parsed or cached
λ tree
.
└── s
├── __init__.py
└── internal
└── checks.py
3 directories, 2 files
λ cat s/__init__.py
λ cat s/internal/checks.py
from ..types import foo
λ mypy s --cache-dir=/dev/null --cache-fine-grained
s/internal/checks.py:1: error: Cannot find implementation or library stub for module named "s.types" [import-not-found]
s/internal/checks.py:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Traceback (most recent call last):
File "/Users/shantanu/.virtualenvs/mypy-crxl/bin/mypy", line 8, in <module>
sys.exit(console_entry())
^^^^^^^^^^^^^^^
File "/Users/shantanu/dev/mypy/mypy/__main__.py", line 15, in console_entry
main()
File "/Users/shantanu/dev/mypy/mypy/main.py", line 119, in main
res, messages, blockers = run_build(sources, options, fscache, t0, stdout, stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shantanu/dev/mypy/mypy/main.py", line 203, in run_build
res = build.build(sources, options, None, flush_errors, fscache, stdout, stderr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shantanu/dev/mypy/mypy/build.py", line 191, in build
result = _build(
^^^^^^^
File "/Users/shantanu/dev/mypy/mypy/build.py", line 267, in _build
graph = dispatch(sources, manager, stdout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/shantanu/dev/mypy/mypy/build.py", line 2947, in dispatch
write_deps_cache(rdeps, manager, graph)
File "/Users/shantanu/dev/mypy/mypy/build.py", line 976, in write_deps_cache
assert st.meta, "Module must be either parsed or cached"
AssertionError: Module must be either parsed or cached
Activity
hauntsaninja commentedon Jan 13, 2025
This would fix, but would be good to make a small repro. Looks related to
schemathesis.internalFix crash with `--cache-dir=/dev/null`
hauntsaninja commentedon Jan 13, 2025
Needs
--cache-fine-grainedto reproFix crash with `--cache-fine-grained --cache-dir=/dev/null` (python#1…