Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,17 @@ jobs:
os: ubuntu-24.04-arm
toxenv: py
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
dev_ast_serialize: true
- name: Parallel tests with py314-ubuntu, mypyc-compiled
python: '3.14'
os: ubuntu-24.04-arm
toxenv: py
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
test_mypyc: true
dev_ast_serialize: true
- name: Parallel tests with py314-windows-64, interpreted
python: '3.14'
os: windows-latest
toxenv: py
tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'"
dev_ast_serialize: true

- name: Type check our own code (py310-ubuntu)
python: '3.10'
Expand All @@ -142,7 +139,6 @@ jobs:
timeout-minutes: 60
env:
TOX_SKIP_MISSING_INTERPRETERS: False
VIRTUALENV_SYSTEM_SITE_PACKAGES: ${{ matrix.dev_ast_serialize && 1 || 0 }}
# Rich (pip) -- Disable color for windows + pytest
FORCE_COLOR: ${{ !(startsWith(matrix.os, 'windows-') && startsWith(matrix.toxenv, 'py')) && 1 || 0 }}
# Tox
Expand Down Expand Up @@ -217,11 +213,6 @@ jobs:
pip install -r test-requirements.txt
CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .

# To speed-up process until ast_serialize is on PyPI.
- name: Install pinned ast-serialize
if: ${{ matrix.dev_ast_serialize }}
run: pip install ast-serialize@git+https://github.com/mypyc/ast_serialize.git@052c5bfa3b2a5bf07c0b163ccbe2c5ccbfae9ac5

- name: Setup tox environment
run: |
tox run -e ${{ matrix.toxenv }} --notest
Expand Down
5 changes: 3 additions & 2 deletions docs/source/common_issues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,12 @@ make cold mypy runs several times faster.

Furthermore: as of `mypy 1.13 <https://mypy-lang.blogspot.com/2024/10/mypy-113-released.html>`_,
mypy allows use of the orjson library for handling the cache instead of the stdlib json, for
improved performance. You can ensure the presence of orjson using the faster-cache extra:
improved performance. You can ensure the presence of orjson using the ``faster-cache`` extra:

python3 -m pip install -U mypy[faster-cache]

Mypy may depend on orjson by default in the future.
Mypy may depend on orjson by default in the future. To use faster, native parser, use the
``native-parse`` extra. Native parser will be default in near future.

Types of empty collections
--------------------------
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ python2 = []
reports = ["lxml"]
install-types = ["pip"]
faster-cache = ["orjson"]
native-parse = ["ast-serialize>=0.1.1,<1.0.0"]

[project.urls]
Homepage = "https://www.mypy-lang.org/"
Expand Down
2 changes: 1 addition & 1 deletion test-data/unit/check-overloading.test
Original file line number Diff line number Diff line change
Expand Up @@ -6165,7 +6165,7 @@ reveal_type(f3(A())) # E: No overload variant of "f3" matches argument type "A"
# N: Revealed type is "Any"
reveal_type(f3(B())) # N: Revealed type is "__main__.B"

[case testOverloadIfSplitFunctionDef]
[case testOverloadIfSplitFunctionDef_no_native_parse]
# flags: --always-true True --always-false False
from typing import overload

Expand Down
1 change: 1 addition & 0 deletions test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ pytest-cov>=2.10.0
setuptools>=77.0.3
tomli>=1.1.0 # needed even on py311+ so the self check passes with --python-version 3.10
pre_commit>=3.5.0
ast-serialize>=0.1.1,<1.0.0
2 changes: 2 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# pip-compile --allow-unsafe --output-file=test-requirements.txt --strip-extras test-requirements.in
#
ast-serialize==0.1.1
# via -r test-requirements.in
attrs==25.4.0
# via -r test-requirements.in
cfgv==3.4.0
Expand Down
Loading