Fall back when sqlite cache is unavailable#21443
Fall back when sqlite cache is unavailable#21443cyphercodes wants to merge 3 commits intopython:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
Updated this PR to make the sqlite fallback regression test work under mypyc-compiled CI. Root cause: the test patched Local verification:
|
This comment has been minimized.
This comment has been minimized.
|
Follow-up: the first test-only fix still failed in mypyc-compiled jobs because Local verification:
CI has restarted on commit |
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
Fixes #21440
When the sqlite cache is enabled but the sqlite3 module cannot import (for example when CPython was built without _sqlite3), fall back to the filesystem metadata cache instead of crashing during metastore creation.
Tests:
python3 -m pytest -q mypy/test/testmetastore.pypython3 -m mypy --config-file mypy_self_check.ini mypy/build.py mypy/test/testmetastore.pypre-commit run --files mypy/build.py mypy/test/testmetastore.pygit diff --check