|
2 | 2 |
|
3 | 3 | ## Next release
|
4 | 4 |
|
| 5 | +## Mypy 1.13 |
| 6 | + |
| 7 | +We’ve just uploaded mypy 1.13 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). |
| 8 | +Mypy is a static type checker for Python. You can install it as follows: |
| 9 | + |
| 10 | + python3 -m pip install -U mypy |
| 11 | + |
| 12 | +You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io). |
| 13 | + |
| 14 | +Note that unlike typical releases, Mypy 1.13 does not have any changes to type checking semantics |
| 15 | +from 1.12.1. |
| 16 | + |
| 17 | +### Improved performance |
| 18 | + |
| 19 | +Mypy 1.13 contains several performance improvements. Users can expect mypy to be 5-20% faster. |
| 20 | +In environments with long search paths (such as environments using many editable installs), mypy |
| 21 | +can be significantly faster, e.g. 2.2x faster in the use case targeted by these improvements. |
| 22 | + |
| 23 | +Mypy 1.13 allows use of the `orjson` library for handling the cache instead of the stdlib `json`, |
| 24 | +for improved performance. You can ensure the presence of `orjson` using the `faster-cache` extra: |
| 25 | + |
| 26 | + python3 -m pip install -U mypy[faster-cache] |
| 27 | + |
| 28 | +Mypy may depend on `orjson` by default in the future. |
| 29 | + |
| 30 | +These improvements were contributed by Shantanu. |
| 31 | + |
| 32 | +List of changes: |
| 33 | +* Significantly speed up file handling error paths (Shantanu, PR [17920](https://github.com/python/mypy/pull/17920)) |
| 34 | +* Use fast path in modulefinder more often (Shantanu, PR [17950](https://github.com/python/mypy/pull/17950)) |
| 35 | +* Let mypyc optimise os.path.join (Shantanu, PR [17949](https://github.com/python/mypy/pull/17949)) |
| 36 | +* Make is_sub_path faster (Shantanu, PR [17962](https://github.com/python/mypy/pull/17962)) |
| 37 | +* Speed up stubs suggestions (Shantanu, PR [17965](https://github.com/python/mypy/pull/17965)) |
| 38 | +* Use sha1 for hashing (Shantanu, PR [17953](https://github.com/python/mypy/pull/17953)) |
| 39 | +* Use orjson instead of json, when available (Shantanu, PR [17955](https://github.com/python/mypy/pull/17955)) |
| 40 | +* Add faster-cache extra, test in CI (Shantanu, PR [17978](https://github.com/python/mypy/pull/17978)) |
| 41 | + |
| 42 | +### Acknowledgements |
| 43 | +Thanks to all mypy contributors who contributed to this release: |
| 44 | + |
| 45 | +- Shantanu Jain |
| 46 | +- Jukka Lehtosalo |
| 47 | + |
5 | 48 | ## Mypy 1.12
|
6 | 49 |
|
7 | 50 | We’ve just uploaded mypy 1.12 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). Mypy is a static type
|
|
0 commit comments