Skip to content

unconditionally disable mypy db sharding - #23578

Open
cburroughs wants to merge 1 commit into
pantsbuild:mainfrom
cburroughs:csb/mypy-2ish-cache
Open

unconditionally disable mypy db sharding#23578
cburroughs wants to merge 1 commit into
pantsbuild:mainfrom
cburroughs:csb/mypy-2ish-cache

Conversation

@cburroughs

Copy link
Copy Markdown
Contributor

mypy 2.0 https://mypy-lang.blogspot.com/2026/05/mypy-20-relased.html began sharding the sqlite files (so instead of one .db file you get 16 or whatever). This breaks the mypy<-->named_cache integration which is designed around managing a single file atomically. To prevent users seeing a 1/num-shards performance degradation, unconditionally use 1 shard and warn on attempts to overrides.

NOTE: The warning is best effort and doesn't try to handle the setting being in mypy config files.

closes #23352

@cburroughs cburroughs self-assigned this Jul 28, 2026
mypy 2.0 <https://mypy-lang.blogspot.com/2026/05/mypy-20-relased.html>
began sharding the sqlite files (so instead of one .db file you get 16
or whatever).  This breaks the mypy<-->named_cache integration which
is designed around managing a single file atomically.  To prevent
users seeing a 1/num-shards performance degradation, unconditionally
use 1 shard and warn on attempts to overrides.

NOTE: The warning is best effort and doesn't try to handle the setting
being in mypy config files.

closes pantsbuild#23352
@cburroughs
cburroughs force-pushed the csb/mypy-2ish-cache branch from 3ede77f to 8adcbf6 Compare July 29, 2026 14:35
@cburroughs
cburroughs marked this pull request as ready for review July 29, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evaluate options for reacting to new mypy db sharding options

1 participant