|
2 | 2 |
|
3 | 3 | ## Next release |
4 | 4 |
|
5 | | -... |
| 5 | +### Performance improvements |
| 6 | + |
| 7 | +Mypy may be 5-30% faster. This improvement comes largely from tuning the performance of the |
| 8 | +garbage collector. |
| 9 | + |
| 10 | +Contributed by Jukka Lehtosalo (PR [18306](https://github.com/python/mypy/pull/18306)). |
| 11 | + |
| 12 | +### Mypyc accelerated mypy wheels for aarch64 |
| 13 | + |
| 14 | +Mypy can compile itself to C extension modules using mypyc. This makes mypy 3-5x faster |
| 15 | +than if mypy is interpreted with pure Python. We now build and upload mypyc accelerated |
| 16 | +mypy wheels for `manylinux_aarch64` to PyPI, making it easy for users on such platforms |
| 17 | +to realise this speedup. |
| 18 | + |
| 19 | +Contributed by Christian Bundy and Marc Mueller |
| 20 | +(PR [mypy_mypyc-wheels#76](https://github.com/mypyc/mypy_mypyc-wheels/pull/76), |
| 21 | +PR [mypy_mypyc-wheels#89](https://github.com/mypyc/mypy_mypyc-wheels/pull/89)). |
| 22 | + |
| 23 | +### `--strict-bytes` |
| 24 | + |
| 25 | +By default, mypy treats an annotation of ``bytes`` as permitting ``bytearray`` and ``memoryview``. |
| 26 | +[PEP 688](https://peps.python.org/pep-0688) specified the removal of this special case. |
| 27 | +Use this flag to disable this behavior. `--strict-bytes` will be enabled by default in **mypy 2.0**. |
| 28 | + |
| 29 | +Contributed by Ali Hamdan (PR [18137](https://github.com/python/mypy/pull/18263/)) and |
| 30 | +Shantanu Jain (PR [13952](https://github.com/python/mypy/pull/13952)). |
| 31 | + |
| 32 | +### Improvements to reachability analysis and partial type handling in loops |
| 33 | + |
| 34 | +This change results in mypy better modelling control flow within loops and hence detecting several |
| 35 | +issues it previously did not detect. In some cases, this change may require use of an additional |
| 36 | +explicit annotation of a variable. |
| 37 | + |
| 38 | +Contributed by Christoph Tyralla (PR [18180](https://github.com/python/mypy/pull/18180), |
| 39 | +[PR](https://github.com/python/mypy/pull/18433)). |
| 40 | + |
| 41 | +(Speaking of partial types, another reminder that mypy plans on enabling `--local-partial-types` |
| 42 | +by default in **mypy 2.0**). |
| 43 | + |
| 44 | +### Better discovery of configuration files |
| 45 | + |
| 46 | +Mypy will now walk up the filesystem (up until a repository or file system root) to discover |
| 47 | +configuration files. See the |
| 48 | +[mypy configuration file documentation](https://mypy.readthedocs.io/en/stable/config_file.html) |
| 49 | +for more details. |
| 50 | + |
| 51 | +Contributed by Mikhail Shiryaev and Shantanu Jain |
| 52 | +(PR [16965](https://github.com/python/mypy/pull/16965), PR [18482](https://github.com/python/mypy/pull/18482) |
| 53 | + |
| 54 | +### Better line numbers for decorators and slice expressions |
| 55 | + |
| 56 | +Mypy now uses more correct line numbers for decorators and slice expressions. In some cases, this |
| 57 | +may necessitate changing the location of a `# type: ignore` comment. |
| 58 | + |
| 59 | +Contributed by Shantanu Jain (PR [18392](https://github.com/python/mypy/pull/18392), |
| 60 | +PR [18397](https://github.com/python/mypy/pull/18397)). |
| 61 | + |
| 62 | +### Drop Support for Python 3.8 |
| 63 | + |
| 64 | +Mypy no longer supports running with Python 3.8, which has reached end-of-life. |
| 65 | +When running mypy with Python 3.9+, it is still possible to type check code |
| 66 | +that needs to support Python 3.8 with the `--python-version 3.8` argument. |
| 67 | +Support for this will be dropped in the first half of 2025! |
| 68 | + |
| 69 | +Contributed by Marc Mueller (PR [17492](https://github.com/python/mypy/pull/17492)). |
6 | 70 |
|
7 | 71 | ## Mypy 1.14 |
8 | 72 |
|
|
0 commit comments