Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Disable parallel checking for mypy project#245

Merged
JelleZijlstra merged 1 commit intohauntsaninja:masterfrom
brianschubert:disable-mypy-parallel
Apr 20, 2026
Merged

Disable parallel checking for mypy project#245
JelleZijlstra merged 1 commit intohauntsaninja:masterfrom
brianschubert:disable-mypy-parallel

Conversation

@brianschubert
Copy link
Copy Markdown
Contributor

Since python/mypy#21221, mypy_self_check.ini sets num_workers = 4. This is causing mypy_primer to fail when checking mypy, since mypy_primer disables the cache directory but parallel checking requires the cache directory to be enabled.

This has been causing hard crashes in typeshed's CI (see e.g. python/typeshed#15653) as well as silent failures in mypy's CI (since the current error isn't picked up by the diff analysis).

$ uv run python3 -m mypy_primer --new master --old master -k 'mypy$'

mypy
https://github.com/python/mypy
----------

old
> /tmp/mypy_primer/mypy_old/venv/bin/mypy --config-file mypy_self_check.ini -p mypy -p mypyc --python-executable=/tmp/mypy_primer/projects/_mypy_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (0.5s)
UNEXPECTED FAILURE
        error: cache must be enabled in parallel mode
----------

new
> /tmp/mypy_primer/mypy_new/venv/bin/mypy --config-file mypy_self_check.ini -p mypy -p mypyc --python-executable=/tmp/mypy_primer/projects/_mypy_venv/bin/python --warn-unused-ignores --warn-redundant-casts --no-incremental --cache-dir=/dev/null --show-traceback --soft-error-limit=-1 (0.5s)
UNEXPECTED FAILURE
        error: cache must be enabled in parallel mode

@JelleZijlstra
Copy link
Copy Markdown
Collaborator

OK to land this for now to unblock typeshed, but maybe mypy-primer should set this option for all checked projects, in case other projects start using parallel workers. Or we should allow the cache to be enabled so that parallel checking can work.

@JelleZijlstra JelleZijlstra merged commit a3dfd50 into hauntsaninja:master Apr 20, 2026
2 checks passed
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.

3 participants