|
2 | 2 |
|
3 | 3 | ## Next Release |
4 | 4 |
|
| 5 | +### Enabling `--local-partial-types` by default |
| 6 | + |
| 7 | +This flag affects the inference of types based on assignments in other scopes. |
| 8 | +For now, explicitly disabling this continues to be supported, but this support will be removed |
| 9 | +in the future as the legacy behaviour is hard to support with other current and future features |
| 10 | +in mypy, like the daemon or the new implementation of flexible redefinitions. |
| 11 | + |
| 12 | +Contributed by Ivan Levkivskyi, Jukka Lehtosalo, Shantanu in [PR 21163](https://github.com/python/mypy/pull/21163) |
| 13 | + |
| 14 | +### Enabling `--strict-bytes` by default |
| 15 | + |
| 16 | +Per [PEP 688](https://peps.python.org/pep-0688), mypy no longer treats `bytearray` and `memoryview` |
| 17 | +values as assignable to the `bytes` type. |
| 18 | + |
| 19 | +Contributed by Shantanu in [PR 18371](https://github.com/python/mypy/pull/18371) |
| 20 | + |
5 | 21 | ### Drop Support for Targeting Python 3.9 |
6 | 22 |
|
7 | 23 | Mypy no longer supports type checking code with `--python-version 3.9`. |
8 | 24 | Use `--python-version 3.10` or newer. |
9 | 25 |
|
| 26 | +Contributed by Shantanu, Marc Mueller in [PR 21243](https://github.com/python/mypy/pull/21243) |
| 27 | + |
| 28 | +### Remove special casing of legacy bundled stubs |
| 29 | + |
| 30 | +Mypy used to bundle stubs for a few packages in versions 0.812 and earlier. To navigate the |
| 31 | +transition, mypy used to report missing types for these packages even if `--ignore-missing-imports` |
| 32 | +was set. Mypy now consistently respects `--ignore-missing-imports` for all packages. |
| 33 | + |
| 34 | +Contributed by Shantanu in [PR 18372](https://github.com/python/mypy/pull/18372) |
| 35 | + |
| 36 | +### Prevent assignment to None for non-Optional class variables with type comments |
| 37 | + |
| 38 | +Mypy used to allow assignment to None for class variables when using type comments. This was a |
| 39 | +common idiom in Python 3.5 and earlier, prior to the introduction of variable annotations. |
| 40 | +However, this was a soundness hole and has now been removed. |
| 41 | + |
| 42 | +Contributed by Shantanu in [PR 20054](https://github.com/python/mypy/pull/20054) |
| 43 | + |
10 | 44 | ## Mypy 1.20 |
11 | 45 |
|
12 | 46 | We’ve just uploaded mypy 1.20.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)). |
|
0 commit comments